+2002-08-06 Federico G. Schwindt <fgsch@olimpo.com.br>
+
+ * configure.in (hppa*-*-openbsd*): Treat like hppa*-*-*elf*.
+
+2002-08-04 H.J. Lu (hjl@gnu.org)
+
+ * configure.in (mips*-*-linux*): Don't skip target-libffi.
+
+2002-07-31 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.in: Move generic linux case to end. Copy generic
+ linux noconfigdirs to mips*-*-linux* entry and new
+ powerpc64*-*-linux* entry. Add target-libffi for the latter.
+
2002-07-19 Chris Demetriou <cgd@broadcom.com>
* MAINTAINERS: Clarify on config.guess and config.sub, and add
+2002-08-09 Graeme Peterson <gp@qnx.com>
+
+ * Makefile.am: Add entries for elf32-ppcqnx.c, and add
+ elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
+ * Makefile.in: Regenerate.
+ * config.bfd: Add support for powerpc{le}-*-nto targets.
+ * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
+ * configure: Regenerate.
+ * elf32-i386qnx.c: Moved backend functions into a QNX specific
+ common file "elf32-qnx.h", and now include that file.
+ * elf32-qnx.h: New file: QNX specific common elf backend.
+ * elf32-ppc.c: Do not include elf32-target.h if
+ ELF32_PPC_C_INCLUDED is defined.
+ * elf32-ppcqnx.c: New file: Support for QNX.
+ * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
+ * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
+
+2002-08-09 Nick Clifton <nickc@redhat.com>
+
+ * po/sv.po: Updated Swedish translation.
+
+2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
+ g->global_gotsym is NULL.
+
+2002-08-08 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_add_default_symbol): Don't warn a defintion
+ overrides an indirect versioned symbol.
+
+2002-08-08 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
+ for R_386_TLS_TPOFF32 relocs against symndx 0.
+
+2002-08-07 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
+ with undefined version if needed.
+ (elf_link_assign_sym_version): Match a default symbol with a
+ version without definition. No need to hide the default
+ definition separately.
+
+2002-08-08 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_link_output_extsym): Don't output symbols from
+ SEC_EXCLUDE sections.
+
+ * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
+
+2002-08-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
+ entries.
+
+2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
+ mismatch.
+
+2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (ABI_64_P): Remove superfluous check.
+
+2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf32-mips.c (mips_reloc_map): Fix typo.
+
+2002-08-06 Alan Modra <amodra@bigpond.net.au>
+
+ * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
+
+2002-08-06 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
+
+2002-08-06 Alan Modra <amodra@bigpond.net.au>
+
+ * libxcoff.h: Use PARAMS on function declarations.
+ * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
+ * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
+
+ * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
+ addend.
+ * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
+
+2002-08-06 Alan Modra <amodra@bigpond.net.au>
+
+ * coff-rs6000.c: Formatting fixes.
+ (xcoff_calculate_relocation): Use PARAMS in declaration.
+ (xcoff_complain_overflow): Likewise.
+ (xcoff_ppc_relocate_section): Use old-style function pointer call.
+ (bfd_xcoff_backend_data): Remove useless comments.
+ (rs6000coff_vec): Likewise.
+ (bfd_pmac_xcoff_backend_data): Likewise.
+ (pmac_xcoff_vec): Likewise.
+
+ * coff64-rs6000.c: Formatting fixes.
+ (xcoff64_calculate_relocation): Use PARAMS in declaration.
+ (xcoff64_ppc_relocate_section): Use old-style function pointer call.
+ (bfd_xcoff_backend_data): Remove useless comments.
+ (rs6000coff64_vec): Likewise.
+ (bfd_xcoff_aix5_backend_data): Likewise.
+ (aix5coff64_vec): Likewise.
+
+2002-08-06 Alan Modra <amodra@bigpond.net.au>
+
+ * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
+ mask entries. Use complain_overflow_dont for R_REF.
+ (xcoff_reloc_type_ba): Revert last change.
+ (xcoff_reloc_type_br): Likewise.
+ (xcoff_reloc_type_crel): Likewise.
+ (xcoff_ppc_relocate_section): Likewise.
+ * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
+ (xcoff64_ppc_relocate_section): Likewise.
+ (xcoff64_howto_table): Revert some of last change to mask entries.
+ Use complain_overflow_dont for R_REF.
+
+ * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
+ relocs with bitsize == 16 have size = 1.
+ (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
+ (xcoff_reloc_type_br): Likewise.
+ (xcoff_reloc_type_crel): Likewise.
+ (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
+ * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
+ dst_mask adjustment.
+ (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
+ (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
+ bitsize == 16 have size = 1.
+
+2002-08-01 Denis Chertykov <denisc@overta.ru>
+
+ * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
+ (struct misc): New field isymbuf. All free_* fields removed.
+ (symbol_value): Pass in internal syms. No need to swap syms in.
+ (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
+ possibly cached info.
+ (tidyup_after_error): Removed.
+ (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
+ misc. Use new field.
+ (adjust_all_relocations): Use internal syms. No need to swap syms
+ in and out.
+ (add_page_insn): Don't use removed fields of struct misc.
+
+2002-08-01 Nick Clifton <nickc@redhat.com>
+
+ * elf32-arm.h: Revert previous delta.
+
+2002-08-01 Nick Clifton <nickc@redhat.com>
+
+ * configure.in (AM_INIT_AUTOMAKE): Bump version number.
+ * configure: Regenerate.
+
+2002-07-31 H.J. Lu <hjl@gnu.org>
+
+ * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
+ selected.
+
+2002-07-31 H.J. Lu <hjl@gnu.org>
+
+ * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
+ is selected.
+
+2002-07-31 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
+ if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
+
+2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
+
+ * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
+ There is no 8 byte relocation type for this architecture.
+ (do_ns32k_reloc): Use bfd_vma instead of native types.
+ (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
+ returns void.
+ (_bfd_ns32k_put_displacement): Don't check for overflow. We can
+ rely on generic code to do that.
+ * aout-ns32k.c (howto_table): Add appropriate overflow detection
+ to all table entries.
+ (_bfd_ns32k_relocate_contents): put_data returns void.
+ * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
+ (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
+ return void.
+
+2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
+
+ * aoutx.h (aout_link_check_ar_symbols): Whether to include an
+ archive object is target dependant.
+
+2002-07-31 Adam Nemet <anemet@lnxw.com>
+
+ * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
+ (THUMB_PLT_ENTRY_SIZE): New macro.
+ (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
+ (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
+ ARM_PLT_ENTRY_SIZE.
+ (elf32_arm_plt_entry): Likewise.
+ (elf_backend_plt_header_size): Likewise.
+ (elf32_thumb_plt0_entry): New global.
+ (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
+ into .plt.thumb.
+ (elf32_thumb_plt_entry): New global.
+ (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
+ Thumb entries. Set the bottom bit of the corresponding GOT entry
+ for a Thumb PLT entry.
+ (struct elf32_arm_plt_entry_info): New structure.
+ (struct elf32_arm_link_hash_entry, plt_info): New member of this
+ type.
+ (elf32_arm_link_hash_newfunc): Initialize new member.
+ (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
+ relocations against the PLT.
+ (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
+ first_rel_type if this is the first time we encounter the symbol.
+ (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
+ Determine if relocation needs a PLT entry. Set first_rel_type if
+ this is the first time we encounter the symbol
+ (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
+ functions as well.
+ (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
+ (elf32_arm_create_dynamic_sections): New function. Create the
+ .plt.thumb section.
+ (elf_backend_create_dynamic_sections): Call it.
+
+2002-07-31 Nick Clifton <nickc@redhat.com>
+
+ * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
+ 'alternative' in order to avoid shadowing global symbol of the
+ same name.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * libcoff.h: Regenerate.
+
+2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * Makefile.am: Add n32 ABI support.
+ * Makefile.in: Regenerate.
+ * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
+ bit vectors for mips*-*-linux targets as optional.
+ * configure.in: Add n32 ABI vectors.
+ * configure: Regenerate.
+ * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
+ * elfn32-mips.c: New file, n32 ABI support.
+ * targets.c: Add n32 ABI vectors.
+
+2002-07-30 Graeme Peterson <gp@qnx.com>
+
+ * elfarmqnx-nabi.c: New file: Support for QNX.
+ * config.bfd: Add support for arm-*-nto target.
+ * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
+ * configure: Regenerate.
+ * Makefile.am: Add entries for elfarmqnx-nabi.c.
+ * Makefile.in: Regenerate.
+ * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
+ Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
+ * elfarm-nabi.c: Do not include elf32-arm.h if
+ ELFARM_NABI_C_INCLUDED is defined.
+ * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
+
+2002-07-30 Nick Clifton <nickc@redhat.com>
+
+ * po/sv.po: Updated Swedish translation.
+
+2002-07-30 Jakub Jelinek <jakub@redhat.com>
+
+ * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
+
+2002-07-30 Alan Modra <amodra@bigpond.net.au>
+
+ * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
+ * archive.c (bfd_generic_archive_p): Likewise.
+ * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
+ (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
+ * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
+ (xcoff64_archive_p): Likewise.
+ (xcoff64_openr_next_archived_file): Likewise.
+ (xcoff64_archive_p): Clean up tdata properly on error.
+ * coffgen.c (coff_real_object_p): Likewise.
+ (coff_object_p): Release filehdr and opthdr.
+ * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
+ * ieee.c (ieee_archive_p): Likewise.
+ * ihex.c (ihex_object_p): Likewise.
+ (ihex_mkobject): Always allocate tdata.
+ * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
+ * srec.c (srec_mkobject): Always allocate tdata.
+ (srec_object_p): Clean up tdata properly on error.
+ (symbolsrec_object_p): Likewise.
+ * versados.c (versados_object_p): Likewise.
+ * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
+ and bfd_realloc instead of realloc.
+ (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
+ * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
+ place of bfd_malloc, simplifying error freeing. Free hash table too.
+ (vms_object_p): Clean up tdata on error.
+ (vms_mkobject): Don't complain on stderr if vms_initialize fails.
+ (vms_close_and_cleanup): Adjust for bfd_alloc use.
+
+2002-07-30 Alan Modra <amodra@bigpond.net.au>
+
+ * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
+
+2002-07-26 Chris Demetriou <cgd@broadcom.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
+ flags into resulting BFD.
+
+2002-07-26 Alan Modra <amodra@bigpond.net.au>
+
+ From John Reiser <jreiser@BitWagon.com>
+ * elf32-i386.c (elf_i386_link_hash_table_create): Clear
+ tls_ldm_got.refcount.
+
+2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf64-mips.c: Update TODO comment.
+ (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
+ mips_elf64_gprel16_reloca): Remove prototypes.
+ (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
+ (UNUSED_RELOC): Replace by EMPTY_RELOC.
+ (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
+ wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
+ R_MIPS_HIGHEST.
+ (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
+ R_MIPS_GOT16. Remove wrong comments.
+ (elf_mips16_jump_howto,elf_mips16_gprel_howto,
+ elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
+ from elf32-mips.c.
+ (mips_elf64_hi16_reloc): Fix formatting.
+ (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
+ (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
+ Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
+ (mips_elf64_gprel16_reloc): Make static. Add check for
+ partial_inplace.
+ (mips_elf64_gprel16_reloca): Remove.
+ (mips_elf64_literal_reloc): New function.
+ (mips_elf64_gprel32_reloc): Fix formatting.
+ (mips_elf64_shift6_reloc): Fix comment. Make static.
+ (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
+ elf32-mips.c.
+ (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
+ elf32-mips.c
+ (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
+ specific relocations.
+ (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
+ (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
+ (ELF_MAXPAGESIZE): Add comment.
+
+2002-07-25 Nick Clifton <nickc@redhat.com>
+
+ * po/sv.po: Updated Swedish translation.
+ * po/es.po: Updated Spanish translation.
+ * po/fr.po: Updated French translation.
+
+2002-07-25 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
+ as elf_link_record_local_dynamic_symbol.
+ (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
+ (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
+ * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
+ * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
+ attempt is made to record a symbol in a discarded section, and
+ return `2' in that case.
+
+2002-07-24 Nick Clifton <nickc@redhat.com>
+
+ * po/sv.po: Updated Swedish translation.
+ * po/es.po: Updated Spanish translation.
+
+2002-07-23 Alan Modra <amodra@bigpond.net.au>
+
+ * po/SRC-POTFILES.in: Regenerate.
+
+ * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
+ immediately. Remove code handling relocatable linking.
+ * elf32-avr.c (elf32_avr_relocate_section): Likewise.
+ * elf32-cris.c (cris_elf_relocate_section): Likewise.
+ * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
+ * elf32-frv.c (elf32_frv_relocate_section): Likewise.
+ * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+ * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf32-v850.c (v850_elf_relocate_section): Likewise.
+ * elf32-vax.c (elf_vax_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+ * elf32-avr.c (elf_backend_rela_normal): Define.
+ * elf32-cris.c: Likewise.
+ * elf32-fr30.c: Likewise.
+ * elf32-frv.c: Likewise.
+ * elf32-h8300.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-ip2k.c: Likewise.
+ * elf32-sparc.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf32-vax.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
+ * elf32-frv.c (elf32_frv_relocate_section): Likewise.
+ * elf32-i860.c (elf32_i860_relocate_section): Likewise.
+ * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
+ * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+ * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
+ * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
+ * elf-m10200.c (USE_RELA): Don't define.
+ * elf-m10300.c: Likewise.
+ * elfarm-oabi.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-ip2k.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-vax.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+ * elf32-avr.c (USE_REL): Don't undef.
+ * elf32-ip2k.c: Likewise.
+
+2002-07-23 Nick Clifton <nickc@redhat.com>
+
+ * elf-bfd.h (struct elf_backend_data): Add new bitfield
+ 'want_p_paddr_set_to_zero'.
+ * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
+ to false;
+ * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
+ * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
+
+2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
+
+ * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
+ the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
+ show the Copyright string.
+ Minor formatting tidy ups.
+
+2002-07-23 Nick Clifton <nickc@redhat.com>
+
+ * po/fr.po: Updated French translation.
+ * po/sv.po: Updated Swedish translation.
+
+2002-07-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_link_input_bfd): Don't change internal symbols
+ when outputting relocs.
+
2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
elf32-arc.lo \
elfarm-oabi.lo \
elfarm-nabi.lo \
+ elfarmqnx-nabi.lo \
elf32-avr.lo \
elf32-cris.lo \
elf32-d10v.lo \
elf32-or32.lo \
elf32-pj.lo \
elf32-ppc.lo \
+ elf32-ppcqnx.lo \
elf32-s390.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
elf32-arc.c \
elfarm-oabi.c \
elfarm-nabi.c \
+ elfarmqnx-nabi.c \
elf32-avr.c \
elf32-cris.c \
elf32-d10v.c \
elf32-or32.c \
elf32-pj.c \
elf32-ppc.c \
+ elf32-ppcqnx.c \
elf32-sh64.c \
elf32-sh64-com.c \
elf32-s390.c \
elf64-hppa.lo \
elf64-ia64.lo \
elf64-gen.lo \
+ elfn32-mips.lo \
elf64-mips.lo \
elf64-mmix.lo \
elf64-sh64.lo \
elf64-alpha.c \
elf64-hppa.c \
elf64-gen.c \
+ elfn32-mips.c \
elf64-mips.c \
elf64-mmix.c \
elf64-ppc.c \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-arm.h elf32-target.h
+elfarmqnx-nabi.lo: elfarmqnx-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/filenames.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-arm.h elf32-target.h
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-ppcqnx.lo: elf32-ppcqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf64-target.h
+elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ genlink.h elf-bfd.h elfxx-mips.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/coff/mips.h ecoffswap.h elf32-target.h
elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
elf32-arc.lo \
elfarm-oabi.lo \
elfarm-nabi.lo \
+ elfarmqnx-nabi.lo \
elf32-avr.lo \
elf32-cris.lo \
elf32-d10v.lo \
elf32-or32.lo \
elf32-pj.lo \
elf32-ppc.lo \
+ elf32-ppcqnx.lo \
elf32-s390.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
elf32-arc.c \
elfarm-oabi.c \
elfarm-nabi.c \
+ elfarmqnx-nabi.c \
elf32-avr.c \
elf32-cris.c \
elf32-d10v.c \
elf32-or32.c \
elf32-pj.c \
elf32-ppc.c \
+ elf32-ppcqnx.c \
elf32-sh64.c \
elf32-sh64-com.c \
elf32-s390.c \
elf64-hppa.lo \
elf64-ia64.lo \
elf64-gen.lo \
+ elfn32-mips.lo \
elf64-mips.lo \
elf64-mmix.lo \
elf64-sh64.lo \
elf64-alpha.c \
elf64-hppa.c \
elf64-gen.c \
+ elfn32-mips.c \
elf64-mips.c \
elf64-mmix.c \
elf64-ppc.c \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elf32-arm.h elf32-target.h
+elfarmqnx-nabi.lo: elfarmqnx-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/filenames.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ elf32-arm.h elf32-target.h
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-ppcqnx.lo: elf32-ppcqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf64-target.h
+elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ genlink.h elf-bfd.h elfxx-mips.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/coff/mips.h ecoffswap.h elf32-target.h
elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
/* BFD back-end for ns32k a.out-ish binaries.
- Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 2000, 2001
+ Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Ian Dall (idall@eleceng.adelaide.edu.au).
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define BYTES_IN_WORD 4
#define MY(OP) MYNS(OP)
-#define MY_swap_std_reloc_in MY(swap_std_reloc_in)
+#define MY_swap_std_reloc_in MY(swap_std_reloc_in)
#define MY_swap_std_reloc_out MY(swap_std_reloc_out)
static void
-MY_swap_std_reloc_in PARAMS ((bfd *abfd, struct reloc_std_external *bytes,
- arelent *cache_ptr, asymbol **symbols,
- bfd_size_type symcount));
+MY_swap_std_reloc_in PARAMS ((bfd *, struct reloc_std_external *,
+ arelent *, asymbol **,
+ bfd_size_type));
static void
-MY_swap_std_reloc_out PARAMS ((bfd *abfd, arelent *g,
- struct reloc_std_external *natptr));
+MY_swap_std_reloc_out PARAMS ((bfd *, arelent *,
+ struct reloc_std_external *));
reloc_howto_type *
MY(reloc_howto) PARAMS ((bfd *, struct reloc_std_external *,
int *, int *, int *));
In addition, for historical reasons the encoding of the relocation types
in the a.out format relocation entries is such that even the relocation
- methods which are standard are not encoded the standard way. */
+ methods which are standard are not encoded the standard way. */
reloc_howto_type MY(howto_table)[] =
{
+ /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone */
/* ns32k immediate operands. */
- HOWTO (BFD_RELOC_NS32K_IMM_8, 0, 0, 8, false, 0, true,
+ HOWTO (BFD_RELOC_NS32K_IMM_8, 0, 0, 8, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "NS32K_IMM_8",
true, 0x000000ff,0x000000ff, false),
- HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, false, 0, true,
+ HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "NS32K_IMM_16",
true, 0x0000ffff,0x0000ffff, false),
- HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, false, 0, true,
+ HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "NS32K_IMM_32",
true, 0xffffffff,0xffffffff, false),
- HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, true, 0, false,
+ HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_8",
true, 0x000000ff, 0x000000ff, false),
- HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, true, 0, false,
+ HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_16",
true, 0x0000ffff,0x0000ffff, false),
- HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, true, 0, false,
+ HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_32",
true, 0xffffffff,0xffffffff, false),
/* ns32k displacements. */
- HOWTO (BFD_RELOC_NS32K_DISP_8, 0, 0, 8, false, 0, true,
+ HOWTO (BFD_RELOC_NS32K_DISP_8, 0, 0, 7, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "NS32K_DISP_8",
true, 0x000000ff,0x000000ff, false),
- HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 16, false, 0, true,
+ HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 14, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "NS32K_DISP_16",
true, 0x0000ffff, 0x0000ffff, false),
- HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 32, false, 0, true,
+ HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 30, false, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "NS32K_DISP_32",
true, 0xffffffff, 0xffffffff, false),
- HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 8, true, 0, false,
+ HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 7, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_8",
true, 0x000000ff,0x000000ff, false),
- HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 16, true, 0, false,
+ HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 14, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_16",
true, 0x0000ffff,0x0000ffff, false),
- HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 32, true, 0, false,
+ HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 30, true, 0, complain_overflow_signed,
_bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_32",
true, 0xffffffff,0xffffffff, false),
{
int r_ns32k_type = (howto - MY(howto_table)) / 6;
bfd_vma (*get_data) PARAMS ((bfd_byte *, int));
- int (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
+ void (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
switch (r_ns32k_type)
{
Free Software Foundation, Inc.
Written by Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
SECTION
reloc_howto_type howto_table_ext[] =
{
- /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone */
+ /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone. */
HOWTO(RELOC_8, 0, 0, 8, false, 0, complain_overflow_bitfield,0,"8", false, 0,0x000000ff, false),
HOWTO(RELOC_16, 0, 1, 16, false, 0, complain_overflow_bitfield,0,"16", false, 0,0x0000ffff, false),
HOWTO(RELOC_32, 0, 2, 32, false, 0, complain_overflow_bitfield,0,"32", false, 0,0xffffffff, false),
/* Convert standard reloc records to "arelent" format (incl byte swap). */
reloc_howto_type howto_table_std[] = {
- /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone */
+ /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone. */
HOWTO ( 0, 0, 0, 8, false, 0, complain_overflow_bitfield,0,"8", true, 0x000000ff,0x000000ff, false),
HOWTO ( 1, 0, 1, 16, false, 0, complain_overflow_bitfield,0,"16", true, 0x0000ffff,0x0000ffff, false),
HOWTO ( 2, 0, 2, 32, false, 0, complain_overflow_bitfield,0,"32", true, 0xffffffff,0xffffffff, false),
#define EXT(i, j) case i: return &howto_table_ext[j]
#define STD(i, j) case i: return &howto_table_std[j]
int ext = obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE;
+
if (code == BFD_RELOC_CTOR)
switch (bfd_get_arch_info (abfd)->bits_per_address)
{
code = BFD_RELOC_64;
break;
}
+
if (ext)
switch (code)
{
default: return (reloc_howto_type *) NULL;
}
else
- /* std relocs */
+ /* std relocs. */
switch (code)
{
STD (BFD_RELOC_16, 1);
*abfd->tdata.aout_data = *oldrawptr;
abfd->tdata.aout_data->a.hdr = &rawptr->e;
- *(abfd->tdata.aout_data->a.hdr) = *execp; /* Copy in the internal_exec struct */
+ /* Copy in the internal_exec struct. */
+ *(abfd->tdata.aout_data->a.hdr) = *execp;
execp = abfd->tdata.aout_data->a.hdr;
- /* Set the file flags */
+ /* Set the file flags. */
abfd->flags = BFD_NO_FLAGS;
if (execp->a_drsize || execp->a_trsize)
abfd->flags |= HAS_RELOC;
- /* Setting of EXEC_P has been deferred to the bottom of this function */
+ /* Setting of EXEC_P has been deferred to the bottom of this function. */
if (execp->a_syms)
abfd->flags |= HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS;
if (N_DYNAMIC (*execp))
obj_aout_sym_hashes (abfd) = NULL;
if (! NAME(aout,make_sections) (abfd))
- return NULL;
+ goto error_ret;
obj_datasec (abfd)->_raw_size = execp->a_data;
obj_bsssec (abfd)->_raw_size = execp->a_bss;
obj_textsec (abfd)->size = N_TXTSIZE (*execp);
obj_textsec (abfd)->raw_size = N_TXTSIZE (*execp);
- /* data and bss are already filled in since they're so standard */
+ /* Data and bss are already filled in since they're so standard. */
- /* The virtual memory addresses of the sections */
+ /* The virtual memory addresses of the sections. */
obj_textsec (abfd)->vma = N_TXTADDR (*execp);
obj_datasec (abfd)->vma = N_DATADDR (*execp);
obj_bsssec (abfd)->vma = N_BSSADDR (*execp);
- /* The file offsets of the sections */
+ /* The file offsets of the sections. */
obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
obj_datasec (abfd)->filepos = N_DATOFF (*execp);
- /* The file offsets of the relocation info */
+ /* The file offsets of the relocation info. */
obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
obj_textsec (abfd)->next = obj_datasec (abfd);
obj_datasec (abfd)->next = obj_bsssec (abfd);
#endif
+ return result;
}
- else
- {
- free (rawptr);
- abfd->tdata.aout_data = oldrawptr;
- }
- return result;
+
+ error_ret:
+ bfd_release (abfd, rawptr);
+ abfd->tdata.aout_data = oldrawptr;
+ return NULL;
}
/*
return false;
}
- /* Determine the size of a relocation entry */
+ /* Determine the size of a relocation entry. */
switch (arch)
{
case bfd_arch_sparc:
/* Data. */
if (!obj_datasec (abfd)->user_set_vma)
{
-#if 0 /* ?? Does alignment in the file image really matter? */
+#if 0 /* ?? Does alignment in the file image really matter? */
pad = align_power (vma, obj_datasec (abfd)->alignment_power) - vma;
#endif
obj_textsec (abfd)->_raw_size += pad;
bfd *abfd;
asection *newsect;
{
- /* align to double at least */
+ /* Align to double at least. */
newsect->alignment_power = bfd_get_arch_info (abfd)->section_align_power;
if (bfd_get_format (abfd) == bfd_object)
- {
- if (obj_textsec (abfd) == NULL && !strcmp (newsect->name, ".text"))
- {
- obj_textsec (abfd)= newsect;
- newsect->target_index = N_TEXT;
- return true;
- }
-
- if (obj_datasec (abfd) == NULL && !strcmp (newsect->name, ".data"))
- {
- obj_datasec (abfd) = newsect;
- newsect->target_index = N_DATA;
- return true;
- }
+ {
+ if (obj_textsec (abfd) == NULL && !strcmp (newsect->name, ".text"))
+ {
+ obj_textsec (abfd)= newsect;
+ newsect->target_index = N_TEXT;
+ return true;
+ }
- if (obj_bsssec (abfd) == NULL && !strcmp (newsect->name, ".bss"))
- {
- obj_bsssec (abfd) = newsect;
- newsect->target_index = N_BSS;
- return true;
- }
+ if (obj_datasec (abfd) == NULL && !strcmp (newsect->name, ".data"))
+ {
+ obj_datasec (abfd) = newsect;
+ newsect->target_index = N_DATA;
+ return true;
+ }
- }
+ if (obj_bsssec (abfd) == NULL && !strcmp (newsect->name, ".bss"))
+ {
+ obj_bsssec (abfd) = newsect;
+ newsect->target_index = N_BSS;
+ return true;
+ }
+ }
- /* We allow more than three sections internally */
+ /* We allow more than three sections internally. */
return true;
}
asection *sec;
/* This is a debugging symbol. */
-
cache_ptr->symbol.flags = BSF_DEBUGGING;
/* Work out the symbol section. */
return false;
}
- /* Turn the symbol from section relative to absolute again */
+ /* Turn the symbol from section relative to absolute again. */
value += sec->vma + off;
if ((cache_ptr->flags & BSF_WARNING) != 0)
if ((cache_ptr->flags & BSF_CONSTRUCTOR) != 0)
{
int type = ((aout_symbol_type *) cache_ptr)->type;
+
switch (type)
{
case N_ABS: type = N_SETA; break;
aout_symbol_type *cached;
bfd_size_type cached_size;
- /* If there's no work to be done, don't do any */
+ /* If there's no work to be done, don't do any. */
if (obj_aout_symbols (abfd) != (aout_symbol_type *) NULL)
return true;
return bfd_get_symcount (abfd);
}
\f
-/* Standard reloc stuff */
+/* Standard reloc stuff. */
/* Output standard relocation information to a file in target byte order. */
extern void NAME(aout,swap_std_reloc_out)
PUT_WORD (abfd, g->address, natptr->r_address);
- r_length = g->howto->size ; /* Size as a power of two */
- r_pcrel = (int) g->howto->pc_relative; /* Relative to PC? */
+ r_length = g->howto->size ; /* Size as a power of two. */
+ r_pcrel = (int) g->howto->pc_relative; /* Relative to PC? */
/* XXX This relies on relocs coming from a.out files. */
r_baserel = (g->howto->type & 8) != 0;
r_jmptable = (g->howto->type & 16) != 0;
r_addend = g->addend + (*(g->sym_ptr_ptr))->section->output_section->vma;
#endif
- /* name was clobbered by aout_write_syms to be symbol index */
+ /* Name was clobbered by aout_write_syms to be symbol index. */
/* If this relocation is relative to a symbol then set the
r_index to the symbols index, and the r_extern bit.
Absolute symbols can come in in two ways, either as an offset
from the abs section, or as a symbol which has an abs value.
- check for that here
- */
+ check for that here. */
if (bfd_is_com_section (output_section)
|| bfd_is_abs_section (output_section)
|| bfd_is_und_section (output_section))
{
if (bfd_abs_section_ptr->symbol == sym)
- {
- /* Whoops, looked like an abs symbol, but is really an offset
- from the abs section */
- r_index = N_ABS;
- r_extern = 0;
- }
+ {
+ /* Whoops, looked like an abs symbol, but is
+ really an offset from the abs section. */
+ r_index = N_ABS;
+ r_extern = 0;
+ }
else
- {
- /* Fill in symbol */
- r_extern = 1;
- r_index = (*(g->sym_ptr_ptr))->KEEPIT;
-
- }
+ {
+ /* Fill in symbol. */
+ r_extern = 1;
+ r_index = (*(g->sym_ptr_ptr))->KEEPIT;
+ }
}
else
{
- /* Just an ordinary section */
+ /* Just an ordinary section. */
r_extern = 0;
r_index = output_section->target_index;
}
- /* now the fun stuff */
+ /* Now the fun stuff. */
if (bfd_header_big_endian (abfd))
{
natptr->r_index[0] = r_index >> 16;
}
}
-/* Extended stuff */
+/* Extended stuff. */
/* Output extended relocation information to a file in target byte order. */
extern void NAME(aout,swap_ext_reloc_out)
Absolute symbols can come in in two ways, either as an offset
from the abs section, or as a symbol which has an abs value.
check for that here. */
-
if (bfd_is_abs_section (bfd_get_section (sym)))
{
r_extern = 0;
}
else
{
- /* Just an ordinary section */
+ /* Just an ordinary section. */
r_extern = 0;
r_index = output_section->target_index;
}
- /* now the fun stuff */
+ /* Now the fun stuff. */
if (bfd_header_big_endian (abfd))
{
natptr->r_index[0] = r_index >> 16;
cache_ptr->address = (GET_SWORD (abfd, bytes->r_address));
- /* now the fun stuff */
+ /* Now the fun stuff. */
if (bfd_header_big_endian (abfd))
{
r_index = ((bytes->r_index[0] << 16)
cache_ptr->address = H_GET_32 (abfd, bytes->r_address);
- /* now the fun stuff */
+ /* Now the fun stuff. */
if (bfd_header_big_endian (abfd))
{
r_index = ((bytes->r_index[0] << 16)
return true;
}
-/* This is stupid. This function should be a boolean predicate */
+/* This is stupid. This function should be a boolean predicate. */
+
long
NAME(aout,canonicalize_reloc) (abfd, section, relptr, symbols)
bfd *abfd;
bfd_set_error (bfd_error_invalid_operation);
return -1;
}
+
if (asect->flags & SEC_CONSTRUCTOR)
- {
- return (sizeof (arelent *) * (asect->reloc_count+1));
- }
+ return (sizeof (arelent *) * (asect->reloc_count+1));
if (asect == obj_datasec (abfd))
return (sizeof (arelent *)
return sym;
}
-/*
- provided a BFD, a section and an offset into the section, calculate
- and return the name of the source file and the line nearest to the
- wanted location.
-*/
+/* Provided a BFD, a section and an offset into the section, calculate
+ and return the name of the source file and the line nearest to the
+ wanted location. */
boolean
NAME(aout,find_nearest_line)
const char **functionname_ptr;
unsigned int *line_ptr;
{
- /* Run down the file looking for the filename, function and linenumber */
+ /* Run down the file looking for the filename, function and linenumber. */
asymbol **p;
const char *directory_name = NULL;
const char *main_file_name = NULL;
*filename_ptr = abfd->filename;
*functionname_ptr = 0;
*line_ptr = 0;
+
if (symbols != (asymbol **)NULL)
{
for (p = symbols; *p; p++)
break;
case N_FUN:
{
- /* We'll keep this if it is nearer than the one we have already */
+ /* We'll keep this if it is nearer than the one we have already. */
if (q->symbol.value >= low_func_vma &&
- q->symbol.value <= offset) {
- low_func_vma = q->symbol.value;
- func = (asymbol *)q;
- }
+ q->symbol.value <= offset)
+ {
+ low_func_vma = q->symbol.value;
+ func = (asymbol *)q;
+ }
else if (q->symbol.value > offset)
goto done;
}
filelen = 0;
else
filelen = strlen (directory_name) + strlen (main_file_name);
+
if (func == NULL)
funclen = 0;
else
if (adata (abfd).line_buf != NULL)
free (adata (abfd).line_buf);
+
if (filelen + funclen == 0)
adata (abfd).line_buf = buf = NULL;
else
buf[0] = bfd_get_symbol_leading_char (abfd);
strcpy (buf + 1, function);
}
- /* Have to remove : stuff */
+ /* Have to remove : stuff. */
colon = strchr (buf, ':');
if (colon != NULL)
*colon = '\0';
{
/* This object file defines this symbol. We must link it
in. This is true regardless of whether the current
- definition of the symbol is undefined or common. If the
- current definition is common, we have a case in which we
- have already seen an object file including
+ definition of the symbol is undefined or common.
+
+ If the current definition is common, we have a case in
+ which we have already seen an object file including:
int a;
- and this object file from the archive includes
+ and this object file from the archive includes:
int a = 5;
- In such a case we must include this object file.
+ In such a case, whether to include this object is target
+ dependant for backward compatability.
FIXME: The SunOS 4.1.3 linker will pull in the archive
element if the symbol is defined in the .data section,
but not if it is defined in the .text section. That
- seems a bit crazy to me, and I haven't implemented it.
- However, it might be correct. */
+ seems a bit crazy to me, and it has not been implemented
+ yet. However, it might be correct. */
+ if (h->type == bfd_link_hash_common)
+ {
+ int skip = 0;
+
+ switch (info->common_skip_ar_aymbols)
+ {
+ case bfd_link_common_skip_text:
+ skip = (type == (N_TEXT | N_EXT));
+ break;
+ case bfd_link_common_skip_data:
+ skip = (type == (N_DATA | N_EXT));
+ break;
+ default:
+ case bfd_link_common_skip_all:
+ skip = 1;
+ break;
+ }
+
+ if (skip)
+ continue;
+ }
+
if (! (*info->callbacks->add_archive_element) (info, abfd, name))
return false;
*pneeded = true;
/* Use the name from the hash table, in case the symbol was
wrapped. */
- if (h != NULL)
+ if (h != NULL
+ && h->root.type != bfd_link_hash_warning)
name = h->root.root.string;
/* If this is an indirect or warning symbol, then change
/* If the symbol has already been written out, skip it. */
if (h != (struct aout_link_hash_entry *) NULL
- && h->root.type != bfd_link_hash_warning
&& h->written)
{
if ((type & N_TYPE) == N_INDR
char armag[SARMAG + 1];
bfd_size_type amt;
- tdata_hold = abfd->tdata.aout_ar_data;
-
if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG)
{
if (bfd_get_error () != bfd_error_system_call)
return 0;
#endif
- /* We are setting bfd_ardata(abfd) here, but since bfd_ardata
- involves a cast, we can't do it as the left operand of assignment. */
- amt = sizeof (struct artdata);
- abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
+ tdata_hold = bfd_ardata (abfd);
+ amt = sizeof (struct artdata);
+ bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd) == NULL)
- return NULL;
+ {
+ bfd_ardata (abfd) = tdata_hold;
+ return NULL;
+ }
bfd_ardata (abfd)->first_file_filepos = SARMAG;
bfd_ardata (abfd)->cache = NULL;
bfd_ardata (abfd)->extended_names = NULL;
bfd_ardata (abfd)->tdata = NULL;
- if (!BFD_SEND (abfd, _bfd_slurp_armap, (abfd)))
+ if (!BFD_SEND (abfd, _bfd_slurp_armap, (abfd))
+ || !BFD_SEND (abfd, _bfd_slurp_extended_name_table, (abfd)))
{
- bfd_release (abfd, bfd_ardata (abfd));
- abfd->tdata.aout_ar_data = tdata_hold;
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return NULL;
- }
-
- if (!BFD_SEND (abfd, _bfd_slurp_extended_name_table, (abfd)))
- {
bfd_release (abfd, bfd_ardata (abfd));
- abfd->tdata.aout_ar_data = tdata_hold;
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
+ bfd_ardata (abfd) = tdata_hold;
return NULL;
}
release bfd_ardata. FIXME. */
(void) bfd_close (first);
bfd_release (abfd, bfd_ardata (abfd));
- abfd->tdata.aout_ar_data = tdata_hold;
#endif
bfd_set_error (bfd_error_wrong_object_format);
+ bfd_ardata (abfd) = tdata_hold;
return NULL;
}
/* And we ought to close `first' here too. */
boolean, asymbol **));
boolean
-bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
+bfd_alt_mach_code PARAMS ((bfd *abfd, int alternative));
/* Extracted from archive.c. */
symindex
bfd_alt_mach_code
SYNOPSIS
- boolean bfd_alt_mach_code(bfd *abfd, int index);
+ boolean bfd_alt_mach_code(bfd *abfd, int alternative);
DESCRIPTION
When more than one machine code number is available for the
same machine type, this function can be used to switch between
- the preferred one (index == 0) and any others. Currently,
+ the preferred one (alternative == 0) and any others. Currently,
only ELF supports this feature, with up to two alternate
machine codes.
*/
boolean
-bfd_alt_mach_code (abfd, index)
+bfd_alt_mach_code (abfd, alternative)
bfd *abfd;
- int index;
+ int alternative;
{
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
{
int code;
- switch (index)
+ switch (alternative)
{
case 0:
code = get_elf_backend_data (abfd)->elf_machine_code;
#define coff_bfd_reloc_type_lookup _bfd_xcoff_reloc_type_lookup
#ifdef AIX_CORE
extern const bfd_target * rs6000coff_core_p PARAMS ((bfd *abfd));
-extern boolean rs6000coff_core_file_matches_executable_p
+extern boolean rs6000coff_core_file_matches_executable_p
PARAMS ((bfd *cbfd, bfd *ebfd));
extern char *rs6000coff_core_file_failing_command PARAMS ((bfd *abfd));
extern int rs6000coff_core_file_failing_signal PARAMS ((bfd *abfd));
PARAMS ((bfd *, struct internal_ldhdr *));
static bfd_vma xcoff_loader_reloc_offset
PARAMS ((bfd *, struct internal_ldhdr *));
-static boolean xcoff_generate_rtinit
- PARAMS((bfd *, const char *, const char *, boolean));
-static boolean do_pad PARAMS((bfd *, unsigned int));
-static boolean do_copy PARAMS((bfd *, bfd *));
+static boolean xcoff_generate_rtinit
+ PARAMS ((bfd *, const char *, const char *, boolean));
+static boolean do_pad PARAMS ((bfd *, unsigned int));
+static boolean do_copy PARAMS ((bfd *, bfd *));
static boolean do_shared_object_padding PARAMS ((bfd *, bfd *, ufile_ptr *, int));
/* Relocation functions */
static boolean xcoff_reloc_type_br PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
-static boolean xcoff_complain_overflow_dont_func
+static boolean xcoff_complain_overflow_dont_func
PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
static boolean xcoff_complain_overflow_bitfield_func
PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
boolean (*xcoff_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
- (XCOFF_RELOC_FUNCTION_ARGS) =
+ PARAMS ((XCOFF_RELOC_FUNCTION_ARGS)) =
{
- xcoff_reloc_type_pos, /* R_POS (0x00) */
- xcoff_reloc_type_neg, /* R_NEG (0x01) */
- xcoff_reloc_type_rel, /* R_REL (0x02) */
- xcoff_reloc_type_toc, /* R_TOC (0x03) */
+ xcoff_reloc_type_pos, /* R_POS (0x00) */
+ xcoff_reloc_type_neg, /* R_NEG (0x01) */
+ xcoff_reloc_type_rel, /* R_REL (0x02) */
+ xcoff_reloc_type_toc, /* R_TOC (0x03) */
xcoff_reloc_type_fail, /* R_RTB (0x04) */
- xcoff_reloc_type_toc, /* R_GL (0x05) */
- xcoff_reloc_type_toc, /* R_TCL (0x06) */
- xcoff_reloc_type_fail, /* (0x07) */
- xcoff_reloc_type_ba, /* R_BA (0x08) */
- xcoff_reloc_type_fail, /* (0x09) */
- xcoff_reloc_type_br, /* R_BR (0x0a) */
- xcoff_reloc_type_fail, /* (0x0b) */
- xcoff_reloc_type_pos, /* R_RL (0x0c) */
- xcoff_reloc_type_pos, /* R_RLA (0x0d) */
- xcoff_reloc_type_fail, /* (0x0e) */
+ xcoff_reloc_type_toc, /* R_GL (0x05) */
+ xcoff_reloc_type_toc, /* R_TCL (0x06) */
+ xcoff_reloc_type_fail, /* (0x07) */
+ xcoff_reloc_type_ba, /* R_BA (0x08) */
+ xcoff_reloc_type_fail, /* (0x09) */
+ xcoff_reloc_type_br, /* R_BR (0x0a) */
+ xcoff_reloc_type_fail, /* (0x0b) */
+ xcoff_reloc_type_pos, /* R_RL (0x0c) */
+ xcoff_reloc_type_pos, /* R_RLA (0x0d) */
+ xcoff_reloc_type_fail, /* (0x0e) */
xcoff_reloc_type_noop, /* R_REF (0x0f) */
- xcoff_reloc_type_fail, /* (0x10) */
- xcoff_reloc_type_fail, /* (0x11) */
- xcoff_reloc_type_toc, /* R_TRL (0x12) */
- xcoff_reloc_type_toc, /* R_TRLA (0x13) */
+ xcoff_reloc_type_fail, /* (0x10) */
+ xcoff_reloc_type_fail, /* (0x11) */
+ xcoff_reloc_type_toc, /* R_TRL (0x12) */
+ xcoff_reloc_type_toc, /* R_TRLA (0x13) */
xcoff_reloc_type_fail, /* R_RRTBI (0x14) */
xcoff_reloc_type_fail, /* R_RRTBA (0x15) */
- xcoff_reloc_type_ba, /* R_CAI (0x16) */
+ xcoff_reloc_type_ba, /* R_CAI (0x16) */
xcoff_reloc_type_crel, /* R_CREL (0x17) */
- xcoff_reloc_type_ba, /* R_RBA (0x18) */
- xcoff_reloc_type_ba, /* R_RBAC (0x19) */
- xcoff_reloc_type_br, /* R_RBR (0x1a) */
- xcoff_reloc_type_ba, /* R_RBRC (0x1b) */
+ xcoff_reloc_type_ba, /* R_RBA (0x18) */
+ xcoff_reloc_type_ba, /* R_RBAC (0x19) */
+ xcoff_reloc_type_br, /* R_RBR (0x1a) */
+ xcoff_reloc_type_ba, /* R_RBRC (0x1b) */
};
boolean (*xcoff_complain_overflow[XCOFF_MAX_COMPLAIN_OVERFLOW])
- (XCOFF_COMPLAIN_FUNCTION_ARGS) =
+ PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS)) =
{
xcoff_complain_overflow_dont_func,
xcoff_complain_overflow_bitfield_func,
\f
void
_bfd_xcoff_swap_sym_in (abfd, ext1, in1)
- bfd *abfd;
+ bfd *abfd;
PTR ext1;
PTR in1;
{
if (ext->e.e_name[0] != 0)
{
- memcpy(in->_n._n_name, ext->e.e_name, SYMNMLEN);
+ memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
}
else
{
unsigned int
_bfd_xcoff_swap_sym_out (abfd, inp, extp)
- bfd *abfd;
- PTR inp;
- PTR extp;
+ bfd *abfd;
+ PTR inp;
+ PTR extp;
{
struct internal_syment *in = (struct internal_syment *)inp;
SYMENT *ext =(SYMENT *)extp;
if (in->_n._n_name[0] != 0)
{
- memcpy(ext->e.e_name, in->_n._n_name, SYMNMLEN);
+ memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
}
else
{
void
_bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
- bfd *abfd;
- PTR ext1;
- int type;
- int class;
- int indx;
- int numaux;
- PTR in1;
+ bfd *abfd;
+ PTR ext1;
+ int type;
+ int class;
+ int indx;
+ int numaux;
+ PTR in1;
{
AUXENT * ext = (AUXENT *)ext1;
union internal_auxent *in = (union internal_auxent *)in1;
in->x_scn.x_nreloc = H_GET_16 (abfd, ext->x_scn.x_nreloc);
in->x_scn.x_nlinno = H_GET_16 (abfd, ext->x_scn.x_nlinno);
/* PE defines some extra fields; we zero them out for
- safety. */
+ safety. */
in->x_scn.x_checksum = 0;
in->x_scn.x_associated = 0;
in->x_scn.x_comdat = 0;
union internal_auxent *in = (union internal_auxent *)inp;
AUXENT *ext = (AUXENT *)extp;
- memset((PTR)ext, 0, bfd_coff_auxesz (abfd));
+ memset ((PTR)ext, 0, bfd_coff_auxesz (abfd));
switch (class)
{
case C_FILE:
reloc_howto_type xcoff_howto_table[] =
{
/* Standard 32 bit relocation. */
- HOWTO (R_POS, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_POS, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_POS", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_POS", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
/* 32 bit relocation, but store negative value. */
- HOWTO (R_NEG, /* type */
- 0, /* rightshift */
- -2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_NEG, /* type */
+ 0, /* rightshift */
+ -2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_NEG", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_NEG", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
/* 32 bit PC relative relocation. */
- HOWTO (R_REL, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_REL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_REL", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
/* 16 bit TOC relative relocation. */
- HOWTO (R_TOC, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_TOC, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TOC", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_TOC", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
/* I don't really know what this is. */
- HOWTO (R_RTB, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RTB, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RTB", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RTB", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
/* External TOC relative symbol. */
- HOWTO (R_GL, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_GL, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_GL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
-
- /* Local TOC relative symbol. */
- HOWTO (R_TCL, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ 0, /* special_function */
+ "R_GL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Local TOC relative symbol. */
+ HOWTO (R_TCL, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TCL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_TCL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
EMPTY_HOWTO (7),
/* Non modifiable absolute branch. */
- HOWTO (R_BA, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_BA, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_BA_26", /* name */
- true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_BA_26", /* name */
+ true, /* partial_inplace */
+ 0x03fffffc, /* src_mask */
+ 0x03fffffc, /* dst_mask */
+ false), /* pcrel_offset */
EMPTY_HOWTO (9),
/* Non modifiable relative branch. */
- HOWTO (R_BR, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_BR, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_BR", /* name */
- true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_BR", /* name */
+ true, /* partial_inplace */
+ 0x03fffffc, /* src_mask */
+ 0x03fffffc, /* dst_mask */
+ false), /* pcrel_offset */
EMPTY_HOWTO (0xb),
/* Indirect load. */
- HOWTO (R_RL, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RL, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
/* Load address. */
- HOWTO (R_RLA, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RLA, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RLA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RLA", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
EMPTY_HOWTO (0xe),
/* Non-relocating reference. */
- HOWTO (R_REF, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_REF", /* name */
- false, /* partial_inplace */
- 0, /* src_mask */
- 0, /* dst_mask */
- false), /* pcrel_offset */
+ HOWTO (R_REF, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ 0, /* special_function */
+ "R_REF", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
EMPTY_HOWTO (0x10),
EMPTY_HOWTO (0x11),
/* TOC relative indirect load. */
- HOWTO (R_TRL, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_TRL, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TRL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_TRL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
/* TOC relative load address. */
- HOWTO (R_TRLA, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_TRLA, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_TRLA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_TRLA", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
/* Modifiable relative branch. */
- HOWTO (R_RRTBI, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RRTBI, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RRTBI", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RRTBI", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
/* Modifiable absolute branch. */
- HOWTO (R_RRTBA, /* type */
- 1, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RRTBA, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RRTBA", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RRTBA", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
/* Modifiable call absolute indirect. */
- HOWTO (R_CAI, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_CAI, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_CAI", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_CAI", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
/* Modifiable call relative. */
- HOWTO (R_CREL, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_CREL, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_CREL", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_CREL", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
/* Modifiable branch absolute. */
- HOWTO (R_RBA, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RBA, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBA", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RBA", /* name */
+ true, /* partial_inplace */
+ 0x03fffffc, /* src_mask */
+ 0x03fffffc, /* dst_mask */
+ false), /* pcrel_offset */
/* Modifiable branch absolute. */
- HOWTO (R_RBAC, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RBAC, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBAC", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RBAC", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
/* Modifiable branch relative. */
- HOWTO (R_RBR, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 26, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RBR, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBR_26", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RBR_26", /* name */
+ true, /* partial_inplace */
+ 0x03fffffc, /* src_mask */
+ 0x03fffffc, /* dst_mask */
+ false), /* pcrel_offset */
/* Modifiable branch absolute. */
- HOWTO (R_RBRC, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RBRC, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBRC", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RBRC", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
/* 16 bit Non modifiable absolute branch. */
- HOWTO (R_BA, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_BA, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_BA_16", /* name */
- true, /* partial_inplace */
- 0xfffc, /* src_mask */
- 0xfffc, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_BA_16", /* name */
+ true, /* partial_inplace */
+ 0xfffc, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
/* Modifiable branch relative. */
- HOWTO (R_RBR, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RBR, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBR_16", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RBR_16", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
/* Modifiable branch relative. */
- HOWTO (R_RBA, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RBA, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBA_16", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RBA_16", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
};
/* Default howto layout works most of the time */
relent->howto = &xcoff_howto_table[internal->r_type];
-
+
/* Special case some 16 bit reoloc */
if (15 == (internal->r_size & 0x1f))
{
- if (R_BA == internal->r_type)
+ if (R_BA == internal->r_type)
relent->howto = &xcoff_howto_table[0x1c];
- else if (R_RBR == internal->r_type)
+ else if (R_RBR == internal->r_type)
relent->howto = &xcoff_howto_table[0x1d];
- else if (R_RBA == internal->r_type)
+ else if (R_RBA == internal->r_type)
relent->howto = &xcoff_howto_table[0x1e];
}
-
+
/* The r_size field of an XCOFF reloc encodes the bitsize of the
relocation, as well as indicating whether it is signed or not.
Doublecheck that the relocation information gathered from the
&& (relent->howto->bitsize
!= ((unsigned int) internal->r_size & 0x1f) + 1))
abort ();
-
- /* Put a meaningful value in addend */
- relent->addend = (internal->r_size & 0x80) ? - internal->r_vaddr
- : internal->r_vaddr;
}
reloc_howto_type *
_bfd_xcoff_archive_p (abfd)
bfd *abfd;
{
+ struct artdata *tdata_hold;
char magic[SXCOFFARMAG];
- bfd_size_type amt;
+ bfd_size_type amt = SXCOFFARMAG;
- if (bfd_bread ((PTR) magic, (bfd_size_type) SXCOFFARMAG, abfd) != SXCOFFARMAG)
+ if (bfd_bread ((PTR) magic, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
- /* We are setting bfd_ardata(abfd) here, but since bfd_ardata
- involves a cast, we can't do it as the left operand of
- assignment. */
+ tdata_hold = bfd_ardata (abfd);
+
amt = sizeof (struct artdata);
- abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
+ bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd) == (struct artdata *) NULL)
- return NULL;
+ goto error_ret_restore;
bfd_ardata (abfd)->cache = NULL;
bfd_ardata (abfd)->archive_head = NULL;
memcpy (hdr.magic, magic, SXCOFFARMAG);
/* Now read the rest of the file header. */
- if (bfd_bread ((PTR) &hdr.memoff,
- (bfd_size_type) SIZEOF_AR_FILE_HDR - SXCOFFARMAG, abfd)
- != SIZEOF_AR_FILE_HDR - SXCOFFARMAG)
+ amt = SIZEOF_AR_FILE_HDR - SXCOFFARMAG;
+ if (bfd_bread ((PTR) &hdr.memoff, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return NULL;
+ goto error_ret;
}
bfd_ardata (abfd)->first_file_filepos = strtol (hdr.firstmemoff,
amt = SIZEOF_AR_FILE_HDR;
bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd)->tdata == NULL)
- return NULL;
+ goto error_ret;
memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR);
}
memcpy (hdr.magic, magic, SXCOFFARMAG);
/* Now read the rest of the file header. */
- if (bfd_bread ((PTR) &hdr.memoff,
- (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG, abfd)
- != SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG)
+ amt = SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG;
+ if (bfd_bread ((PTR) &hdr.memoff, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return NULL;
+ goto error_ret;
}
- /* XXX This actually has to be a call to strtoll (at least on 32-bit
- machines) since the field width is 20 and there numbers with more
- than 32 bits can be represented. */
- bfd_ardata (abfd)->first_file_filepos = strtol (hdr.firstmemoff,
- (char **) NULL, 10);
+ bfd_ardata (abfd)->first_file_filepos = bfd_scan_vma (hdr.firstmemoff,
+ (const char **) 0,
+ 10);
amt = SIZEOF_AR_FILE_HDR_BIG;
bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd)->tdata == NULL)
- return NULL;
+ goto error_ret;
memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR_BIG);
}
if (! _bfd_xcoff_slurp_armap (abfd))
{
+ error_ret:
bfd_release (abfd, bfd_ardata (abfd));
- abfd->tdata.aout_ar_data = (struct artdata *) NULL;
+ error_ret_restore:
+ bfd_ardata (abfd) = tdata_hold;
return NULL;
}
#define PRINT12(d, v) \
sprintf (buff20, FMT12, (int)(v)), \
- memcpy ((void *) (d), buff20, 12)
+ memcpy ((void *) (d), buff20, 12)
#define PRINT12_OCTAL(d, v) \
sprintf (buff20, FMT12_OCTAL, (unsigned int)(v)), \
#define PRINT4(d, v) \
sprintf (buff20, FMT4, (int)(v)), \
- memcpy ((void *) (d), buff20, 4)
+ memcpy ((void *) (d), buff20, 4)
#define READ20(d, v) \
buff20[20] = 0, \
if (remaining)
{
- if (bfd_bread (buffer, remaining, in_bfd) != remaining
+ if (bfd_bread (buffer, remaining, in_bfd) != remaining
|| bfd_bwrite (buffer, remaining, out_bfd) != remaining)
return false;
}
return true;
}
-static boolean
+static boolean
do_shared_object_padding (out_bfd, in_bfd, offset, ar_header_size)
bfd *out_bfd;
bfd *in_bfd;
bfd *current_bfd;
size_t string_length;
ufile_ptr nextoff, prevoff;
-
+
/* First, we look through the symbols and work out which are
from 32-bit objects and which from 64-bit ones. */
sym_32 = sym_64 = str_32 = str_64 = 0;
BFD_ASSERT (nextoff == bfd_tell (abfd));
- /* Write out the symbol table.
- Layout :
-
+ /* Write out the symbol table.
+ Layout :
+
standard big archive header
- 0x0000 ar_size [0x14]
- 0x0014 ar_nxtmem [0x14]
- 0x0028 ar_prvmem [0x14]
- 0x003C ar_date [0x0C]
- 0x0048 ar_uid [0x0C]
- 0x0054 ar_gid [0x0C]
- 0x0060 ar_mod [0x0C]
- 0x006C ar_namelen[0x04]
- 0x0070 ar_fmag [SXCOFFARFMAG]
-
- Symbol table
- 0x0072 num_syms [0x08], binary
- 0x0078 offsets [0x08 * num_syms], binary
- 0x0086 + 0x08 * num_syms names [??]
- ?? pad to even bytes.
+ 0x0000 ar_size [0x14]
+ 0x0014 ar_nxtmem [0x14]
+ 0x0028 ar_prvmem [0x14]
+ 0x003C ar_date [0x0C]
+ 0x0048 ar_uid [0x0C]
+ 0x0054 ar_gid [0x0C]
+ 0x0060 ar_mod [0x0C]
+ 0x006C ar_namelen[0x04]
+ 0x0070 ar_fmag [SXCOFFARFMAG]
+
+ Symbol table
+ 0x0072 num_syms [0x08], binary
+ 0x0078 offsets [0x08 * num_syms], binary
+ 0x0086 + 0x08 * num_syms names [??]
+ ?? pad to even bytes.
*/
- if (sym_32)
+ if (sym_32)
{
struct xcoff_ar_hdr_big *hdr;
bfd_byte *symbol_table;
bfd_byte *st;
file_ptr fileoff;
- bfd_vma symbol_table_size =
+ bfd_vma symbol_table_size =
SIZEOF_AR_HDR_BIG
+ SXCOFFARFMAG
- + 8
- + 8 * sym_32
+ + 8
+ + 8 * sym_32
+ str_32 + (str_32 & 1);
symbol_table = NULL;
return false;
hdr = (struct xcoff_ar_hdr_big *) symbol_table;
-
+
PRINT20 (hdr->size, 8 + 8 * sym_32 + str_32 + (str_32 & 1));
-
+
if (sym_64)
PRINT20 (hdr->nextoff, nextoff + symbol_table_size);
else
bfd_h_put_64 (abfd, sym_32, st);
st += 8;
-
+
/* loop over the 32 bit offsets */
current_bfd = abfd->archive_head;
if (current_bfd != NULL)
prevoff = nextoff;
nextoff = nextoff + symbol_table_size;
}
- else
+ else
PRINT20 (fhdr->symoff, 0);
-
- if (sym_64)
+
+ if (sym_64)
{
struct xcoff_ar_hdr_big *hdr;
bfd_byte *symbol_table;
bfd_byte *st;
file_ptr fileoff;
- bfd_vma symbol_table_size =
+ bfd_vma symbol_table_size =
SIZEOF_AR_HDR_BIG
+ SXCOFFARFMAG
- + 8
- + 8 * sym_64
+ + 8
+ + 8 * sym_64
+ str_64 + (str_64 & 1);
symbol_table = NULL;
bfd_h_put_64 (abfd, sym_64, st);
st += 8;
-
+
/* loop over the 64 bit offsets */
current_bfd = abfd->archive_head;
if (current_bfd != NULL)
PRINT20 (fhdr->symoff64, nextoff);
}
- else
+ else
PRINT20 (fhdr->symoff64, 0);
-
+
return true;
}
sprintf (ahdrp->namlen, "%ld", (long) namlen);
/* If the length of the name is odd, we write out the null byte
- after the name as well. */
+ after the name as well. */
namlen = (namlen + 1) &~ (bfd_size_type) 1;
remaining = arelt_size (sub);
if (! do_copy (abfd, sub))
return false;
-
+
if (! do_pad (abfd, size & 1))
return false;
}
sprintf (fhdr.memoff, "%ld", (long) nextoff);
memset (&ahdr, 0, sizeof ahdr);
- sprintf (ahdr.size, "%ld", (long) (XCOFFARMAG_ELEMENT_SIZE +
- count * XCOFFARMAG_ELEMENT_SIZE +
- total_namlen));
+ sprintf (ahdr.size, "%ld", (long) (XCOFFARMAG_ELEMENT_SIZE
+ + count * XCOFFARMAG_ELEMENT_SIZE
+ + total_namlen));
sprintf (ahdr.prevoff, "%ld", (long) prevoff);
sprintf (ahdr.date, "%d", 0);
sprintf (ahdr.uid, "%d", 0);
for (i = 0; i < (size_t) count; i++)
{
sprintf (decbuf, "%-12ld", (long) offsets[i]);
- if (bfd_bwrite ((PTR) decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE,
+ if (bfd_bwrite ((PTR) decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE,
abfd) != XCOFFARMAG_ELEMENT_SIZE)
return false;
}
if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR_BIG, SEEK_SET) != 0)
return false;
-
+
/* Calculate count and total_namlen. */
makemap = bfd_has_map (abfd);
hasobjects = false;
- for (current_bfd = abfd->archive_head, count = 0, total_namlen = 0;
- current_bfd != NULL;
+ for (current_bfd = abfd->archive_head, count = 0, total_namlen = 0;
+ current_bfd != NULL;
current_bfd = current_bfd->next, count++)
{
total_namlen += strlen (normalize_filename (current_bfd)) + 1;
prevoff = 0;
nextoff = SIZEOF_AR_FILE_HDR_BIG;
- for (current_bfd = abfd->archive_head, i = 0;
- current_bfd != NULL;
+ for (current_bfd = abfd->archive_head, i = 0;
+ current_bfd != NULL;
current_bfd = current_bfd->next, i++)
{
const char *name;
ahdrp = &ahdr;
/* XXX This should actually be a call to stat64 (at least on
- 32-bit machines).
+ 32-bit machines).
XXX This call will fail if the original object is not found. */
if (stat (bfd_get_filename (current_bfd), &s) != 0)
{
PRINT4 (ahdrp->namlen, namlen);
/* If the length of the name is odd, we write out the null byte
- after the name as well. */
+ after the name as well. */
namlen = (namlen + 1) &~ (bfd_size_type) 1;
remaining = arelt_size (current_bfd);
Their text section needs to be aligned wrt the archive file position.
This requires extra padding before the archive header. */
if (! do_shared_object_padding (abfd, current_bfd, & nextoff,
- SIZEOF_AR_HDR_BIG + namlen
+ SIZEOF_AR_HDR_BIG + namlen
+ SXCOFFARFMAG))
return false;
if ((bfd_bwrite ((PTR) ahdrp, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
!= SIZEOF_AR_HDR_BIG)
|| bfd_bwrite ((PTR) name, (bfd_size_type) namlen, abfd) != namlen
- || (bfd_bwrite ((PTR) XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG,
+ || (bfd_bwrite ((PTR) XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG,
abfd) != SXCOFFARFMAG))
return false;
return false;
if (! do_copy (abfd, current_bfd))
- return false;
-
+ return false;
+
if (! do_pad (abfd, size & 1))
return false;
}
PRINT20 (fhdr.lastmemoff, prevoff);
}
- /* Write out the member table.
- Layout :
+ /* Write out the member table.
+ Layout :
standard big archive header
- 0x0000 ar_size [0x14]
- 0x0014 ar_nxtmem [0x14]
- 0x0028 ar_prvmem [0x14]
- 0x003C ar_date [0x0C]
- 0x0048 ar_uid [0x0C]
- 0x0054 ar_gid [0x0C]
- 0x0060 ar_mod [0x0C]
- 0x006C ar_namelen[0x04]
- 0x0070 ar_fmag [0x02]
-
- Member table
- 0x0072 count [0x14]
- 0x0086 offsets [0x14 * counts]
- 0x0086 + 0x14 * counts names [??]
- ?? pad to even bytes.
+ 0x0000 ar_size [0x14]
+ 0x0014 ar_nxtmem [0x14]
+ 0x0028 ar_prvmem [0x14]
+ 0x003C ar_date [0x0C]
+ 0x0048 ar_uid [0x0C]
+ 0x0054 ar_gid [0x0C]
+ 0x0060 ar_mod [0x0C]
+ 0x006C ar_namelen[0x04]
+ 0x0070 ar_fmag [0x02]
+
+ Member table
+ 0x0072 count [0x14]
+ 0x0086 offsets [0x14 * counts]
+ 0x0086 + 0x14 * counts names [??]
+ ?? pad to even bytes.
*/
BFD_ASSERT (nextoff == bfd_tell (abfd));
hdr = (struct xcoff_ar_hdr_big *) member_table;
- PRINT20 (hdr->size, (XCOFFARMAGBIG_ELEMENT_SIZE +
- count * XCOFFARMAGBIG_ELEMENT_SIZE +
- total_namlen + (total_namlen & 1)));
- if (makemap && hasobjects)
+ PRINT20 (hdr->size, (XCOFFARMAGBIG_ELEMENT_SIZE
+ + count * XCOFFARMAGBIG_ELEMENT_SIZE
+ + total_namlen + (total_namlen & 1)));
+ if (makemap && hasobjects)
PRINT20 (hdr->nextoff, nextoff + member_table_size);
else
PRINT20 (hdr->nextoff, 0);
PRINT12 (hdr->gid, 0);
PRINT12 (hdr->mode, 0);
PRINT4 (hdr->namlen, 0);
-
+
mt = member_table + SIZEOF_AR_HDR_BIG;
memcpy (mt, XCOFFARFMAG, SXCOFFARFMAG);
mt += SXCOFFARFMAG;
mt += XCOFFARMAGBIG_ELEMENT_SIZE;
}
- if (count)
+ if (count)
{
free (offsets);
offsets = NULL;
}
- for (current_bfd = abfd->archive_head; current_bfd != NULL;
+ for (current_bfd = abfd->archive_head; current_bfd != NULL;
current_bfd = current_bfd->next)
{
const char *name;
size_t namlen;
name = normalize_filename (current_bfd);
- namlen = sprintf(mt, "%s", name);
+ namlen = sprintf (mt, "%s", name);
mt += namlen + 1;
}
-
+
if (bfd_bwrite (member_table, member_table_size, abfd) != member_table_size)
return false;
/* Write out the armap, if appropriate. */
- if (! makemap || ! hasobjects)
+ if (! makemap || ! hasobjects)
PRINT20 (fhdr.symoff, 0);
else
{
/* Save nextoff in fhdr.symoff so the armap routine can use it. */
PRINT20 (fhdr.symoff, nextoff);
-
+
bfd_ardata (abfd)->tdata = (PTR) &fhdr;
if (! _bfd_compute_and_write_armap (abfd, 0))
return false;
/* Write out the archive file header. */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
- || (bfd_bwrite ((PTR) &fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG,
+ || (bfd_bwrite ((PTR) &fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG,
abfd) != SIZEOF_AR_FILE_HDR_BIG))
return false;
-
+
return true;
}
}
\f
-boolean
-xcoff_reloc_type_noop (input_bfd, input_section, output_bfd, rel, sym, howto,
+boolean
+xcoff_reloc_type_noop (input_bfd, input_section, output_bfd, rel, sym, howto,
val, addend, relocation, contents)
bfd *input_bfd ATTRIBUTE_UNUSED;
asection *input_section ATTRIBUTE_UNUSED;
return true;
}
-boolean
-xcoff_reloc_type_fail (input_bfd, input_section, output_bfd, rel, sym, howto,
+boolean
+xcoff_reloc_type_fail (input_bfd, input_section, output_bfd, rel, sym, howto,
val, addend, relocation, contents)
bfd *input_bfd;
asection *input_section ATTRIBUTE_UNUSED;
return false;
}
-boolean
-xcoff_reloc_type_pos (input_bfd, input_section, output_bfd, rel, sym, howto,
+boolean
+xcoff_reloc_type_pos (input_bfd, input_section, output_bfd, rel, sym, howto,
val, addend, relocation, contents)
bfd *input_bfd ATTRIBUTE_UNUSED;
asection *input_section ATTRIBUTE_UNUSED;
return true;
}
-boolean
-xcoff_reloc_type_neg (input_bfd, input_section, output_bfd, rel, sym, howto,
+boolean
+xcoff_reloc_type_neg (input_bfd, input_section, output_bfd, rel, sym, howto,
val, addend, relocation, contents)
bfd *input_bfd ATTRIBUTE_UNUSED;
asection *input_section ATTRIBUTE_UNUSED;
return true;
}
-boolean
-xcoff_reloc_type_rel (input_bfd, input_section, output_bfd, rel, sym, howto,
+boolean
+xcoff_reloc_type_rel (input_bfd, input_section, output_bfd, rel, sym, howto,
val, addend, relocation, contents)
bfd *input_bfd ATTRIBUTE_UNUSED;
asection *input_section;
addend += input_section->vma;
*relocation = val + addend;
- *relocation -= (input_section->output_section->vma +
- input_section->output_offset);
+ *relocation -= (input_section->output_section->vma
+ + input_section->output_offset);
return true;
}
-boolean
-xcoff_reloc_type_toc (input_bfd, input_section, output_bfd, rel, sym, howto,
+boolean
+xcoff_reloc_type_toc (input_bfd, input_section, output_bfd, rel, sym, howto,
val, addend, relocation, contents)
bfd *input_bfd;
asection *input_section ATTRIBUTE_UNUSED;
{
struct xcoff_link_hash_entry *h;
- if (0 > rel->r_symndx)
+ if (0 > rel->r_symndx)
return false;
h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx];
bfd_set_error (bfd_error_bad_value);
return false;
}
-
+
BFD_ASSERT ((h->flags & XCOFF_SET_TOC) == 0);
val = (h->toc_section->output_section->vma
+ h->toc_section->output_offset);
}
-
- *relocation = ((val - xcoff_data (output_bfd)->toc) -
- (sym->n_value - xcoff_data (input_bfd)->toc));
+
+ *relocation = ((val - xcoff_data (output_bfd)->toc)
+ - (sym->n_value - xcoff_data (input_bfd)->toc));
return true;
}
-boolean
-xcoff_reloc_type_ba (input_bfd, input_section, output_bfd, rel, sym, howto,
+boolean
+xcoff_reloc_type_ba (input_bfd, input_section, output_bfd, rel, sym, howto,
val, addend, relocation, contents)
bfd *input_bfd ATTRIBUTE_UNUSED;
asection *input_section ATTRIBUTE_UNUSED;
return true;
}
-static boolean
-xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
+static boolean
+xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
val, addend, relocation, contents)
bfd *input_bfd;
asection *input_section;
{
struct xcoff_link_hash_entry *h;
- if (0 > rel->r_symndx)
+ if (0 > rel->r_symndx)
return false;
h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx];
call is followed by a lwz r2,20(r1), but the call is not
going to global linkage code, we can replace the load with a
cror. */
- if (NULL != h
- && bfd_link_hash_defined == h->root.type
- && (rel->r_vaddr - input_section->vma + 8 <=
- input_section->_cooked_size))
+ if (NULL != h
+ && bfd_link_hash_defined == h->root.type
+ && (rel->r_vaddr - input_section->vma + 8
+ <= input_section->_cooked_size))
{
bfd_byte *pnext;
unsigned long next;
-
+
pnext = contents + (rel->r_vaddr - input_section->vma) + 4;
next = bfd_get_32 (input_bfd, pnext);
-
+
/* The _ptrgl function is magic. It is used by the AIX
compiler to call a function through a pointer. */
if (h->smclas == XMC_GL || strcmp (h->root.root.string, "._ptrgl") == 0)
{
- if (next == 0x4def7b82 /* cror 15,15,15 */
- || next == 0x4ffffb82 /* cror 31,31,31 */
- || next == 0x60000000) /* ori r0,r0,0 */
- bfd_put_32 (input_bfd, 0x80410014, pnext); /* lwz r1,20(r1) */
-
- } else
- {
- if (next == 0x80410014) /* lwz r1,20(r1) */
- bfd_put_32 (input_bfd, 0x60000000, pnext); /* ori r0,r0,0 */
- }
- }
- else if (NULL != h && bfd_link_hash_undefined == h->root.type)
+ if (next == 0x4def7b82 /* cror 15,15,15 */
+ || next == 0x4ffffb82 /* cror 31,31,31 */
+ || next == 0x60000000) /* ori r0,r0,0 */
+ bfd_put_32 (input_bfd, 0x80410014, pnext); /* lwz r1,20(r1) */
+
+ }
+ else
+ {
+ if (next == 0x80410014) /* lwz r1,20(r1) */
+ bfd_put_32 (input_bfd, 0x60000000, pnext); /* ori r0,r0,0 */
+ }
+ }
+ else if (NULL != h && bfd_link_hash_undefined == h->root.type)
{
/* Normally, this relocation is against a defined symbol. In the
case where this is a partial link and the output section offset
- is greater than 2^25, the linker will return an invalid error
+ is greater than 2^25, the linker will return an invalid error
message that the relocation has been truncated. Yes it has been
- truncated but no it not important. For this case, disable the
+ truncated but no it not important. For this case, disable the
overflow checking. */
-
+
howto->complain_on_overflow = complain_overflow_dont;
}
-
+
howto->pc_relative = true;
howto->src_mask &= ~3;
howto->dst_mask = howto->src_mask;
/* A PC relative reloc includes the section address. */
addend += input_section->vma;
-
+
*relocation = val + addend;
- *relocation -= (input_section->output_section->vma +
- input_section->output_offset);
+ *relocation -= (input_section->output_section->vma
+ + input_section->output_offset);
return true;
}
-boolean
-xcoff_reloc_type_crel (input_bfd, input_section, output_bfd, rel, sym, howto,
+boolean
+xcoff_reloc_type_crel (input_bfd, input_section, output_bfd, rel, sym, howto,
val, addend, relocation, contents)
bfd *input_bfd ATTRIBUTE_UNUSED;
asection *input_section;
addend += input_section->vma;
*relocation = val + addend;
- *relocation -= (input_section->output_section->vma +
- input_section->output_offset);
+ *relocation -= (input_section->output_section->vma
+ + input_section->output_offset);
return true;
}
-static boolean
-xcoff_complain_overflow_dont_func (input_bfd, val, relocation, howto)
+static boolean
+xcoff_complain_overflow_dont_func (input_bfd, val, relocation, howto)
bfd *input_bfd ATTRIBUTE_UNUSED;
bfd_vma val ATTRIBUTE_UNUSED;
bfd_vma relocation ATTRIBUTE_UNUSED;
return false;
}
-static boolean
-xcoff_complain_overflow_bitfield_func (input_bfd, val, relocation, howto)
+static boolean
+xcoff_complain_overflow_bitfield_func (input_bfd, val, relocation, howto)
bfd *input_bfd;
bfd_vma val;
bfd_vma relocation;
- struct reloc_howto_struct *howto;
+ struct reloc_howto_struct *howto;
{
bfd_vma addrmask, fieldmask, signmask, ss;
bfd_vma a, b, sum;
-
+
/* Get the values to be added together. For signed and unsigned
relocations, we assume that all values should be truncated to
the size of an address. For bitfields, all the bits matter.
operand. */
a >>= howto->rightshift;
b >>= howto->bitpos;
-
+
/* Bitfields are sometimes used for signed numbers; for
example, a 13-bit field sometimes represents values in
0..8191 and sometimes represents values in -4096..4095.
assumed that it was fully sign extended, and we will keep
that assumption. */
signmask = (fieldmask >> 1) + 1;
-
+
if ((a & ~ fieldmask) != 0)
{
/* Some bits out of the field are set. This might not
return true;
a &= fieldmask;
}
-
+
/* We just assume (b & ~ fieldmask) == 0. */
-
+
/* We explicitly permit wrap around if this relocation
covers the high bit of an address. The Linux kernel
relies on it, and it is the only way to write assembler
if (howto->bitsize + howto->rightshift
== bfd_arch_bits_per_address (input_bfd))
return false;
-
+
sum = a + b;
if (sum < a || (sum & ~ fieldmask) != 0)
{
if (((~ (a ^ b)) & (a ^ sum)) & signmask)
return true;
}
-
+
return false;
}
-static boolean
-xcoff_complain_overflow_signed_func (input_bfd, val, relocation, howto)
+static boolean
+xcoff_complain_overflow_signed_func (input_bfd, val, relocation, howto)
bfd *input_bfd;
bfd_vma val;
bfd_vma relocation;
{
bfd_vma addrmask, fieldmask, signmask, ss;
bfd_vma a, b, sum;
-
+
/* Get the values to be added together. For signed and unsigned
relocations, we assume that all values should be truncated to
the size of an address. For bitfields, all the bits matter.
b = val & howto->src_mask;
a = (a & addrmask) >> howto->rightshift;
-
+
/* If any sign bits are set, all sign bits must be set.
That is, A must be a valid negative address after
shifting. */
ss = a & signmask;
if (ss != 0 && ss != ((addrmask >> howto->rightshift) & signmask))
return true;
-
+
/* We only need this next bit of code if the sign bit of B
is below the sign bit of A. This would only happen if
SRC_MASK had fewer bits than BITSIZE. Note that if
/* Set all the bits above the sign bit. */
b -= signmask <<= 1;
}
-
+
b = (b & addrmask) >> howto->bitpos;
-
+
/* Now we can do the addition. */
sum = a + b;
-
+
/* See if the result has the correct sign. Bits above the
sign bit are junk now; ignore them. If the sum is
positive, make sure we did not have all negative inputs;
signmask = (fieldmask >> 1) + 1;
if (((~ (a ^ b)) & (a ^ sum)) & signmask)
return true;
-
+
return false;
}
-static boolean
-xcoff_complain_overflow_unsigned_func (input_bfd, val, relocation, howto)
+static boolean
+xcoff_complain_overflow_unsigned_func (input_bfd, val, relocation, howto)
bfd *input_bfd;
bfd_vma val;
bfd_vma relocation;
- struct reloc_howto_struct *howto;
+ struct reloc_howto_struct *howto;
{
bfd_vma addrmask, fieldmask;
bfd_vma a, b, sum;
-
+
/* Get the values to be added together. For signed and unsigned
relocations, we assume that all values should be truncated to
the size of an address. For bitfields, all the bits matter.
sum = (a + b) & addrmask;
if ((a | b | sum) & ~ fieldmask)
return true;
-
+
return false;
}
/* This is the relocation function for the RS/6000/POWER/PowerPC.
This is currently the only processor which uses XCOFF; I hope that
- will never change.
+ will never change.
I took the relocation type definitions from two documents:
the PowerPC AIX Version 4 Application Binary Interface, First
Edition (April 1992), and the PowerOpen ABI, Big-Endian
32-Bit Hardware Implementation (June 30, 1994). Differences
- between the documents are noted below.
+ between the documents are noted below.
- Unsupported r_type's
+ Unsupported r_type's
R_RTB:
R_RRTBI:
R_RRTBA:
-
+
These relocs are defined by the PowerPC ABI to be
relative branches which use half of the difference
between the symbol and the program counter. I can't
quite figure out when this is useful. These relocs are
- not defined by the PowerOpen ABI.
+ not defined by the PowerOpen ABI.
Supported r_type's
Simple positive relocation.
R_NEG:
- Simple negative relocation.
+ Simple negative relocation.
R_REL:
Simple PC relative relocation.
R_GL:
GL linkage relocation. The value of this relocation
- is the address of the entry in the TOC section.
+ is the address of the entry in the TOC section.
R_TCL:
Local object TOC address. I can't figure out the
- difference between this and case R_GL.
+ difference between this and case R_GL.
R_TRL:
TOC relative relocation. A TOC relative load instruction
which may be changed to a load address instruction.
- FIXME: We don't currently implement this optimization.
+ FIXME: We don't currently implement this optimization.
R_TRLA:
TOC relative relocation. This is a TOC relative load
R_BA:
Absolute branch. We don't want to mess with the lower
- two bits of the instruction.
+ two bits of the instruction.
R_CAI:
The PowerPC ABI defines this as an absolute call which
may be modified to become a relative call. The PowerOpen
- ABI does not define this relocation type.
-
+ ABI does not define this relocation type.
+
R_RBA:
Absolute branch which may be modified to become a
- relative branch.
+ relative branch.
R_RBAC:
The PowerPC ABI defines this as an absolute branch to a
fixed address which may be modified to an absolute branch
to a symbol. The PowerOpen ABI does not define this
- relocation type.
+ relocation type.
R_RBRC:
The PowerPC ABI defines this as an absolute branch to a
fixed address which may be modified to a relative branch.
- The PowerOpen ABI does not define this relocation type.
+ The PowerOpen ABI does not define this relocation type.
R_BR:
Relative branch. We don't want to mess with the lower
- two bits of the instruction.
+ two bits of the instruction.
R_CREL:
The PowerPC ABI defines this as a relative call which may
be modified to become an absolute call. The PowerOpen
- ABI does not define this relocation type.
+ ABI does not define this relocation type.
R_RBR:
A relative branch which may be modified to become an
absolute branch. FIXME: We don't implement this,
although we should for symbols of storage mapping class
- XMC_XO.
+ XMC_XO.
R_RL:
The PowerPC AIX ABI describes this as a load which may be
changed to a load address. The PowerOpen ABI says this
- is the same as case R_POS.
+ is the same as case R_POS.
R_RLA:
The PowerPC AIX ABI describes this as a load address
which may be changed to a load. The PowerOpen ABI says
- this is the same as R_POS.
+ this is the same as R_POS.
*/
boolean
bfd_byte *location;
/* Relocation type R_REF is a special relocation type which is
- merely used to prevent garbage collection from occurring for
- the csect including the symbol which it references. */
+ merely used to prevent garbage collection from occurring for
+ the csect including the symbol which it references. */
if (rel->r_type == R_REF)
continue;
howto.size = howto.bitsize > 16 ? 2 : 1;
howto.pc_relative = false;
howto.bitpos = 0;
- howto.complain_on_overflow = rel->r_size & 0x80 ?
- complain_overflow_signed : complain_overflow_bitfield;
+ howto.complain_on_overflow = (rel->r_size & 0x80
+ ? complain_overflow_signed
+ : complain_overflow_bitfield);
howto.special_function = NULL;
howto.name = "internal";
howto.partial_inplace = true;
- howto.src_mask = howto.dst_mask = N_ONES(howto.bitsize);
+ howto.src_mask = howto.dst_mask = N_ONES (howto.bitsize);
howto.pcrel_offset = false;
/* symbol */
addend = 0;
h = NULL;
sym = NULL;
- symndx = rel->r_symndx;
+ symndx = rel->r_symndx;
- if (-1 != symndx)
+ if (-1 != symndx)
{
asection *sec;
-
+
h = obj_xcoff_sym_hashes (input_bfd)[symndx];
sym = syms + symndx;
addend = - sym->n_value;
-
- if (NULL == h)
+
+ if (NULL == h)
{
sec = sections[symndx];
/* Hack to make sure we use the right TOC anchor value
+ sec->output_offset
+ sym->n_value
- sec->vma);
- }
- else
+ }
+ else
{
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
{
sec = h->root.u.def.section;
val = (h->root.u.def.value
+ sec->output_section->vma
+ sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_common)
+ }
+ else if (h->root.type == bfd_link_hash_common)
{
sec = h->root.u.c.p->section;
val = (sec->output_section->vma
+ sec->output_offset);
-
- }
- else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT)))
- && ! info->relocateable)
+
+ }
+ else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT)))
+ && ! info->relocateable)
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma, true)))
return false;
-
+
/* Don't try to process the reloc. It can't help, and
it may generate another error. */
continue;
}
}
- if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION
- || (false == xcoff_calculate_relocation[rel->r_type]
- (input_bfd, input_section, output_bfd, rel, sym, &howto, val,
- addend, &relocation, contents)))
+ if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION
+ || !((*xcoff_calculate_relocation[rel->r_type])
+ (input_bfd, input_section, output_bfd, rel, sym, &howto, val,
+ addend, &relocation, contents)))
return false;
-
+
/* address */
address = rel->r_vaddr - input_section->vma;
location = contents + address;
-
+
if (address > input_section->_raw_size)
- abort();
+ abort ();
/* Get the value we are going to relocate. */
if (1 == howto.size)
value_to_relocate = bfd_get_16 (input_bfd, location);
- else
+ else
value_to_relocate = bfd_get_32 (input_bfd, location);
-
- /* overflow.
-
+
+ /* overflow.
+
FIXME: We may drop bits during the addition
which we don't check for. We must either check at every single
operation, which would be tedious, or we must do the computations
in a type larger than bfd_vma, which would be inefficient. */
-
- if ((unsigned int) howto.complain_on_overflow >=
- XCOFF_MAX_COMPLAIN_OVERFLOW)
- abort();
- if ((true == xcoff_complain_overflow[howto.complain_on_overflow]
- (input_bfd, value_to_relocate, relocation, &howto)))
+ if ((unsigned int) howto.complain_on_overflow
+ >= XCOFF_MAX_COMPLAIN_OVERFLOW)
+ abort ();
+
+ if (((*xcoff_complain_overflow[howto.complain_on_overflow])
+ (input_bfd, value_to_relocate, relocation, &howto)))
{
const char *name;
char buf[SYMNMLEN + 1];
char reloc_type_name[10];
-
- if (symndx == -1)
+
+ if (symndx == -1)
{
name = "*ABS*";
- }
- else if (h != NULL)
+ }
+ else if (h != NULL)
{
name = h->root.root.string;
- }
- else
+ }
+ else
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
if (name == NULL)
name = "UNKNOWN";
}
sprintf (reloc_type_name, "0x%02x", rel->r_type);
-
+
if (! ((*info->callbacks->reloc_overflow)
(info, name, reloc_type_name, (bfd_vma) 0, input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return false;
}
-
+
/* Add RELOCATION to the right bits of VALUE_TO_RELOCATE. */
- value_to_relocate = ((value_to_relocate & ~howto.dst_mask) |
- (((value_to_relocate & howto.src_mask) +
- relocation) & howto.dst_mask));
-
+ value_to_relocate = ((value_to_relocate & ~howto.dst_mask)
+ | (((value_to_relocate & howto.src_mask)
+ + relocation) & howto.dst_mask));
+
/* Put the value back in the object file. */
if (1 == howto.size)
bfd_put_16 (input_bfd, value_to_relocate, location);
- else
+ else
bfd_put_32 (input_bfd, value_to_relocate, location);
}
".td", NULL, ".sv3264"
};
- if ((19 >= aux->x_csect.x_smclas) &&
- (NULL != names[aux->x_csect.x_smclas]))
+ if ((19 >= aux->x_csect.x_smclas)
+ && (NULL != names[aux->x_csect.x_smclas]))
{
return_value = bfd_make_section_anyway
(abfd, names[aux->x_csect.x_smclas]);
bfd *abfd;
struct internal_ldhdr *ldhdr ATTRIBUTE_UNUSED;
{
- return bfd_xcoff_ldhdrsz(abfd);
+ return bfd_xcoff_ldhdrsz (abfd);
}
static bfd_vma
bfd *abfd;
struct internal_ldhdr *ldhdr;
{
- return bfd_xcoff_ldhdrsz(abfd) +
- (ldhdr->l_nsyms * bfd_xcoff_ldsymsz(abfd));
+ return bfd_xcoff_ldhdrsz (abfd) + ldhdr->l_nsyms * bfd_xcoff_ldsymsz (abfd);
}
-static boolean
+static boolean
xcoff_generate_rtinit (abfd, init, fini, rtld)
bfd *abfd;
const char *init;
struct internal_syment syment;
union internal_auxent auxent;
struct internal_reloc reloc;
-
+
char *data_name = ".data";
char *rtinit_name = "__rtinit";
char *rtld_name = "__rtld";
-
+
if (! bfd_xcoff_rtinit_size (abfd))
return false;
memset (filehdr_ext, 0, FILHSZ);
memset (&filehdr, 0, sizeof (struct internal_filehdr));
filehdr.f_magic = bfd_xcoff_magic_number (abfd);
- filehdr.f_nscns = 1;
+ filehdr.f_nscns = 1;
filehdr.f_timdat = 0;
filehdr.f_nsyms = 0; /* at least 6, no more than 10 */
filehdr.f_symptr = 0; /* set below */
scnhdr.s_nlnno = 0;
scnhdr.s_flags = STYP_DATA;
- /* .data
- 0x0000 0x00000000 : rtl
- 0x0004 0x00000010 : offset to init, or 0
- 0x0008 0x00000028 : offset to fini, or 0
- 0x000C 0x0000000C : size of descriptor
- 0x0010 0x00000000 : init, needs a reloc
- 0x0014 0x00000040 : offset to init name
- 0x0018 0x00000000 : flags, padded to a word
- 0x001C 0x00000000 : empty init
- 0x0020 0x00000000 :
- 0x0024 0x00000000 :
- 0x0028 0x00000000 : fini, needs a reloc
- 0x002C 0x00000??? : offset to fini name
- 0x0030 0x00000000 : flags, padded to a word
- 0x0034 0x00000000 : empty fini
- 0x0038 0x00000000 :
- 0x003C 0x00000000 :
- 0x0040 init name
+ /* .data
+ 0x0000 0x00000000 : rtl
+ 0x0004 0x00000010 : offset to init, or 0
+ 0x0008 0x00000028 : offset to fini, or 0
+ 0x000C 0x0000000C : size of descriptor
+ 0x0010 0x00000000 : init, needs a reloc
+ 0x0014 0x00000040 : offset to init name
+ 0x0018 0x00000000 : flags, padded to a word
+ 0x001C 0x00000000 : empty init
+ 0x0020 0x00000000 :
+ 0x0024 0x00000000 :
+ 0x0028 0x00000000 : fini, needs a reloc
+ 0x002C 0x00000??? : offset to fini name
+ 0x0030 0x00000000 : flags, padded to a word
+ 0x0034 0x00000000 : empty fini
+ 0x0038 0x00000000 :
+ 0x003C 0x00000000 :
+ 0x0040 init name
0x0040 + initsz fini name */
data_buffer_size = 0x0040 + initsz + finisz;
- data_buffer_size += (data_buffer_size & 7) ? 8 - (data_buffer_size & 7) : 0;
+ data_buffer_size = (data_buffer_size + 7) &~ (bfd_size_type) 7;
data_buffer = NULL;
data_buffer = (bfd_byte *) bfd_zmalloc (data_buffer_size);
if (data_buffer == NULL)
return false;
- if (initsz)
+ if (initsz)
{
val = 0x10;
bfd_h_put_32 (abfd, val, &data_buffer[0x04]);
memcpy (&data_buffer[val], init, initsz);
}
- if (finisz)
+ if (finisz)
{
val = 0x28;
bfd_h_put_32 (abfd, val, &data_buffer[0x08]);
/* string table */
string_table_size = 0;
- if (initsz > 9)
+ if (initsz > 9)
string_table_size += initsz;
if (finisz > 9)
string_table_size += finisz;
bfd_h_put_32 (abfd, val, &string_table[0]);
st_tmp = string_table + 4;
}
-
- /* symbols
+
+ /* symbols
0. .data csect
2. __rtinit
- 4. init function
- 6. fini function
+ 4. init function
+ 6. fini function
8. __rtld */
memset (syment_ext, 0, 10 * SYMESZ);
memset (reloc_ext, 0, 3 * RELSZ);
auxent.x_csect.x_scnlen.l = data_buffer_size;
auxent.x_csect.x_smtyp = 3 << 3 | XTY_SD;
auxent.x_csect.x_smclas = XMC_RW;
- bfd_coff_swap_sym_out (abfd, &syment,
+ bfd_coff_swap_sym_out (abfd, &syment,
&syment_ext[filehdr.f_nsyms * SYMESZ]);
- bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
- syment.n_numaux,
+ bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+ syment.n_numaux,
&syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
filehdr.f_nsyms += 2;
syment.n_numaux = 1;
auxent.x_csect.x_smtyp = XTY_LD;
auxent.x_csect.x_smclas = XMC_RW;
- bfd_coff_swap_sym_out (abfd, &syment,
+ bfd_coff_swap_sym_out (abfd, &syment,
&syment_ext[filehdr.f_nsyms * SYMESZ]);
- bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
- syment.n_numaux,
+ bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+ syment.n_numaux,
&syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
filehdr.f_nsyms += 2;
/* init */
- if (initsz)
+ if (initsz)
{
memset (&syment, 0, sizeof (struct internal_syment));
memset (&auxent, 0, sizeof (union internal_auxent));
- if (initsz > 9)
+ if (initsz > 9)
{
syment._n._n_n._n_offset = st_tmp - string_table;
memcpy (st_tmp, init, initsz);
syment.n_sclass = C_EXT;
syment.n_numaux = 1;
- bfd_coff_swap_sym_out (abfd, &syment,
+ bfd_coff_swap_sym_out (abfd, &syment,
&syment_ext[filehdr.f_nsyms * SYMESZ]);
- bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
- syment.n_numaux,
+ bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+ syment.n_numaux,
&syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
/* reloc */
filehdr.f_nsyms += 2;
scnhdr.s_nreloc += 1;
}
-
+
/* fini */
- if (finisz)
+ if (finisz)
{
memset (&syment, 0, sizeof (struct internal_syment));
memset (&auxent, 0, sizeof (union internal_auxent));
- if (finisz > 9)
+ if (finisz > 9)
{
syment._n._n_n._n_offset = st_tmp - string_table;
memcpy (st_tmp, fini, finisz);
syment.n_sclass = C_EXT;
syment.n_numaux = 1;
- bfd_coff_swap_sym_out (abfd, &syment,
+ bfd_coff_swap_sym_out (abfd, &syment,
&syment_ext[filehdr.f_nsyms * SYMESZ]);
- bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
- syment.n_numaux,
+ bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+ syment.n_numaux,
&syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
/* reloc */
reloc.r_symndx = filehdr.f_nsyms;
reloc.r_type = R_POS;
reloc.r_size = 31;
- bfd_coff_swap_reloc_out (abfd, &reloc,
+ bfd_coff_swap_reloc_out (abfd, &reloc,
&reloc_ext[scnhdr.s_nreloc * RELSZ]);
filehdr.f_nsyms += 2;
memcpy (syment._n._n_name, rtld_name, strlen (rtld_name));
syment.n_sclass = C_EXT;
syment.n_numaux = 1;
- bfd_coff_swap_sym_out (abfd, &syment,
+ bfd_coff_swap_sym_out (abfd, &syment,
&syment_ext[filehdr.f_nsyms * SYMESZ]);
- bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
- syment.n_numaux,
+ bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+ syment.n_numaux,
&syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
/* reloc */
reloc.r_symndx = filehdr.f_nsyms;
reloc.r_type = R_POS;
reloc.r_size = 31;
- bfd_coff_swap_reloc_out (abfd, &reloc,
+ bfd_coff_swap_reloc_out (abfd, &reloc,
&reloc_ext[scnhdr.s_nreloc * RELSZ]);
filehdr.f_nsyms += 2;
static reloc_howto_type xcoff_dynamic_reloc =
-HOWTO (0, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+HOWTO (0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_POS", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false); /* pcrel_offset */
+ 0, /* special_function */
+ "R_POS", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false); /* pcrel_offset */
/* glink
static const struct xcoff_backend_data_rec bfd_xcoff_backend_data =
{
{ /* COFF backend, defined in libcoff.h. */
- _bfd_xcoff_swap_aux_in, /* _bfd_coff_swap_aux_in */
- _bfd_xcoff_swap_sym_in, /* _bfd_coff_swap_sym_in */
- coff_swap_lineno_in, /* _bfd_coff_swap_lineno_in */
- _bfd_xcoff_swap_aux_out, /* _bfd_swap_aux_out */
- _bfd_xcoff_swap_sym_out, /* _bfd_swap_sym_out */
- coff_swap_lineno_out, /* _bfd_swap_lineno_out */
- xcoff_swap_reloc_out, /* _bfd_swap_reloc_out */
- coff_swap_filehdr_out, /* _bfd_swap_filehdr_out */
- coff_swap_aouthdr_out, /* _bfd_swap_aouthdr_out */
- coff_swap_scnhdr_out, /* _bfd_swap_scnhdr_out */
- FILHSZ, /* _bfd_filhsz */
- AOUTSZ, /* _bfd_aoutsz */
- SCNHSZ, /* _bfd_scnhsz */
- SYMESZ, /* _bfd_symesz */
- AUXESZ, /* _bfd_auxesz */
- RELSZ, /* _bfd_relsz */
- LINESZ, /* _bfd_linesz */
- FILNMLEN, /* _bfd_filnmlen */
- true, /* _bfd_coff_long_filenames */
- false, /* _bfd_coff_long_section_names */
- (3), /* _bfd_coff_default_section_alignment_power */
- false, /* _bfd_coff_force_symnames_in_strings */
- 2, /* _bfd_coff_debug_string_prefix_length */
- coff_swap_filehdr_in, /* _bfd_coff_swap_filehdr_in */
- coff_swap_aouthdr_in, /* _bfd_swap_aouthdr_in */
- coff_swap_scnhdr_in, /* _bfd_swap_scnhdr_in */
- xcoff_swap_reloc_in, /* _bfd_reloc_in */
- coff_bad_format_hook, /* _bfd_bad_format_hook */
- coff_set_arch_mach_hook, /* _bfd_set_arch_mach_hook */
- coff_mkobject_hook, /* _bfd_mkobject_hook */
- styp_to_sec_flags, /* _bfd_syp_to_sec_flags */
- coff_set_alignment_hook, /* _bfd_set_alignment_hook */
- coff_slurp_symbol_table, /* _bfd_coff_slurp_symbol_table */
- symname_in_debug_hook, /* _coff_symname_in_debug_hook */
- coff_pointerize_aux_hook, /* _bfd_coff_pointerize_aux_hook */
- coff_print_aux, /* bfd_coff_print_aux */
- dummy_reloc16_extra_cases, /* _bfd_coff_reloc16_extra_cases */
- dummy_reloc16_estimate, /* _bfd_coff_reloc16_estimate */
- NULL, /* bfd_coff_sym_is_global */
- coff_compute_section_file_positions, /* _bfd_coff_compute_section_file_positions */
- NULL, /* _bfd_coff_start_final_link */
- xcoff_ppc_relocate_section, /* _bfd_coff_relocate_section */
- coff_rtype_to_howto, /* _bfd_coff_rtype_to_howto */
- NULL, /* _bfd_coff_addust_symndx */
- _bfd_generic_link_add_one_symbol, /* _bfd_coff_add_one_symbol */
- coff_link_output_has_begun, /* _bfd_coff_link_output_has_begun */
- coff_final_link_postscript /* _bfd_coff_final_link_postscript */
+ _bfd_xcoff_swap_aux_in,
+ _bfd_xcoff_swap_sym_in,
+ coff_swap_lineno_in,
+ _bfd_xcoff_swap_aux_out,
+ _bfd_xcoff_swap_sym_out,
+ coff_swap_lineno_out,
+ xcoff_swap_reloc_out,
+ coff_swap_filehdr_out,
+ coff_swap_aouthdr_out,
+ coff_swap_scnhdr_out,
+ FILHSZ,
+ AOUTSZ,
+ SCNHSZ,
+ SYMESZ,
+ AUXESZ,
+ RELSZ,
+ LINESZ,
+ FILNMLEN,
+ true, /* _bfd_coff_long_filenames */
+ false, /* _bfd_coff_long_section_names */
+ 3, /* _bfd_coff_default_section_alignment_power */
+ false, /* _bfd_coff_force_symnames_in_strings */
+ 2, /* _bfd_coff_debug_string_prefix_length */
+ coff_swap_filehdr_in,
+ coff_swap_aouthdr_in,
+ coff_swap_scnhdr_in,
+ xcoff_swap_reloc_in,
+ coff_bad_format_hook,
+ coff_set_arch_mach_hook,
+ coff_mkobject_hook,
+ styp_to_sec_flags,
+ coff_set_alignment_hook,
+ coff_slurp_symbol_table,
+ symname_in_debug_hook,
+ coff_pointerize_aux_hook,
+ coff_print_aux,
+ dummy_reloc16_extra_cases,
+ dummy_reloc16_estimate,
+ NULL, /* bfd_coff_sym_is_global */
+ coff_compute_section_file_positions,
+ NULL, /* _bfd_coff_start_final_link */
+ xcoff_ppc_relocate_section,
+ coff_rtype_to_howto,
+ NULL, /* _bfd_coff_adjust_symndx */
+ _bfd_generic_link_add_one_symbol,
+ coff_link_output_has_begun,
+ coff_final_link_postscript
},
- 0x01DF, /* magic number */
- bfd_arch_rs6000, /* architecture */
- bfd_mach_rs6k, /* machine */
+ 0x01DF, /* magic number */
+ bfd_arch_rs6000,
+ bfd_mach_rs6k,
/* Function pointers to xcoff specific swap routines. */
- xcoff_swap_ldhdr_in, /* _xcoff_swap_ldhdr_in */
- xcoff_swap_ldhdr_out, /* _xcoff_swap_ldhdr_out */
- xcoff_swap_ldsym_in, /* _xcoff_swap_ldsym_in */
- xcoff_swap_ldsym_out, /* _xcoff_swap_ldsym_out */
- xcoff_swap_ldrel_in, /* _xcoff_swap_ldrel_in */
- xcoff_swap_ldrel_out, /* _xcoff_swap_ldrel_out */
+ xcoff_swap_ldhdr_in,
+ xcoff_swap_ldhdr_out,
+ xcoff_swap_ldsym_in,
+ xcoff_swap_ldsym_out,
+ xcoff_swap_ldrel_in,
+ xcoff_swap_ldrel_out,
/* Sizes. */
- LDHDRSZ, /* _xcoff_ldhdrsz */
- LDSYMSZ, /* _xcoff_ldsymsz */
- LDRELSZ, /* _xcoff_ldrelsz */
- 12, /* _xcoff_function_descriptor_size */
- SMALL_AOUTSZ, /* _xcoff_small_aout_header_size */
+ LDHDRSZ,
+ LDSYMSZ,
+ LDRELSZ,
+ 12, /* _xcoff_function_descriptor_size */
+ SMALL_AOUTSZ,
- /* Versions. */
- 1, /* _xcoff_ldhdr_version */
+ /* Versions. */
+ 1, /* _xcoff_ldhdr_version */
- _bfd_xcoff_put_symbol_name, /* _xcoff_put_symbol_name */
- _bfd_xcoff_put_ldsymbol_name, /* _xcoff_put_ldsymbol_name */
- & xcoff_dynamic_reloc, /* dynamic reloc howto */
- xcoff_create_csect_from_smclas, /* _xcoff_create_csect_from_smclas */
+ _bfd_xcoff_put_symbol_name,
+ _bfd_xcoff_put_ldsymbol_name,
+ &xcoff_dynamic_reloc,
+ xcoff_create_csect_from_smclas,
/* Lineno and reloc count overflow. */
xcoff_is_lineno_count_overflow,
xcoff_loader_reloc_offset,
/* glink. */
- & xcoff_glink_code[0],
- (36), /* _xcoff_glink_size */
+ &xcoff_glink_code[0],
+ 36, /* _xcoff_glink_size */
/* rtinit */
- 64, /* _xcoff_rtinit_size */
- xcoff_generate_rtinit, /* _xcoff_generate_rtinit */
-};
+ 64, /* _xcoff_rtinit_size */
+ xcoff_generate_rtinit,
+ };
/* The transfer vector that leads the outside world to all of the above. */
const bfd_target rs6000coff_vec =
-{
- "aixcoff-rs6000",
- bfd_target_xcoff_flavour,
- BFD_ENDIAN_BIG, /* data byte order is big */
- BFD_ENDIAN_BIG, /* header byte order is big */
-
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG | DYNAMIC |
- HAS_SYMS | HAS_LOCALS | WP_TEXT),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* leading char */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen??? FIXMEmgo */
-
- /* data */
- bfd_getb64, /* bfd_getx64 */
- bfd_getb_signed_64, /* bfd_getx_signed_64 */
- bfd_putb64, /* bfd_putx64 */
- bfd_getb32, /* bfd_getx32 */
- bfd_getb_signed_32, /* bfd_getx_signed_32 */
- bfd_putb32, /* bfd_putx32 */
- bfd_getb16, /* bfd_getx16 */
- bfd_getb_signed_16, /* bfd_getx_signed_16 */
- bfd_putb16, /* bfd_putx16 */
-
- /* hdrs */
- bfd_getb64, /* bfd_h_getx64 */
- bfd_getb_signed_64, /* bfd_h_getx_signed_64 */
- bfd_putb64, /* bfd_h_putx64 */
- bfd_getb32, /* bfd_h_getx32 */
- bfd_getb_signed_32, /* bfd_h_getx_signed_32 */
- bfd_putb32, /* bfd_h_putx32 */
- bfd_getb16, /* bfd_h_getx16 */
- bfd_getb_signed_16, /* bfd_h_getx_signed_16 */
- bfd_putb16, /* bfd_h_putx16 */
-
- { /* bfd_check_format */
- _bfd_dummy_target,
- coff_object_p,
- _bfd_xcoff_archive_p,
- CORE_FILE_P
- },
-
- { /* bfd_set_format */
- bfd_false,
- coff_mkobject,
- _bfd_generic_mkarchive,
- bfd_false
- },
+ {
+ "aixcoff-rs6000",
+ bfd_target_xcoff_flavour,
+ BFD_ENDIAN_BIG, /* data byte order is big */
+ BFD_ENDIAN_BIG, /* header byte order is big */
+
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC),
+ 0, /* leading char */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+
+ /* data */
+ bfd_getb64,
+ bfd_getb_signed_64,
+ bfd_putb64,
+ bfd_getb32,
+ bfd_getb_signed_32,
+ bfd_putb32,
+ bfd_getb16,
+ bfd_getb_signed_16,
+ bfd_putb16,
+
+ /* hdrs */
+ bfd_getb64,
+ bfd_getb_signed_64,
+ bfd_putb64,
+ bfd_getb32,
+ bfd_getb_signed_32,
+ bfd_putb32,
+ bfd_getb16,
+ bfd_getb_signed_16,
+ bfd_putb16,
+
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ _bfd_xcoff_archive_p,
+ CORE_FILE_P
+ },
+
+ { /* bfd_set_format */
+ bfd_false,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ bfd_false
+ },
- {/* bfd_write_contents */
+ {/* bfd_write_contents */
+ bfd_false,
+ coff_write_object_contents,
+ _bfd_xcoff_write_archive_contents,
+ bfd_false
+ },
+
+ /* Generic */
+ bfd_true,
+ bfd_true,
+ coff_new_section_hook,
+ _bfd_generic_get_section_contents,
+ _bfd_generic_get_section_contents_in_window,
+
+ /* Copy */
+ _bfd_xcoff_copy_private_bfd_data,
+ ((boolean (*) (bfd *, bfd *)) bfd_true),
+ ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
+ ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((boolean (*) (bfd *, flagword)) bfd_true),
+ ((boolean (*) (bfd *, void * )) bfd_true),
+
+ /* Core */
+ coff_core_file_failing_command,
+ coff_core_file_failing_signal,
+ coff_core_file_matches_executable_p,
+
+ /* Archive */
+ _bfd_xcoff_slurp_armap,
bfd_false,
- coff_write_object_contents,
- _bfd_xcoff_write_archive_contents,
- bfd_false
- },
-
- /* Generic */
- bfd_true, /* _close_and_cleanup */
- bfd_true, /* _bfd_free_cached_info */
- coff_new_section_hook, /* _new_section_hook */
- _bfd_generic_get_section_contents, /* _bfd_get_section_contents */
- /* _bfd_get_section_contents_in_window */
- _bfd_generic_get_section_contents_in_window,
-
- /* Copy */
- _bfd_xcoff_copy_private_bfd_data, /* _bfd_copy_private_bfd */
- /* _bfd_merge_private_bfd_data */
- ((boolean (*) (bfd *, bfd *)) bfd_true),
- /* _bfd_copy_pivate_section_data */
- ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
- /* _bfd_copy_private_symbol_data */
- ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
- ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */
- ((boolean (*) (bfd *, void * )) bfd_true), /* _bfd_print_private_bfd_data */
-
- /* Core */
- coff_core_file_failing_command, /* _core_file_failing_command */
- coff_core_file_failing_signal, /* _core_file_failing_signal */
- /* _core_file_matches_executable_p */
- coff_core_file_matches_executable_p,
-
- /* Archive */
- _bfd_xcoff_slurp_armap, /* _slurp_armap */
- /* XCOFF archives do not have
- anything which corresponds to
- an extended name table. */
- bfd_false, /* _slurp_extended_name_table */
- /* _construct_extended_name_table */
- ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
- bfd_dont_truncate_arname, /* _truncate_arname */
- _bfd_xcoff_write_armap, /* _write_armap */
- _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */
- _bfd_xcoff_openr_next_archived_file, /* _openr_next_archived_file */
- _bfd_generic_get_elt_at_index, /* _get_elt_at_index */
- _bfd_xcoff_stat_arch_elt, /* _generic_stat_arch_elt */
- /* XCOFF archives do not have
- a timestamp. */
- bfd_true, /* _update_armap_timestamp */
-
- /* Symbols */
- coff_get_symtab_upper_bound, /* _get_symtab_upper_bound */
- coff_get_symtab, /* _get_symtab */
- coff_make_empty_symbol, /* _make_empty_symbol */
- coff_print_symbol, /* _print_symbol */
- coff_get_symbol_info, /* _get_symbol_info */
- _bfd_xcoff_is_local_label_name, /* _bfd_is_local_label_name */
- coff_get_lineno, /* _get_lineno */
- coff_find_nearest_line, /* _find_nearest_line */
- coff_bfd_make_debug_symbol, /* _bfd_make_debug_symbol */
- _bfd_generic_read_minisymbols, /* _read_minisymbols */
- _bfd_generic_minisymbol_to_symbol, /* _minsymbol_to_symbol */
-
- /* Reloc */
- coff_get_reloc_upper_bound, /* _get_reloc_upper_bound */
- coff_canonicalize_reloc, /* _cononicalize_reloc */
- _bfd_xcoff_reloc_type_lookup, /* _bfd_reloc_type_lookup */
-
- /* Write */
- coff_set_arch_mach, /* _set_arch_mach */
- coff_set_section_contents, /* _set_section_contents */
-
- /* Link */
- _bfd_xcoff_sizeof_headers, /* _sizeof_headers */
- /* _bfd_get_relocated_section_contents */
- bfd_generic_get_relocated_section_contents,
- bfd_generic_relax_section, /* _bfd_relax_section */
- _bfd_xcoff_bfd_link_hash_table_create, /* _bfd_link_hash_table_create */
- _bfd_generic_link_hash_table_free, /* _bfd_link_hash_table_free */
- _bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */
- _bfd_generic_link_just_syms, /* _bfd_link_just_syms */
- _bfd_xcoff_bfd_final_link, /* _bfd_final_link */
- _bfd_generic_link_split_section, /* _bfd_link_split_section */
- bfd_generic_gc_sections, /* _bfd_gc_sections */
- bfd_generic_merge_sections, /* _bfd_merge_sections */
- bfd_generic_discard_group, /* _bfd_discard_group */
-
- /* Dynamic */
- /* _get_dynamic_symtab_upper_bound */
- _bfd_xcoff_get_dynamic_symtab_upper_bound,
- _bfd_xcoff_canonicalize_dynamic_symtab, /* _cononicalize_dynamic_symtab */
- _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */
- _bfd_xcoff_canonicalize_dynamic_reloc, /* _cononicalize_dynamic_reloc */
-
- /* Opposite endian version, none exists */
- NULL,
-
- /* back end data */
- (void *) &bfd_xcoff_backend_data,
-};
+ ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
+ bfd_dont_truncate_arname,
+ _bfd_xcoff_write_armap,
+ _bfd_xcoff_read_ar_hdr,
+ _bfd_xcoff_openr_next_archived_file,
+ _bfd_generic_get_elt_at_index,
+ _bfd_xcoff_stat_arch_elt,
+ bfd_true,
+
+ /* Symbols */
+ coff_get_symtab_upper_bound,
+ coff_get_symtab,
+ coff_make_empty_symbol,
+ coff_print_symbol,
+ coff_get_symbol_info,
+ _bfd_xcoff_is_local_label_name,
+ coff_get_lineno,
+ coff_find_nearest_line,
+ coff_bfd_make_debug_symbol,
+ _bfd_generic_read_minisymbols,
+ _bfd_generic_minisymbol_to_symbol,
+
+ /* Reloc */
+ coff_get_reloc_upper_bound,
+ coff_canonicalize_reloc,
+ _bfd_xcoff_reloc_type_lookup,
+
+ /* Write */
+ coff_set_arch_mach,
+ coff_set_section_contents,
+
+ /* Link */
+ _bfd_xcoff_sizeof_headers,
+ bfd_generic_get_relocated_section_contents,
+ bfd_generic_relax_section,
+ _bfd_xcoff_bfd_link_hash_table_create,
+ _bfd_generic_link_hash_table_free,
+ _bfd_xcoff_bfd_link_add_symbols,
+ _bfd_generic_link_just_syms,
+ _bfd_xcoff_bfd_final_link,
+ _bfd_generic_link_split_section,
+ bfd_generic_gc_sections,
+ bfd_generic_merge_sections,
+ bfd_generic_discard_group,
+
+ /* Dynamic */
+ _bfd_xcoff_get_dynamic_symtab_upper_bound,
+ _bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_xcoff_get_dynamic_reloc_upper_bound,
+ _bfd_xcoff_canonicalize_dynamic_reloc,
+
+ /* Opposite endian version, none exists */
+ NULL,
+
+ (void *) &bfd_xcoff_backend_data,
+ };
+
+/* xcoff-powermac target
+ Old target.
+ Only difference between this target and the rs6000 target is the
+ the default architecture and machine type used in coffcode.h
-/*
- * xcoff-powermac target
- * Old target.
- * Only difference between this target and the rs6000 target is the
- * the default architecture and machine type used in coffcode.h
- *
- * PowerPC Macs use the same magic numbers as RS/6000
- * (because that's how they were bootstrapped originally),
- * but they are always PowerPC architecture.
- */
+ PowerPC Macs use the same magic numbers as RS/6000
+ (because that's how they were bootstrapped originally),
+ but they are always PowerPC architecture. */
static const struct xcoff_backend_data_rec bfd_pmac_xcoff_backend_data =
-{
- { /* COFF backend, defined in libcoff.h */
- _bfd_xcoff_swap_aux_in, /* _bfd_coff_swap_aux_in */
- _bfd_xcoff_swap_sym_in, /* _bfd_coff_swap_sym_in */
- coff_swap_lineno_in, /* _bfd_coff_swap_lineno_in */
- _bfd_xcoff_swap_aux_out, /* _bfd_swap_aux_out */
- _bfd_xcoff_swap_sym_out, /* _bfd_swap_sym_out */
- coff_swap_lineno_out, /* _bfd_swap_lineno_out */
- xcoff_swap_reloc_out, /* _bfd_swap_reloc_out */
- coff_swap_filehdr_out, /* _bfd_swap_filehdr_out */
- coff_swap_aouthdr_out, /* _bfd_swap_aouthdr_out */
- coff_swap_scnhdr_out, /* _bfd_swap_scnhdr_out */
- FILHSZ, /* _bfd_filhsz */
- AOUTSZ, /* _bfd_aoutsz */
- SCNHSZ, /* _bfd_scnhsz */
- SYMESZ, /* _bfd_symesz */
- AUXESZ, /* _bfd_auxesz */
- RELSZ, /* _bfd_relsz */
- LINESZ, /* _bfd_linesz */
- FILNMLEN, /* _bfd_filnmlen */
- true, /* _bfd_coff_long_filenames */
- false, /* _bfd_coff_long_section_names */
- (3), /* _bfd_coff_default_section_alignment_power */
- false, /* _bfd_coff_force_symnames_in_strings */
- 2, /* _bfd_coff_debug_string_prefix_length */
- coff_swap_filehdr_in, /* _bfd_coff_swap_filehdr_in */
- coff_swap_aouthdr_in, /* _bfd_swap_aouthdr_in */
- coff_swap_scnhdr_in, /* _bfd_swap_scnhdr_in */
- xcoff_swap_reloc_in, /* _bfd_reloc_in */
- coff_bad_format_hook, /* _bfd_bad_format_hook */
- coff_set_arch_mach_hook, /* _bfd_set_arch_mach_hook */
- coff_mkobject_hook, /* _bfd_mkobject_hook */
- styp_to_sec_flags, /* _bfd_syp_to_sec_flags */
- coff_set_alignment_hook, /* _bfd_set_alignment_hook */
- coff_slurp_symbol_table, /* _bfd_coff_slurp_symbol_table */
- symname_in_debug_hook, /* _coff_symname_in_debug_hook */
- coff_pointerize_aux_hook, /* _bfd_coff_pointerize_aux_hook */
- coff_print_aux, /* bfd_coff_print_aux */
- dummy_reloc16_extra_cases, /* _bfd_coff_reloc16_extra_cases */
- dummy_reloc16_estimate, /* _bfd_coff_reloc16_estimate */
- NULL, /* bfd_coff_sym_is_global */
- /* _bfd_coff_compute_section_file_positions */
- coff_compute_section_file_positions,
- NULL, /* _bfd_coff_start_final_link */
- xcoff_ppc_relocate_section, /* _bfd_coff_relocate_section */
- coff_rtype_to_howto, /* _bfd_coff_rtype_to_howto */
- NULL, /* _bfd_coff_addust_symndx */
- _bfd_generic_link_add_one_symbol, /* _bfd_coff_add_one_symbol */
- coff_link_output_has_begun, /* _bfd_coff_link_output_has_begun */
- coff_final_link_postscript /* _bfd_coff_final_link_postscript */
- },
-
- 0x01DF, /* magic number */
- bfd_arch_powerpc, /* architecture */
- bfd_mach_ppc, /* machine */
-
- /* function pointers to xcoff specific swap routines */
- xcoff_swap_ldhdr_in, /* _xcoff_swap_ldhdr_in */
- xcoff_swap_ldhdr_out, /* _xcoff_swap_ldhdr_out */
- xcoff_swap_ldsym_in, /* _xcoff_swap_ldsym_in */
- xcoff_swap_ldsym_out, /* _xcoff_swap_ldsym_out */
- xcoff_swap_ldrel_in, /* _xcoff_swap_ldrel_in */
- xcoff_swap_ldrel_out, /* _xcoff_swap_ldrel_out */
-
- /* sizes */
- LDHDRSZ, /* _xcoff_ldhdrsz */
- LDSYMSZ, /* _xcoff_ldsymsz */
- LDRELSZ, /* _xcoff_ldrelsz */
- 12, /* _xcoff_function_descriptor_size */
- SMALL_AOUTSZ, /* _xcoff_small_aout_header_size */
-
- /* versions */
- 1, /* _xcoff_ldhdr_version */
-
- /* xcoff vs xcoff64 putting symbol names */
- _bfd_xcoff_put_symbol_name, /* _xcoff_put_symbol_name */
- _bfd_xcoff_put_ldsymbol_name, /* _xcoff_put_ldsymbol_name */
-
- &xcoff_dynamic_reloc, /* dynamic reloc howto */
-
- xcoff_create_csect_from_smclas, /* _xcoff_create_csect_from_smclas */
-
- /* lineno and reloc count overflow */
- xcoff_is_lineno_count_overflow,
- xcoff_is_reloc_count_overflow,
-
- xcoff_loader_symbol_offset,
- xcoff_loader_reloc_offset,
-
- /* glink */
- &xcoff_glink_code[0],
- (36), /* _xcoff_glink_size */
-
- /* rtinit */
- 0, /* _xcoff_rtinit_size */
- xcoff_generate_rtinit, /* _xcoff_generate_rtinit */
-};
+ {
+ { /* COFF backend, defined in libcoff.h. */
+ _bfd_xcoff_swap_aux_in,
+ _bfd_xcoff_swap_sym_in,
+ coff_swap_lineno_in,
+ _bfd_xcoff_swap_aux_out,
+ _bfd_xcoff_swap_sym_out,
+ coff_swap_lineno_out,
+ xcoff_swap_reloc_out,
+ coff_swap_filehdr_out,
+ coff_swap_aouthdr_out,
+ coff_swap_scnhdr_out,
+ FILHSZ,
+ AOUTSZ,
+ SCNHSZ,
+ SYMESZ,
+ AUXESZ,
+ RELSZ,
+ LINESZ,
+ FILNMLEN,
+ true, /* _bfd_coff_long_filenames */
+ false, /* _bfd_coff_long_section_names */
+ 3, /* _bfd_coff_default_section_alignment_power */
+ false, /* _bfd_coff_force_symnames_in_strings */
+ 2, /* _bfd_coff_debug_string_prefix_length */
+ coff_swap_filehdr_in,
+ coff_swap_aouthdr_in,
+ coff_swap_scnhdr_in,
+ xcoff_swap_reloc_in,
+ coff_bad_format_hook,
+ coff_set_arch_mach_hook,
+ coff_mkobject_hook,
+ styp_to_sec_flags,
+ coff_set_alignment_hook,
+ coff_slurp_symbol_table,
+ symname_in_debug_hook,
+ coff_pointerize_aux_hook,
+ coff_print_aux,
+ dummy_reloc16_extra_cases,
+ dummy_reloc16_estimate,
+ NULL, /* bfd_coff_sym_is_global */
+ coff_compute_section_file_positions,
+ NULL, /* _bfd_coff_start_final_link */
+ xcoff_ppc_relocate_section,
+ coff_rtype_to_howto,
+ NULL, /* _bfd_coff_adjust_symndx */
+ _bfd_generic_link_add_one_symbol,
+ coff_link_output_has_begun,
+ coff_final_link_postscript
+ },
+
+ 0x01DF, /* magic number */
+ bfd_arch_powerpc,
+ bfd_mach_ppc,
+
+ /* Function pointers to xcoff specific swap routines. */
+ xcoff_swap_ldhdr_in,
+ xcoff_swap_ldhdr_out,
+ xcoff_swap_ldsym_in,
+ xcoff_swap_ldsym_out,
+ xcoff_swap_ldrel_in,
+ xcoff_swap_ldrel_out,
+
+ /* Sizes. */
+ LDHDRSZ,
+ LDSYMSZ,
+ LDRELSZ,
+ 12, /* _xcoff_function_descriptor_size */
+ SMALL_AOUTSZ,
+
+ /* Versions. */
+ 1, /* _xcoff_ldhdr_version */
+
+ _bfd_xcoff_put_symbol_name,
+ _bfd_xcoff_put_ldsymbol_name,
+ &xcoff_dynamic_reloc,
+ xcoff_create_csect_from_smclas,
+
+ /* Lineno and reloc count overflow. */
+ xcoff_is_lineno_count_overflow,
+ xcoff_is_reloc_count_overflow,
+
+ xcoff_loader_symbol_offset,
+ xcoff_loader_reloc_offset,
+
+ /* glink. */
+ &xcoff_glink_code[0],
+ 36, /* _xcoff_glink_size */
-/* The transfer vector that leads the outside world to all of the above. */
+ /* rtinit */
+ 0, /* _xcoff_rtinit_size */
+ xcoff_generate_rtinit,
+ };
+
+/* The transfer vector that leads the outside world to all of the above. */
const bfd_target pmac_xcoff_vec =
-{
- "xcoff-powermac",
- bfd_target_xcoff_flavour,
- BFD_ENDIAN_BIG, /* data byte order is big */
- BFD_ENDIAN_BIG, /* header byte order is big */
-
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG | DYNAMIC |
- HAS_SYMS | HAS_LOCALS | WP_TEXT),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* leading char */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen??? FIXMEmgo */
-
- /* data */
- bfd_getb64, /* bfd_getx64 */
- bfd_getb_signed_64, /* bfd_getx_signed_64 */
- bfd_putb64, /* bfd_putx64 */
- bfd_getb32, /* bfd_getx32 */
- bfd_getb_signed_32, /* bfd_getx_signed_32 */
- bfd_putb32, /* bfd_putx32 */
- bfd_getb16, /* bfd_getx16 */
- bfd_getb_signed_16, /* bfd_getx_signed_16 */
- bfd_putb16, /* bfd_putx16 */
-
- /* hdrs */
- bfd_getb64, /* bfd_h_getx64 */
- bfd_getb_signed_64, /* bfd_h_getx_signed_64 */
- bfd_putb64, /* bfd_h_putx64 */
- bfd_getb32, /* bfd_h_getx32 */
- bfd_getb_signed_32, /* bfd_h_getx_signed_32 */
- bfd_putb32, /* bfd_h_putx32 */
- bfd_getb16, /* bfd_h_getx16 */
- bfd_getb_signed_16, /* bfd_h_getx_signed_16 */
- bfd_putb16, /* bfd_h_putx16 */
-
- { /* bfd_check_format */
- _bfd_dummy_target,
- coff_object_p,
- _bfd_xcoff_archive_p,
- CORE_FILE_P
- },
-
- { /* bfd_set_format */
- bfd_false,
- coff_mkobject,
- _bfd_generic_mkarchive,
- bfd_false
- },
+ {
+ "xcoff-powermac",
+ bfd_target_xcoff_flavour,
+ BFD_ENDIAN_BIG, /* data byte order is big */
+ BFD_ENDIAN_BIG, /* header byte order is big */
+
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC),
+ 0, /* leading char */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+
+ /* data */
+ bfd_getb64,
+ bfd_getb_signed_64,
+ bfd_putb64,
+ bfd_getb32,
+ bfd_getb_signed_32,
+ bfd_putb32,
+ bfd_getb16,
+ bfd_getb_signed_16,
+ bfd_putb16,
+
+ /* hdrs */
+ bfd_getb64,
+ bfd_getb_signed_64,
+ bfd_putb64,
+ bfd_getb32,
+ bfd_getb_signed_32,
+ bfd_putb32,
+ bfd_getb16,
+ bfd_getb_signed_16,
+ bfd_putb16,
+
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ _bfd_xcoff_archive_p,
+ CORE_FILE_P
+ },
+
+ { /* bfd_set_format */
+ bfd_false,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ bfd_false
+ },
+
+ {/* bfd_write_contents */
+ bfd_false,
+ coff_write_object_contents,
+ _bfd_xcoff_write_archive_contents,
+ bfd_false
+ },
- {/* bfd_write_contents */
+ /* Generic */
+ bfd_true,
+ bfd_true,
+ coff_new_section_hook,
+ _bfd_generic_get_section_contents,
+ _bfd_generic_get_section_contents_in_window,
+
+ /* Copy */
+ _bfd_xcoff_copy_private_bfd_data,
+ ((boolean (*) (bfd *, bfd *)) bfd_true),
+ ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
+ ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((boolean (*) (bfd *, flagword)) bfd_true),
+ ((boolean (*) (bfd *, void * )) bfd_true),
+
+ /* Core */
+ coff_core_file_failing_command,
+ coff_core_file_failing_signal,
+ coff_core_file_matches_executable_p,
+
+ /* Archive */
+ _bfd_xcoff_slurp_armap,
bfd_false,
- coff_write_object_contents,
- _bfd_xcoff_write_archive_contents,
- bfd_false
- },
-
- /* Generic */
- bfd_true, /* _close_and_cleanup */
- bfd_true, /* _bfd_free_cached_info */
- coff_new_section_hook, /* _new_section_hook */
- _bfd_generic_get_section_contents, /* _bfd_get_section_contents */
- /* _bfd_get_section_contents_in_window */
- _bfd_generic_get_section_contents_in_window,
-
- /* Copy */
- _bfd_xcoff_copy_private_bfd_data, /* _bfd_copy_private_bfd */
- /* _bfd_merge_private_bfd_data */
- ((boolean (*) (bfd *, bfd *)) bfd_true),
- /* _bfd_copy_pivate_section_data */
- ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
- /* _bfd_copy_private_symbol_data */
- ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
- ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */
- ((boolean (*) (bfd *, void * )) bfd_true), /* _bfd_print_private_bfd_data */
-
- /* Core */
- coff_core_file_failing_command, /* _core_file_failing_command */
- coff_core_file_failing_signal, /* _core_file_failing_signal */
- /* _core_file_matches_executable_p */
- coff_core_file_matches_executable_p,
-
- /* Archive */
- _bfd_xcoff_slurp_armap, /* _slurp_armap */
- /* XCOFF archives do not have
- anything which corresponds to
- an extended name table. */
- bfd_false, /* _slurp_extended_name_table */
- /* _construct_extended_name_table */
- ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
- bfd_dont_truncate_arname, /* _truncate_arname */
- _bfd_xcoff_write_armap, /* _write_armap */
- _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */
- _bfd_xcoff_openr_next_archived_file, /* _openr_next_archived_file */
- _bfd_generic_get_elt_at_index, /* _get_elt_at_index */
- _bfd_xcoff_stat_arch_elt, /* _generic_stat_arch_elt */
- /* XCOFF archives do not have
- a timestamp. */
- bfd_true, /* _update_armap_timestamp */
-
- /* Symbols */
- coff_get_symtab_upper_bound, /* _get_symtab_upper_bound */
- coff_get_symtab, /* _get_symtab */
- coff_make_empty_symbol, /* _make_empty_symbol */
- coff_print_symbol, /* _print_symbol */
- coff_get_symbol_info, /* _get_symbol_info */
- _bfd_xcoff_is_local_label_name, /* _bfd_is_local_label_name */
- coff_get_lineno, /* _get_lineno */
- coff_find_nearest_line, /* _find_nearest_line */
- coff_bfd_make_debug_symbol, /* _bfd_make_debug_symbol */
- _bfd_generic_read_minisymbols, /* _read_minisymbols */
- _bfd_generic_minisymbol_to_symbol, /* _minsymbol_to_symbol */
-
- /* Reloc */
- coff_get_reloc_upper_bound, /* _get_reloc_upper_bound */
- coff_canonicalize_reloc, /* _cononicalize_reloc */
- _bfd_xcoff_reloc_type_lookup, /* _bfd_reloc_type_lookup */
-
- /* Write */
- coff_set_arch_mach, /* _set_arch_mach */
- coff_set_section_contents, /* _set_section_contents */
-
- /* Link */
- _bfd_xcoff_sizeof_headers, /* _sizeof_headers */
- /* _bfd_get_relocated_section_contents */
- bfd_generic_get_relocated_section_contents,
- bfd_generic_relax_section, /* _bfd_relax_section */
- _bfd_xcoff_bfd_link_hash_table_create, /* _bfd_link_hash_table_create */
- _bfd_generic_link_hash_table_free, /* _bfd_link_hash_table_free */
- _bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */
- _bfd_generic_link_just_syms, /* _bfd_link_just_syms */
- _bfd_xcoff_bfd_final_link, /* _bfd_final_link */
- _bfd_generic_link_split_section, /* _bfd_link_split_section */
- bfd_generic_gc_sections, /* _bfd_gc_sections */
- bfd_generic_merge_sections, /* _bfd_merge_sections */
- bfd_generic_discard_group, /* _bfd_discard_group */
-
- /* Dynamic */
- /* _get_dynamic_symtab_upper_bound */
- _bfd_xcoff_get_dynamic_symtab_upper_bound,
- _bfd_xcoff_canonicalize_dynamic_symtab, /* _cononicalize_dynamic_symtab */
- _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */
- _bfd_xcoff_canonicalize_dynamic_reloc, /* _cononicalize_dynamic_reloc */
-
- /* Opposite endian version, none exists */
- NULL,
-
- /* back end data */
- (void *) &bfd_pmac_xcoff_backend_data,
-};
+ ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
+ bfd_dont_truncate_arname,
+ _bfd_xcoff_write_armap,
+ _bfd_xcoff_read_ar_hdr,
+ _bfd_xcoff_openr_next_archived_file,
+ _bfd_generic_get_elt_at_index,
+ _bfd_xcoff_stat_arch_elt,
+ bfd_true,
+
+ /* Symbols */
+ coff_get_symtab_upper_bound,
+ coff_get_symtab,
+ coff_make_empty_symbol,
+ coff_print_symbol,
+ coff_get_symbol_info,
+ _bfd_xcoff_is_local_label_name,
+ coff_get_lineno,
+ coff_find_nearest_line,
+ coff_bfd_make_debug_symbol,
+ _bfd_generic_read_minisymbols,
+ _bfd_generic_minisymbol_to_symbol,
+
+ /* Reloc */
+ coff_get_reloc_upper_bound,
+ coff_canonicalize_reloc,
+ _bfd_xcoff_reloc_type_lookup,
+
+ /* Write */
+ coff_set_arch_mach,
+ coff_set_section_contents,
+
+ /* Link */
+ _bfd_xcoff_sizeof_headers,
+ bfd_generic_get_relocated_section_contents,
+ bfd_generic_relax_section,
+ _bfd_xcoff_bfd_link_hash_table_create,
+ _bfd_generic_link_hash_table_free,
+ _bfd_xcoff_bfd_link_add_symbols,
+ _bfd_generic_link_just_syms,
+ _bfd_xcoff_bfd_final_link,
+ _bfd_generic_link_split_section,
+ bfd_generic_gc_sections,
+ bfd_generic_merge_sections,
+ bfd_generic_discard_group,
+
+ /* Dynamic */
+ _bfd_xcoff_get_dynamic_symtab_upper_bound,
+ _bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_xcoff_get_dynamic_reloc_upper_bound,
+ _bfd_xcoff_canonicalize_dynamic_reloc,
+
+ /* Opposite endian version, none exists */
+ NULL,
+
+ (void *) &bfd_pmac_xcoff_backend_data,
+ };
static boolean xcoff64_reloc_type_br PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
boolean (*xcoff64_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
- (XCOFF_RELOC_FUNCTION_ARGS) =
+ PARAMS ((XCOFF_RELOC_FUNCTION_ARGS)) =
{
- xcoff_reloc_type_pos, /* R_POS (0x00) */
- xcoff_reloc_type_neg, /* R_NEG (0x01) */
- xcoff_reloc_type_rel, /* R_REL (0x02) */
- xcoff_reloc_type_toc, /* R_TOC (0x03) */
+ xcoff_reloc_type_pos, /* R_POS (0x00) */
+ xcoff_reloc_type_neg, /* R_NEG (0x01) */
+ xcoff_reloc_type_rel, /* R_REL (0x02) */
+ xcoff_reloc_type_toc, /* R_TOC (0x03) */
xcoff_reloc_type_fail, /* R_RTB (0x04) */
- xcoff_reloc_type_toc, /* R_GL (0x05) */
- xcoff_reloc_type_toc, /* R_TCL (0x06) */
- xcoff_reloc_type_fail, /* (0x07) */
- xcoff_reloc_type_ba, /* R_BA (0x08) */
- xcoff_reloc_type_fail, /* (0x09) */
+ xcoff_reloc_type_toc, /* R_GL (0x05) */
+ xcoff_reloc_type_toc, /* R_TCL (0x06) */
+ xcoff_reloc_type_fail, /* (0x07) */
+ xcoff_reloc_type_ba, /* R_BA (0x08) */
+ xcoff_reloc_type_fail, /* (0x09) */
xcoff64_reloc_type_br, /* R_BR (0x0a) */
- xcoff_reloc_type_fail, /* (0x0b) */
- xcoff_reloc_type_pos, /* R_RL (0x0c) */
- xcoff_reloc_type_pos, /* R_RLA (0x0d) */
- xcoff_reloc_type_fail, /* (0x0e) */
+ xcoff_reloc_type_fail, /* (0x0b) */
+ xcoff_reloc_type_pos, /* R_RL (0x0c) */
+ xcoff_reloc_type_pos, /* R_RLA (0x0d) */
+ xcoff_reloc_type_fail, /* (0x0e) */
xcoff_reloc_type_noop, /* R_REF (0x0f) */
- xcoff_reloc_type_fail, /* (0x10) */
- xcoff_reloc_type_fail, /* (0x11) */
- xcoff_reloc_type_toc, /* R_TRL (0x12) */
- xcoff_reloc_type_toc, /* R_TRLA (0x13) */
+ xcoff_reloc_type_fail, /* (0x10) */
+ xcoff_reloc_type_fail, /* (0x11) */
+ xcoff_reloc_type_toc, /* R_TRL (0x12) */
+ xcoff_reloc_type_toc, /* R_TRLA (0x13) */
xcoff_reloc_type_fail, /* R_RRTBI (0x14) */
xcoff_reloc_type_fail, /* R_RRTBA (0x15) */
- xcoff_reloc_type_ba, /* R_CAI (0x16) */
+ xcoff_reloc_type_ba, /* R_CAI (0x16) */
xcoff_reloc_type_crel, /* R_CREL (0x17) */
- xcoff_reloc_type_ba, /* R_RBA (0x18) */
- xcoff_reloc_type_ba, /* R_RBAC (0x19) */
+ xcoff_reloc_type_ba, /* R_RBA (0x18) */
+ xcoff_reloc_type_ba, /* R_RBAC (0x19) */
xcoff64_reloc_type_br, /* R_RBR (0x1a) */
- xcoff_reloc_type_ba, /* R_RBRC (0x1b) */
+ xcoff_reloc_type_ba, /* R_RBRC (0x1b) */
};
/* coffcode.h needs these to be defined. */
#ifdef AIX_CORE
extern const bfd_target * rs6000coff_core_p PARAMS ((bfd *abfd));
extern boolean rs6000coff_core_file_matches_executable_p
- PARAMS((bfd *cbfd, bfd *ebfd));
+ PARAMS ((bfd *cbfd, bfd *ebfd));
extern char *rs6000coff_core_file_failing_command PARAMS ((bfd *abfd));
extern int rs6000coff_core_file_failing_signal PARAMS ((bfd *abfd));
#define CORE_FILE_P rs6000coff_core_p
static boolean
xcoff64_write_object_contents (abfd)
- bfd * abfd;
+ bfd *abfd;
{
asection *current;
boolean hasrelocs = false;
memset (&internal_a, 0, sizeof internal_a);
internal_f.f_magic = bfd_xcoff_magic_number (abfd);
- internal_a.magic = (abfd->flags & D_PAGED) ? RS6K_AOUTHDR_ZMAGIC :
- (abfd->flags & WP_TEXT) ? RS6K_AOUTHDR_NMAGIC :
- RS6K_AOUTHDR_OMAGIC;
+ internal_a.magic = (abfd->flags & D_PAGED
+ ? RS6K_AOUTHDR_ZMAGIC
+ : (abfd->flags & WP_TEXT
+ ? RS6K_AOUTHDR_NMAGIC
+ : RS6K_AOUTHDR_OMAGIC));
/* FIXME: Does anybody ever set this to another value? */
internal_a.vstamp = 0;
if (buff == NULL)
return false;
- bfd_coff_swap_aouthdr_out (abfd, (PTR) & internal_a, (PTR) buff);
+ bfd_coff_swap_aouthdr_out (abfd, (PTR) &internal_a, (PTR) buff);
amount = bfd_bwrite ((PTR) buff, amount, abfd);
free (buff);
return true;
}
-static boolean
-xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
+static boolean
+xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto,
val, addend, relocation, contents)
bfd *input_bfd;
asection *input_section;
{
struct xcoff_link_hash_entry *h;
- if (0 > rel->r_symndx)
+ if (0 > rel->r_symndx)
return false;
h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx];
call is followed by a ld r2,40(r1), but the call is not
going to global linkage code, we can replace the load with a
cror. */
- if (NULL != h
- && bfd_link_hash_defined == h->root.type
- && (rel->r_vaddr - input_section->vma + 8 <=
- input_section->_cooked_size))
+ if (NULL != h
+ && bfd_link_hash_defined == h->root.type
+ && (rel->r_vaddr - input_section->vma + 8
+ <= input_section->_cooked_size))
{
bfd_byte *pnext;
unsigned long next;
-
+
pnext = contents + (rel->r_vaddr - input_section->vma) + 4;
next = bfd_get_32 (input_bfd, pnext);
-
- /* The _ptrgl function is magic. It is used by the AIX compiler to call
+
+ /* The _ptrgl function is magic. It is used by the AIX compiler to call
a function through a pointer. */
- if (h->smclas == XMC_GL || strcmp (h->root.root.string, "._ptrgl") == 0)
+ if (h->smclas == XMC_GL || strcmp (h->root.root.string, "._ptrgl") == 0)
{
- if (next == 0x4def7b82 /* cror 15,15,15 */
- || next == 0x4ffffb82 /* cror 31,31,31 */
- || next == 0x60000000) /* ori r0,r0,0 */
- bfd_put_32 (input_bfd, 0xe8410028, pnext); /* ld r2,40(r1) */
- }
- else
+ if (next == 0x4def7b82 /* cror 15,15,15 */
+ || next == 0x4ffffb82 /* cror 31,31,31 */
+ || next == 0x60000000) /* ori r0,r0,0 */
+ bfd_put_32 (input_bfd, 0xe8410028, pnext); /* ld r2,40(r1) */
+ }
+ else
{
- if (next == 0xe8410028) /* ld r2,40(r1) */
- bfd_put_32 (input_bfd, 0x60000000, pnext); /* ori r0,r0,0 */
+ if (next == 0xe8410028) /* ld r2,40(r1) */
+ bfd_put_32 (input_bfd, 0x60000000, pnext); /* ori r0,r0,0 */
}
- }
- else if (NULL != h && bfd_link_hash_undefined == h->root.type)
+ }
+ else if (NULL != h && bfd_link_hash_undefined == h->root.type)
{
/* Normally, this relocation is against a defined symbol. In the
case where this is a partial link and the output section offset
- is greater than 2^25, the linker will return an invalid error
+ is greater than 2^25, the linker will return an invalid error
message that the relocation has been truncated. Yes it has been
- truncated but no it not important. For this case, disable the
+ truncated but no it not important. For this case, disable the
overflow checking. */
howto->complain_on_overflow = complain_overflow_dont;
}
-
+
howto->pc_relative = true;
howto->src_mask &= ~3;
howto->dst_mask = howto->src_mask;
-
+
/* A PC relative reloc includes the section address. */
addend += input_section->vma;
-
+
*relocation = val + addend;
- *relocation -= (input_section->output_section->vma +
- input_section->output_offset);
+ *relocation -= (input_section->output_section->vma
+ + input_section->output_offset);
return true;
}
bfd_byte *location;
/* Relocation type R_REF is a special relocation type which is
- merely used to prevent garbage collection from occurring for
- the csect including the symbol which it references. */
+ merely used to prevent garbage collection from occurring for
+ the csect including the symbol which it references. */
if (rel->r_type == R_REF)
continue;
howto.size = howto.bitsize > 16 ? (howto.bitsize > 32 ? 4 : 2) : 1;
howto.pc_relative = false;
howto.bitpos = 0;
- howto.complain_on_overflow = rel->r_size & 0x80 ?
- complain_overflow_signed : complain_overflow_bitfield;
+ howto.complain_on_overflow = (rel->r_size & 0x80
+ ? complain_overflow_signed
+ : complain_overflow_bitfield);
howto.special_function = NULL;
howto.name = "internal";
howto.partial_inplace = true;
- howto.src_mask = howto.dst_mask = N_ONES(howto.bitsize);
+ howto.src_mask = howto.dst_mask = N_ONES (howto.bitsize);
howto.pcrel_offset = false;
/* symbol */
addend = 0;
h = NULL;
sym = NULL;
- symndx = rel->r_symndx;
+ symndx = rel->r_symndx;
- if (-1 != symndx)
+ if (-1 != symndx)
{
asection *sec;
-
+
h = obj_xcoff_sym_hashes (input_bfd)[symndx];
sym = syms + symndx;
addend = - sym->n_value;
-
- if (NULL == h)
+
+ if (NULL == h)
{
sec = sections[symndx];
/* Hack to make sure we use the right TOC anchor value
+ sec->output_offset
+ sym->n_value
- sec->vma);
- }
- else
+ }
+ else
{
- if (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
{
sec = h->root.u.def.section;
val = (h->root.u.def.value
+ sec->output_section->vma
+ sec->output_offset);
- }
- else if (h->root.type == bfd_link_hash_common)
+ }
+ else if (h->root.type == bfd_link_hash_common)
{
sec = h->root.u.c.p->section;
val = (sec->output_section->vma
+ sec->output_offset);
- }
- else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT)))
- && ! info->relocateable)
+ }
+ else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT)))
+ && ! info->relocateable)
{
if (! ((*info->callbacks->undefined_symbol)
(info, h->root.root.string, input_bfd, input_section,
rel->r_vaddr - input_section->vma, true)))
return false;
-
+
/* Don't try to process the reloc. It can't help, and
it may generate another error. */
continue;
}
}
}
-
- if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION
- || (false == xcoff64_calculate_relocation[rel->r_type]
- (input_bfd, input_section, output_bfd, rel, sym, &howto, val,
- addend, &relocation, contents)))
+
+ if (rel->r_type >= XCOFF_MAX_CALCULATE_RELOCATION
+ || ((*xcoff64_calculate_relocation[rel->r_type])
+ (input_bfd, input_section, output_bfd, rel, sym, &howto, val,
+ addend, &relocation, contents)))
return false;
-
+
/* address */
address = rel->r_vaddr - input_section->vma;
location = contents + address;
-
+
if (address > input_section->_raw_size)
- abort();
-
+ abort ();
+
/* Get the value we are going to relocate. */
if (1 == howto.size)
value_to_relocate = bfd_get_16 (input_bfd, location);
else if (2 == howto.size)
value_to_relocate = bfd_get_32 (input_bfd, location);
- else
+ else
value_to_relocate = bfd_get_64 (input_bfd, location);
-
- /* overflow.
-
+
+ /* overflow.
+
FIXME: We may drop bits during the addition
which we don't check for. We must either check at every single
operation, which would be tedious, or we must do the computations
in a type larger than bfd_vma, which would be inefficient. */
-
- if ((unsigned int) howto.complain_on_overflow >=
- XCOFF_MAX_COMPLAIN_OVERFLOW)
- abort();
-
- if ((true == xcoff_complain_overflow[howto.complain_on_overflow]
- (input_bfd, value_to_relocate, relocation, &howto)))
+
+ if ((unsigned int) howto.complain_on_overflow
+ >= XCOFF_MAX_COMPLAIN_OVERFLOW)
+ abort ();
+
+ if (((*xcoff_complain_overflow[howto.complain_on_overflow])
+ (input_bfd, value_to_relocate, relocation, &howto)))
{
const char *name;
char buf[SYMNMLEN + 1];
char reloc_type_name[10];
-
- if (symndx == -1)
+
+ if (symndx == -1)
{
name = "*ABS*";
- }
- else if (h != NULL)
+ }
+ else if (h != NULL)
{
name = h->root.root.string;
- }
- else
+ }
+ else
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
if (name == NULL)
name = "UNKNOWN";
}
sprintf (reloc_type_name, "0x%02x", rel->r_type);
-
+
if (! ((*info->callbacks->reloc_overflow)
(info, name, reloc_type_name, (bfd_vma) 0, input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
}
/* Add RELOCATION to the right bits of VALUE_TO_RELOCATE. */
- value_to_relocate = ((value_to_relocate & ~howto.dst_mask) |
- (((value_to_relocate & howto.src_mask) +
- relocation) & howto.dst_mask));
-
+ value_to_relocate = ((value_to_relocate & ~howto.dst_mask)
+ | (((value_to_relocate & howto.src_mask)
+ + relocation) & howto.dst_mask));
+
/* Put the value back in the object file. */
if (1 == howto.size)
bfd_put_16 (input_bfd, value_to_relocate, location);
bfd_put_32 (input_bfd, value_to_relocate, location);
else
bfd_put_64 (input_bfd, value_to_relocate, location);
-
+
}
return true;
}
0xffff, /* dst_mask */
false), /* pcrel_offset */
- /* I don't really know what this is. */
+ /* I don't really know what this is. */
HOWTO (R_RTB, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
/* External TOC relative symbol. */
HOWTO (R_GL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
/* Local TOC relative symbol. */
HOWTO (R_TCL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_BA_26", /* name */
true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0x03fffffc, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
EMPTY_HOWTO (9),
0, /* special_function */
"R_BR", /* name */
true, /* partial_inplace */
- 0x3fffffc, /* src_mask */
- 0x3fffffc, /* dst_mask */
+ 0x03fffffc, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
EMPTY_HOWTO (0xb),
/* Indirect load. */
HOWTO (R_RL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
/* Load address. */
HOWTO (R_RLA, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
EMPTY_HOWTO (0xe),
- /* Non-relocating reference. */
+ /* Non-relocating reference. */
HOWTO (R_REF, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
+ complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */
"R_REF", /* name */
false, /* partial_inplace */
/* TOC relative indirect load. */
HOWTO (R_TRL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
/* TOC relative load address. */
HOWTO (R_TRLA, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
/* Modifiable call absolute indirect. */
HOWTO (R_CAI, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0xffff, /* dst_mask */
false), /* pcrel_offset */
- /* Modifiable call relative. */
+ /* Modifiable call relative. */
HOWTO (R_CREL, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
0, /* special_function */
"R_RBA", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0x03fffffc, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable branch absolute. */
0, /* special_function */
"R_RBAC", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable branch relative. */
0, /* special_function */
"R_RBR_26", /* name */
true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
+ 0x03fffffc, /* src_mask */
+ 0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
/* Modifiable branch absolute. */
HOWTO (R_RBRC, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
false), /* pcrel_offset */
/* Modifiable branch relative. */
- HOWTO (R_RBR, /* type */
- 0, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
+ HOWTO (R_RBR, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_RBR_16", /* name */
- true, /* partial_inplace */
- 0xffff, /* src_mask */
- 0xffff, /* dst_mask */
- false), /* pcrel_offset */
+ 0, /* special_function */
+ "R_RBR_16", /* name */
+ true, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
/* Modifiable branch absolute. */
HOWTO (R_RBA, /* type */
/* Default howto layout works most of the time */
relent->howto = &xcoff64_howto_table[internal->r_type];
-
+
/* Special case some 16 bit reoloc */
if (15 == (internal->r_size & 0x3f))
{
- if (R_BA == internal->r_type)
+ if (R_BA == internal->r_type)
relent->howto = &xcoff64_howto_table[0x1d];
- else if (R_RBR == internal->r_type)
+ else if (R_RBR == internal->r_type)
relent->howto = &xcoff64_howto_table[0x1e];
- else if (R_RBA == internal->r_type)
+ else if (R_RBA == internal->r_type)
relent->howto = &xcoff64_howto_table[0x1f];
}
/* Special case 32 bit */
else if (31 == (internal->r_size & 0x3f))
{
- if (R_POS == internal->r_type)
+ if (R_POS == internal->r_type)
relent->howto = &xcoff64_howto_table[0x1c];
}
-
+
/* The r_size field of an XCOFF reloc encodes the bitsize of the
relocation, as well as indicating whether it is signed or not.
Doublecheck that the relocation information gathered from the
&& (relent->howto->bitsize
!= ((unsigned int) internal->r_size & 0x3f) + 1))
abort ();
-
- /* Put a meaningful value in addend */
- relent->addend = (internal->r_size & 0x80) ? - internal->r_vaddr
- : internal->r_vaddr;
}
reloc_howto_type *
return true;
}
- off = strtol (xcoff_ardata_big (abfd)->symoff64, (char **) NULL, 10);
+ off = bfd_scan_vma (xcoff_ardata_big (abfd)->symoff64,
+ (const char **) NULL, 10);
if (off == 0)
{
bfd_has_map (abfd) = false;
if (bfd_seek (abfd, pos, SEEK_CUR) != 0)
return false;
- /* XXX This actually has to be a call to strtoll (at least on 32-bit
- machines) since the field width is 20 and there numbers with more
- than 32 bits can be represented. */
- sz = strtol (hdr.size, (char **) NULL, 10);
+ sz = bfd_scan_vma (hdr.size, (const char **) NULL, 10);
/* Read in the entire symbol table. */
contents = (bfd_byte *) bfd_alloc (abfd, sz);
xcoff64_archive_p (abfd)
bfd *abfd;
{
+ struct artdata *tdata_hold;
char magic[SXCOFFARMAG];
/* This is the new format. */
struct xcoff_ar_file_hdr_big hdr;
return NULL;
}
- /* We are setting bfd_ardata(abfd) here, but since bfd_ardata
- involves a cast, we can't do it as the left operand of
- assignment. */
- amt = sizeof (struct artdata);
- abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
-
- if (bfd_ardata (abfd) == (struct artdata *) NULL)
- return NULL;
-
- bfd_ardata (abfd)->cache = NULL;
- bfd_ardata (abfd)->archive_head = NULL;
- bfd_ardata (abfd)->symdefs = NULL;
- bfd_ardata (abfd)->extended_names = NULL;
-
/* Copy over the magic string. */
memcpy (hdr.magic, magic, SXCOFFARMAG);
/* Now read the rest of the file header. */
- if (bfd_bread ((PTR) &hdr.memoff,
- (bfd_size_type) (SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG),
- abfd) != SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG)
+ amt = SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG;
+ if (bfd_bread ((PTR) &hdr.memoff, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
- /* XXX This actually has to be a call to strtoll (at least on 32-bit
- machines) since the field width is 20 and there numbers with more
- than 32 bits can be represented. */
- bfd_ardata (abfd)->first_file_filepos = strtol (hdr.firstmemoff,
- (char **) NULL, 10);
+ tdata_hold = bfd_ardata (abfd);
+
+ amt = sizeof (struct artdata);
+ bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt);
+ if (bfd_ardata (abfd) == (struct artdata *) NULL)
+ goto error_ret_restore;
+
+ bfd_ardata (abfd)->cache = NULL;
+ bfd_ardata (abfd)->archive_head = NULL;
+ bfd_ardata (abfd)->symdefs = NULL;
+ bfd_ardata (abfd)->extended_names = NULL;
+ bfd_ardata (abfd)->first_file_filepos = bfd_scan_vma (hdr.firstmemoff,
+ (const char **) NULL,
+ 10);
amt = SIZEOF_AR_FILE_HDR_BIG;
bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd)->tdata == NULL)
- return NULL;
+ goto error_ret;
memcpy (bfd_ardata (abfd)->tdata, &hdr, SIZEOF_AR_FILE_HDR_BIG);
if (! xcoff64_slurp_armap (abfd))
{
+ error_ret:
bfd_release (abfd, bfd_ardata (abfd));
- abfd->tdata.aout_ar_data = (struct artdata *) NULL;
+ error_ret_restore:
+ bfd_ardata (abfd) = tdata_hold;
return NULL;
}
}
else
{
- /* XXX These actually have to be a calls to strtoll (at least
- on 32-bit machines) since the fields's width is 20 and
- there numbers with more than 32 bits can be represented. */
- filestart = strtol (arch_xhdr_big (last_file)->nextoff, (char **) NULL,
- 10);
+ filestart = bfd_scan_vma (arch_xhdr_big (last_file)->nextoff,
+ (const char **) NULL, 10);
}
- /* XXX These actually have to be calls to strtoll (at least on 32-bit
- machines) since the fields's width is 20 and there numbers with more
- than 32 bits can be represented. */
+
if (filestart == 0
- || filestart == strtol (xcoff_ardata_big (archive)->memoff,
- (char **) NULL, 10)
- || filestart == strtol (xcoff_ardata_big (archive)->symoff,
- (char **) NULL, 10))
+ || filestart == bfd_scan_vma (xcoff_ardata_big (archive)->memoff,
+ (const char **) NULL, 10)
+ || filestart == bfd_scan_vma (xcoff_ardata_big (archive)->symoff,
+ (const char **) NULL, 10))
{
bfd_set_error (bfd_error_no_more_archived_files);
return NULL;
bss_scnhdr.s_flags = STYP_BSS;
/* .data
- 0x0000 0x00000000 : rtl
- 0x0004 0x00000000 :
- 0x0008 0x00000018 : offset to init, or 0
- 0x000C 0x00000038 : offset to fini, or 0
- 0x0010 0x00000010 : size of descriptor
- 0x0014 0x00000000 : pad
- 0x0018 0x00000000 : init, needs a reloc
- 0x001C 0x00000000 :
- 0x0020 0x00000058 : offset to init name
- 0x0024 0x00000000 : flags, padded to a word
- 0x0028 0x00000000 : empty init
- 0x002C 0x00000000 :
- 0x0030 0x00000000 :
- 0x0034 0x00000000 :
- 0x0038 0x00000000 : fini, needs a reloc
- 0x003C 0x00000000 :
- 0x0040 0x00000??? : offset to fini name
- 0x0044 0x00000000 : flags, padded to a word
- 0x0048 0x00000000 : empty fini
- 0x004C 0x00000000 :
- 0x0050 0x00000000 :
- 0x0054 0x00000000 :
- 0x0058 init name
+ 0x0000 0x00000000 : rtl
+ 0x0004 0x00000000 :
+ 0x0008 0x00000018 : offset to init, or 0
+ 0x000C 0x00000038 : offset to fini, or 0
+ 0x0010 0x00000010 : size of descriptor
+ 0x0014 0x00000000 : pad
+ 0x0018 0x00000000 : init, needs a reloc
+ 0x001C 0x00000000 :
+ 0x0020 0x00000058 : offset to init name
+ 0x0024 0x00000000 : flags, padded to a word
+ 0x0028 0x00000000 : empty init
+ 0x002C 0x00000000 :
+ 0x0030 0x00000000 :
+ 0x0034 0x00000000 :
+ 0x0038 0x00000000 : fini, needs a reloc
+ 0x003C 0x00000000 :
+ 0x0040 0x00000??? : offset to fini name
+ 0x0044 0x00000000 : flags, padded to a word
+ 0x0048 0x00000000 : empty fini
+ 0x004C 0x00000000 :
+ 0x0050 0x00000000 :
+ 0x0054 0x00000000 :
+ 0x0058 init name
0x0058 + initsz fini name */
data_buffer_size = 0x0058 + initsz + finisz;
- data_buffer_size += (data_buffer_size & 7) ? 8 - (data_buffer_size & 7) : 0;
+ data_buffer_size = (data_buffer_size + 7) &~ (bfd_size_type) 7;
data_buffer = NULL;
data_buffer = (bfd_byte *) bfd_zmalloc (data_buffer_size);
if (data_buffer == NULL)
string_table_size += strlen (rtinit_name) + 1;
string_table_size += initsz;
string_table_size += finisz;
- if (true == rtld)
+ if (rtld)
string_table_size += strlen (rtld_name) + 1;
string_table = (bfd_byte *) bfd_zmalloc (string_table_size);
};
static const struct xcoff_backend_data_rec bfd_xcoff_backend_data =
-{
- { /* COFF backend, defined in libcoff.h. */
- _bfd_xcoff64_swap_aux_in, /* _bfd_coff_swap_aux_in */
- _bfd_xcoff64_swap_sym_in, /* _bfd_coff_swap_sym_in */
- _bfd_xcoff64_swap_lineno_in, /* _bfd_coff_swap_lineno_in */
- _bfd_xcoff64_swap_aux_out, /* _bfd_swap_aux_out */
- _bfd_xcoff64_swap_sym_out, /* _bfd_swap_sym_out */
- _bfd_xcoff64_swap_lineno_out, /* _bfd_swap_lineno_out */
- xcoff64_swap_reloc_out, /* _bfd_swap_reloc_out */
- coff_swap_filehdr_out, /* _bfd_swap_filehdr_out */
- coff_swap_aouthdr_out, /* _bfd_swap_aouthdr_out */
- coff_swap_scnhdr_out, /* _bfd_swap_scnhdr_out */
- FILHSZ, /* _bfd_filhsz */
- AOUTSZ, /* _bfd_aoutsz */
- SCNHSZ, /* _bfd_scnhsz */
- SYMESZ, /* _bfd_symesz */
- AUXESZ, /* _bfd_auxesz */
- RELSZ, /* _bfd_relsz */
- LINESZ, /* _bfd_linesz */
- FILNMLEN, /* _bfd_filnmlen */
- true, /* _bfd_coff_long_filenames */
- false, /* _bfd_coff_long_section_names */
- (3), /* _bfd_coff_default_section_alignment_power */
- true, /* _bfd_coff_force_symnames_in_strings */
- 4, /* _bfd_coff_debug_string_prefix_length */
- coff_swap_filehdr_in, /* _bfd_coff_swap_filehdr_in */
- coff_swap_aouthdr_in, /* _bfd_swap_aouthdr_in */
- coff_swap_scnhdr_in, /* _bfd_swap_scnhdr_in */
- xcoff64_swap_reloc_in, /* _bfd_reloc_in */
- xcoff64_bad_format_hook, /* _bfd_bad_format_hook */
- coff_set_arch_mach_hook, /* _bfd_set_arch_mach_hook */
- coff_mkobject_hook, /* _bfd_mkobject_hook */
- styp_to_sec_flags, /* _bfd_syp_to_sec_flags */
- coff_set_alignment_hook, /* _bfd_set_alignment_hook */
- coff_slurp_symbol_table, /* _bfd_coff_slurp_symbol_table */
- symname_in_debug_hook, /* _coff_symname_in_debug_hook */
- coff_pointerize_aux_hook, /* _bfd_coff_pointerize_aux_hook */
- coff_print_aux, /* bfd_coff_print_aux */
- dummy_reloc16_extra_cases, /* _bfd_coff_reloc16_extra_cases */
- dummy_reloc16_estimate, /* _bfd_coff_reloc16_estimate */
- NULL, /* bfd_coff_sym_is_global */
- /* _bfd_coff_compute_section_file_positions */
- coff_compute_section_file_positions,
- NULL , /* _bfd_coff_start_final_link */
- xcoff64_ppc_relocate_section, /* _bfd_coff_relocate_section */
- coff_rtype_to_howto, /* _bfd_coff_rtype_to_howto */
- NULL , /* _bfd_coff_addust_symndx */
- _bfd_generic_link_add_one_symbol, /* _bfd_coff_add_one_symbol */
- coff_link_output_has_begun, /* _bfd_coff_link_output_has_begun */
- coff_final_link_postscript /* _bfd_coff_final_link_postscript */
- },
-
- 0x01EF, /* magic number */
- bfd_arch_powerpc, /* architecture */
- bfd_mach_ppc_620, /* machine */
-
- /* Function pointers to xcoff specific swap routines. */
- xcoff64_swap_ldhdr_in, /* _xcoff_swap_ldhdr_in */
- xcoff64_swap_ldhdr_out, /* _xcoff_swap_ldhdr_out */
- xcoff64_swap_ldsym_in, /* _xcoff_swap_ldsym_in */
- xcoff64_swap_ldsym_out, /* _xcoff_swap_ldsym_out */
- xcoff64_swap_ldrel_in, /* _xcoff_swap_ldrel_in */
- xcoff64_swap_ldrel_out, /* _xcoff_swap_ldrel_out */
-
- /* Sizes. */
- LDHDRSZ, /* _xcoff_ldhdrsz */
- LDSYMSZ, /* _xcoff_ldsymsz */
- LDRELSZ, /* _xcoff_ldrelsz */
- 24, /* _xcoff_function_descriptor_size */
- 0, /* _xcoff_small_aout_header_size */
-
- /* Versions. */
- 2, /* _xcoff_ldhdr_version */
-
- /* xcoff vs xcoff64 putting symbol names. */
- _bfd_xcoff64_put_symbol_name, /* _xcoff_put_symbol_name */
- _bfd_xcoff64_put_ldsymbol_name, /* _xcoff_put_ldsymbol_name */
-
- /* Dynamic reloc howto. */
- &xcoff64_dynamic_reloc,
-
- xcoff64_create_csect_from_smclas,
-
- /* Lineno and reloc count overflow. */
- xcoff64_is_lineno_count_overflow,
- xcoff64_is_reloc_count_overflow,
-
- xcoff64_loader_symbol_offset,
- xcoff64_loader_reloc_offset,
-
- /* glink. */
- &xcoff64_glink_code[0],
- 40, /* _xcoff_glink_size */
-
- /* rtinit. */
- 88, /* _xcoff_rtinit_size */
- xcoff64_generate_rtinit, /* _xcoff_generate_rtinit */
-};
+ {
+ { /* COFF backend, defined in libcoff.h. */
+ _bfd_xcoff64_swap_aux_in,
+ _bfd_xcoff64_swap_sym_in,
+ _bfd_xcoff64_swap_lineno_in,
+ _bfd_xcoff64_swap_aux_out,
+ _bfd_xcoff64_swap_sym_out,
+ _bfd_xcoff64_swap_lineno_out,
+ xcoff64_swap_reloc_out,
+ coff_swap_filehdr_out,
+ coff_swap_aouthdr_out,
+ coff_swap_scnhdr_out,
+ FILHSZ,
+ AOUTSZ,
+ SCNHSZ,
+ SYMESZ,
+ AUXESZ,
+ RELSZ,
+ LINESZ,
+ FILNMLEN,
+ true, /* _bfd_coff_long_filenames */
+ false, /* _bfd_coff_long_section_names */
+ 3, /* _bfd_coff_default_section_alignment_power */
+ true, /* _bfd_coff_force_symnames_in_strings */
+ 4, /* _bfd_coff_debug_string_prefix_length */
+ coff_swap_filehdr_in,
+ coff_swap_aouthdr_in,
+ coff_swap_scnhdr_in,
+ xcoff64_swap_reloc_in,
+ xcoff64_bad_format_hook,
+ coff_set_arch_mach_hook,
+ coff_mkobject_hook,
+ styp_to_sec_flags,
+ coff_set_alignment_hook,
+ coff_slurp_symbol_table,
+ symname_in_debug_hook,
+ coff_pointerize_aux_hook,
+ coff_print_aux,
+ dummy_reloc16_extra_cases,
+ dummy_reloc16_estimate,
+ NULL, /* bfd_coff_sym_is_global */
+ coff_compute_section_file_positions,
+ NULL, /* _bfd_coff_start_final_link */
+ xcoff64_ppc_relocate_section,
+ coff_rtype_to_howto,
+ NULL, /* _bfd_coff_adjust_symndx */
+ _bfd_generic_link_add_one_symbol,
+ coff_link_output_has_begun,
+ coff_final_link_postscript
+ },
+
+ 0x01EF, /* magic number */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_620,
+
+ /* Function pointers to xcoff specific swap routines. */
+ xcoff64_swap_ldhdr_in,
+ xcoff64_swap_ldhdr_out,
+ xcoff64_swap_ldsym_in,
+ xcoff64_swap_ldsym_out,
+ xcoff64_swap_ldrel_in,
+ xcoff64_swap_ldrel_out,
+
+ /* Sizes. */
+ LDHDRSZ,
+ LDSYMSZ,
+ LDRELSZ,
+ 24, /* _xcoff_function_descriptor_size */
+ 0, /* _xcoff_small_aout_header_size */
+
+ /* Versions. */
+ 2, /* _xcoff_ldhdr_version */
+
+ _bfd_xcoff64_put_symbol_name,
+ _bfd_xcoff64_put_ldsymbol_name,
+ &xcoff64_dynamic_reloc,
+ xcoff64_create_csect_from_smclas,
+
+ /* Lineno and reloc count overflow. */
+ xcoff64_is_lineno_count_overflow,
+ xcoff64_is_reloc_count_overflow,
+
+ xcoff64_loader_symbol_offset,
+ xcoff64_loader_reloc_offset,
+
+ /* glink. */
+ &xcoff64_glink_code[0],
+ 40, /* _xcoff_glink_size */
+
+ /* rtinit. */
+ 88, /* _xcoff_rtinit_size */
+ xcoff64_generate_rtinit,
+ };
/* The transfer vector that leads the outside world to all of the above. */
const bfd_target rs6000coff64_vec =
-{
- "aixcoff64-rs6000",
- bfd_target_xcoff_flavour,
- BFD_ENDIAN_BIG, /* data byte order is big */
- BFD_ENDIAN_BIG, /* header byte order is big */
-
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG | DYNAMIC |
- HAS_SYMS | HAS_LOCALS | WP_TEXT),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* leading char */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen??? FIXMEmgo */
-
- /* data */
- bfd_getb64, /* bfd_getx64 */
- bfd_getb_signed_64, /* bfd_getx_signed_64 */
- bfd_putb64, /* bfd_putx64 */
- bfd_getb32, /* bfd_getx32 */
- bfd_getb_signed_32, /* bfd_getx_signed_32 */
- bfd_putb32, /* bfd_putx32 */
- bfd_getb16, /* bfd_getx16 */
- bfd_getb_signed_16, /* bfd_getx_signed_16 */
- bfd_putb16, /* bfd_putx16 */
-
- /* hdrs */
- bfd_getb64, /* bfd_h_getx64 */
- bfd_getb_signed_64, /* bfd_h_getx_signed_64 */
- bfd_putb64, /* bfd_h_putx64 */
- bfd_getb32, /* bfd_h_getx32 */
- bfd_getb_signed_32, /* bfd_h_getx_signed_32 */
- bfd_putb32, /* bfd_h_putx32 */
- bfd_getb16, /* bfd_h_getx16 */
- bfd_getb_signed_16, /* bfd_h_getx_signed_16 */
- bfd_putb16, /* bfd_h_putx16 */
-
- { /* bfd_check_format */
- _bfd_dummy_target,
- coff_object_p,
- xcoff64_archive_p,
- CORE_FILE_P
- },
-
- { /* bfd_set_format */
- bfd_false,
- coff_mkobject,
- _bfd_generic_mkarchive,
- bfd_false
- },
-
- {/* bfd_write_contents */
+ {
+ "aixcoff64-rs6000",
+ bfd_target_xcoff_flavour,
+ BFD_ENDIAN_BIG, /* data byte order is big */
+ BFD_ENDIAN_BIG, /* header byte order is big */
+
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC),
+ 0, /* leading char */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+
+ /* data */
+ bfd_getb64,
+ bfd_getb_signed_64,
+ bfd_putb64,
+ bfd_getb32,
+ bfd_getb_signed_32,
+ bfd_putb32,
+ bfd_getb16,
+ bfd_getb_signed_16,
+ bfd_putb16,
+
+ /* hdrs */
+ bfd_getb64,
+ bfd_getb_signed_64,
+ bfd_putb64,
+ bfd_getb32,
+ bfd_getb_signed_32,
+ bfd_putb32,
+ bfd_getb16,
+ bfd_getb_signed_16,
+ bfd_putb16,
+
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ xcoff64_archive_p,
+ CORE_FILE_P
+ },
+
+ { /* bfd_set_format */
+ bfd_false,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ bfd_false
+ },
+
+ {/* bfd_write_contents */
+ bfd_false,
+ xcoff64_write_object_contents,
+ _bfd_xcoff_write_archive_contents,
+ bfd_false
+ },
+
+ /* Generic */
+ bfd_true,
+ bfd_true,
+ coff_new_section_hook,
+ _bfd_generic_get_section_contents,
+ _bfd_generic_get_section_contents_in_window,
+
+ /* Copy */
+ _bfd_xcoff_copy_private_bfd_data,
+ ((boolean (*) (bfd *, bfd *)) bfd_true),
+ ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
+ ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((boolean (*) (bfd *, flagword)) bfd_true),
+ ((boolean (*) (bfd *, void * )) bfd_true),
+
+ /* Core */
+ coff_core_file_failing_command,
+ coff_core_file_failing_signal,
+ coff_core_file_matches_executable_p,
+
+ /* Archive */
+ xcoff64_slurp_armap,
bfd_false,
- xcoff64_write_object_contents,
- _bfd_xcoff_write_archive_contents,
- bfd_false
- },
-
- /* Generic */
- bfd_true, /* _close_and_cleanup */
- bfd_true, /* _bfd_free_cached_info */
- coff_new_section_hook, /* _new_section_hook */
- _bfd_generic_get_section_contents, /* _bfd_get_section_contents */
- /* _bfd_get_section_contents_in_window */
- _bfd_generic_get_section_contents_in_window,
-
- /* Copy */
- _bfd_xcoff_copy_private_bfd_data, /* _bfd_copy_private_bfd */
- /* _bfd_merge_private_bfd_data */
- ((boolean (*) (bfd *, bfd *)) bfd_true),
- /* _bfd_copy_pivate_section_data */
- ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
- /* _bfd_copy_private_symbol_data */
- ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
- ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */
- ((boolean (*) (bfd *, void * )) bfd_true), /* _bfd_print_private_bfd_data */
-
- /* Core */
- coff_core_file_failing_command, /* _core_file_failing_command */
- coff_core_file_failing_signal, /* _core_file_failing_signal */
- coff_core_file_matches_executable_p, /* _core_file_matches_executable_p */
-
- /* Archive */
- xcoff64_slurp_armap, /* _slurp_armap */
- /* XCOFF archives do not have anything which corresponds to an
- extended name table. */
- bfd_false, /* _slurp_extended_name_table */
- /* _construct_extended_name_table */
- ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
- bfd_dont_truncate_arname, /* _truncate_arname */
- _bfd_xcoff_write_armap, /* _write_armap */
- _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */
- xcoff64_openr_next_archived_file, /* _openr_next_archived_file */
- _bfd_generic_get_elt_at_index, /* _get_elt_at_index */
- _bfd_xcoff_stat_arch_elt, /* _generic_stat_arch_elt */
- /* XCOFF archives do not have a timestamp. */
- bfd_true, /* _update_armap_timestamp */
-
- /* Symbols */
- coff_get_symtab_upper_bound, /* _get_symtab_upper_bound */
- coff_get_symtab, /* _get_symtab */
- coff_make_empty_symbol, /* _make_empty_symbol */
- coff_print_symbol, /* _print_symbol */
- coff_get_symbol_info, /* _get_symbol_info */
- _bfd_xcoff_is_local_label_name, /* _bfd_is_local_label_name */
- coff_get_lineno, /* _get_lineno */
- coff_find_nearest_line, /* _find_nearest_line */
- coff_bfd_make_debug_symbol, /* _bfd_make_debug_symbol */
- _bfd_generic_read_minisymbols, /* _read_minisymbols */
- _bfd_generic_minisymbol_to_symbol, /* _minsymbol_to_symbol */
-
- /* Reloc */
- coff_get_reloc_upper_bound, /* _get_reloc_upper_bound */
- coff_canonicalize_reloc, /* _cononicalize_reloc */
- xcoff64_reloc_type_lookup, /* _bfd_reloc_type_lookup */
-
- /* Write */
- coff_set_arch_mach, /* _set_arch_mach */
- coff_set_section_contents, /* _set_section_contents */
-
- /* Link */
- xcoff64_sizeof_headers, /* _sizeof_headers */
- /* _bfd_get_relocated_section_contents */
- bfd_generic_get_relocated_section_contents,
- bfd_generic_relax_section, /* _bfd_relax_section */
- _bfd_xcoff_bfd_link_hash_table_create,/* _bfd_link_hash_table_create */
- _bfd_generic_link_hash_table_free, /* _bfd_link_hash_table_free */
- _bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */
- _bfd_generic_link_just_syms, /* _bfd_link_just_syms */
- _bfd_xcoff_bfd_final_link, /* _bfd_final_link */
- _bfd_generic_link_split_section, /* _bfd_link_split_section */
- bfd_generic_gc_sections, /* _bfd_gc_sections */
- bfd_generic_merge_sections, /* _bfd_merge_sections */
- bfd_generic_discard_group, /* _bfd_discard_group */
-
- /* Dynamic */
- /* _get_dynamic_symtab_upper_bound */
- _bfd_xcoff_get_dynamic_symtab_upper_bound,
- _bfd_xcoff_canonicalize_dynamic_symtab, /* _cononicalize_dynamic_symtab */
- _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */
- _bfd_xcoff_canonicalize_dynamic_reloc, /* _cononicalize_dynamic_reloc */
-
- /* Opposite endian version, none exists */
- NULL,
-
- /* back end data */
- (void *) &bfd_xcoff_backend_data,
-};
+ ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
+ bfd_dont_truncate_arname,
+ _bfd_xcoff_write_armap,
+ _bfd_xcoff_read_ar_hdr,
+ xcoff64_openr_next_archived_file,
+ _bfd_generic_get_elt_at_index,
+ _bfd_xcoff_stat_arch_elt,
+ bfd_true,
+
+ /* Symbols */
+ coff_get_symtab_upper_bound,
+ coff_get_symtab,
+ coff_make_empty_symbol,
+ coff_print_symbol,
+ coff_get_symbol_info,
+ _bfd_xcoff_is_local_label_name,
+ coff_get_lineno,
+ coff_find_nearest_line,
+ coff_bfd_make_debug_symbol,
+ _bfd_generic_read_minisymbols,
+ _bfd_generic_minisymbol_to_symbol,
+
+ /* Reloc */
+ coff_get_reloc_upper_bound,
+ coff_canonicalize_reloc,
+ xcoff64_reloc_type_lookup,
+
+ /* Write */
+ coff_set_arch_mach,
+ coff_set_section_contents,
+
+ /* Link */
+ xcoff64_sizeof_headers,
+ bfd_generic_get_relocated_section_contents,
+ bfd_generic_relax_section,
+ _bfd_xcoff_bfd_link_hash_table_create,
+ _bfd_generic_link_hash_table_free,
+ _bfd_xcoff_bfd_link_add_symbols,
+ _bfd_generic_link_just_syms,
+ _bfd_xcoff_bfd_final_link,
+ _bfd_generic_link_split_section,
+ bfd_generic_gc_sections,
+ bfd_generic_merge_sections,
+ bfd_generic_discard_group,
+
+ /* Dynamic */
+ _bfd_xcoff_get_dynamic_symtab_upper_bound,
+ _bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_xcoff_get_dynamic_reloc_upper_bound,
+ _bfd_xcoff_canonicalize_dynamic_reloc,
+
+ /* Opposite endian version, none exists */
+ NULL,
+
+ (void *) &bfd_xcoff_backend_data,
+ };
extern const bfd_target *xcoff64_core_p PARAMS ((bfd *));
-extern boolean xcoff64_core_file_matches_executable_p PARAMS((bfd *, bfd *));
+extern boolean xcoff64_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
extern char *xcoff64_core_file_failing_command PARAMS ((bfd *));
extern int xcoff64_core_file_failing_signal PARAMS ((bfd *));
/* AIX 5 */
static const struct xcoff_backend_data_rec bfd_xcoff_aix5_backend_data =
-{
- { /* COFF backend, defined in libcoff.h. */
- _bfd_xcoff64_swap_aux_in, /* _bfd_coff_swap_aux_in */
- _bfd_xcoff64_swap_sym_in, /* _bfd_coff_swap_sym_in */
- _bfd_xcoff64_swap_lineno_in, /* _bfd_coff_swap_lineno_in */
- _bfd_xcoff64_swap_aux_out, /* _bfd_swap_aux_out */
- _bfd_xcoff64_swap_sym_out, /* _bfd_swap_sym_out */
- _bfd_xcoff64_swap_lineno_out, /* _bfd_swap_lineno_out */
- xcoff64_swap_reloc_out, /* _bfd_swap_reloc_out */
- coff_swap_filehdr_out, /* _bfd_swap_filehdr_out */
- coff_swap_aouthdr_out, /* _bfd_swap_aouthdr_out */
- coff_swap_scnhdr_out, /* _bfd_swap_scnhdr_out */
- FILHSZ, /* _bfd_filhsz */
- AOUTSZ, /* _bfd_aoutsz */
- SCNHSZ, /* _bfd_scnhsz */
- SYMESZ, /* _bfd_symesz */
- AUXESZ, /* _bfd_auxesz */
- RELSZ, /* _bfd_relsz */
- LINESZ, /* _bfd_linesz */
- FILNMLEN, /* _bfd_filnmlen */
- true, /* _bfd_coff_long_filenames */
- false, /* _bfd_coff_long_section_names */
- (3), /* _bfd_coff_default_section_alignment_power */
- true, /* _bfd_coff_force_symnames_in_strings */
- 4, /* _bfd_coff_debug_string_prefix_length */
- coff_swap_filehdr_in, /* _bfd_coff_swap_filehdr_in */
- coff_swap_aouthdr_in, /* _bfd_swap_aouthdr_in */
- coff_swap_scnhdr_in, /* _bfd_swap_scnhdr_in */
- xcoff64_swap_reloc_in, /* _bfd_reloc_in */
- xcoff64_bad_format_hook, /* _bfd_bad_format_hook */
- coff_set_arch_mach_hook, /* _bfd_set_arch_mach_hook */
- coff_mkobject_hook, /* _bfd_mkobject_hook */
- styp_to_sec_flags, /* _bfd_syp_to_sec_flags */
- coff_set_alignment_hook, /* _bfd_set_alignment_hook */
- coff_slurp_symbol_table, /* _bfd_coff_slurp_symbol_table */
- symname_in_debug_hook, /* _coff_symname_in_debug_hook */
- coff_pointerize_aux_hook, /* _bfd_coff_pointerize_aux_hook */
- coff_print_aux, /* bfd_coff_print_aux */
- dummy_reloc16_extra_cases, /* _bfd_coff_reloc16_extra_cases */
- dummy_reloc16_estimate, /* _bfd_coff_reloc16_estimate */
- NULL, /* bfd_coff_sym_is_global */
- /* _bfd_coff_compute_section_file_positions */
- coff_compute_section_file_positions,
- NULL , /* _bfd_coff_start_final_link */
- xcoff64_ppc_relocate_section, /* _bfd_coff_relocate_section */
- coff_rtype_to_howto, /* _bfd_coff_rtype_to_howto */
- NULL , /* _bfd_coff_addust_symndx */
- _bfd_generic_link_add_one_symbol, /* _bfd_coff_add_one_symbol */
- coff_link_output_has_begun, /* _bfd_coff_link_output_has_begun */
- coff_final_link_postscript /* _bfd_coff_final_link_postscript */
- },
-
- U64_TOCMAGIC, /* magic number */
- bfd_arch_powerpc, /* architecture */
- bfd_mach_ppc_620, /* machine */
-
- /* Function pointers to xcoff specific swap routines. */
- xcoff64_swap_ldhdr_in, /* _xcoff_swap_ldhdr_in */
- xcoff64_swap_ldhdr_out, /* _xcoff_swap_ldhdr_out */
- xcoff64_swap_ldsym_in, /* _xcoff_swap_ldsym_in */
- xcoff64_swap_ldsym_out, /* _xcoff_swap_ldsym_out */
- xcoff64_swap_ldrel_in, /* _xcoff_swap_ldrel_in */
- xcoff64_swap_ldrel_out, /* _xcoff_swap_ldrel_out */
-
- /* Sizes. */
- LDHDRSZ, /* _xcoff_ldhdrsz */
- LDSYMSZ, /* _xcoff_ldsymsz */
- LDRELSZ, /* _xcoff_ldrelsz */
- 24, /* _xcoff_function_descriptor_size */
- 0, /* _xcoff_small_aout_header_size */
- /* Versions. */
- 2, /* _xcoff_ldhdr_version */
-
- _bfd_xcoff64_put_symbol_name, /* _xcoff_put_symbol_name */
- _bfd_xcoff64_put_ldsymbol_name, /* _xcoff_put_ldsymbol_name */
-
- /* Dynamic reloc howto. */
- &xcoff64_dynamic_reloc,
- xcoff64_create_csect_from_smclas,
-
- /* Lineno and reloc count overflow. */
- xcoff64_is_lineno_count_overflow,
- xcoff64_is_reloc_count_overflow,
-
- xcoff64_loader_symbol_offset,
- xcoff64_loader_reloc_offset,
-
- /* glink. */
- &xcoff64_glink_code[0],
- 40, /* _xcoff_glink_size */
-
- /* rtinit. */
- 88, /* _xcoff_rtinit_size */
- xcoff64_generate_rtinit, /* _xcoff_generate_rtinit */
-};
+ {
+ { /* COFF backend, defined in libcoff.h. */
+ _bfd_xcoff64_swap_aux_in,
+ _bfd_xcoff64_swap_sym_in,
+ _bfd_xcoff64_swap_lineno_in,
+ _bfd_xcoff64_swap_aux_out,
+ _bfd_xcoff64_swap_sym_out,
+ _bfd_xcoff64_swap_lineno_out,
+ xcoff64_swap_reloc_out,
+ coff_swap_filehdr_out,
+ coff_swap_aouthdr_out,
+ coff_swap_scnhdr_out,
+ FILHSZ,
+ AOUTSZ,
+ SCNHSZ,
+ SYMESZ,
+ AUXESZ,
+ RELSZ,
+ LINESZ,
+ FILNMLEN,
+ true, /* _bfd_coff_long_filenames */
+ false, /* _bfd_coff_long_section_names */
+ 3, /* _bfd_coff_default_section_alignment_power */
+ true, /* _bfd_coff_force_symnames_in_strings */
+ 4, /* _bfd_coff_debug_string_prefix_length */
+ coff_swap_filehdr_in,
+ coff_swap_aouthdr_in,
+ coff_swap_scnhdr_in,
+ xcoff64_swap_reloc_in,
+ xcoff64_bad_format_hook,
+ coff_set_arch_mach_hook,
+ coff_mkobject_hook,
+ styp_to_sec_flags,
+ coff_set_alignment_hook,
+ coff_slurp_symbol_table,
+ symname_in_debug_hook,
+ coff_pointerize_aux_hook,
+ coff_print_aux,
+ dummy_reloc16_extra_cases,
+ dummy_reloc16_estimate,
+ NULL, /* bfd_coff_sym_is_global */
+ coff_compute_section_file_positions,
+ NULL, /* _bfd_coff_start_final_link */
+ xcoff64_ppc_relocate_section,
+ coff_rtype_to_howto,
+ NULL, /* _bfd_coff_adjust_symndx */
+ _bfd_generic_link_add_one_symbol,
+ coff_link_output_has_begun,
+ coff_final_link_postscript
+ },
+
+ U64_TOCMAGIC, /* magic number */
+ bfd_arch_powerpc,
+ bfd_mach_ppc_620,
+
+ /* Function pointers to xcoff specific swap routines. */
+ xcoff64_swap_ldhdr_in,
+ xcoff64_swap_ldhdr_out,
+ xcoff64_swap_ldsym_in,
+ xcoff64_swap_ldsym_out,
+ xcoff64_swap_ldrel_in,
+ xcoff64_swap_ldrel_out,
+
+ /* Sizes. */
+ LDHDRSZ,
+ LDSYMSZ,
+ LDRELSZ,
+ 24, /* _xcoff_function_descriptor_size */
+ 0, /* _xcoff_small_aout_header_size */
+ /* Versions. */
+ 2, /* _xcoff_ldhdr_version */
+
+ _bfd_xcoff64_put_symbol_name,
+ _bfd_xcoff64_put_ldsymbol_name,
+ &xcoff64_dynamic_reloc,
+ xcoff64_create_csect_from_smclas,
+
+ /* Lineno and reloc count overflow. */
+ xcoff64_is_lineno_count_overflow,
+ xcoff64_is_reloc_count_overflow,
+
+ xcoff64_loader_symbol_offset,
+ xcoff64_loader_reloc_offset,
+
+ /* glink. */
+ &xcoff64_glink_code[0],
+ 40, /* _xcoff_glink_size */
+
+ /* rtinit. */
+ 88, /* _xcoff_rtinit_size */
+ xcoff64_generate_rtinit,
+ };
/* The transfer vector that leads the outside world to all of the above. */
const bfd_target aix5coff64_vec =
-{
- "aix5coff64-rs6000",
- bfd_target_xcoff_flavour,
- BFD_ENDIAN_BIG, /* data byte order is big */
- BFD_ENDIAN_BIG, /* header byte order is big */
-
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG | DYNAMIC |
- HAS_SYMS | HAS_LOCALS | WP_TEXT),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* leading char */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen??? FIXMEmgo */
-
- /* data */
- bfd_getb64, /* bfd_getx64 */
- bfd_getb_signed_64, /* bfd_getx_signed_64 */
- bfd_putb64, /* bfd_putx64 */
- bfd_getb32, /* bfd_getx32 */
- bfd_getb_signed_32, /* bfd_getx_signed_32 */
- bfd_putb32, /* bfd_putx32 */
- bfd_getb16, /* bfd_getx16 */
- bfd_getb_signed_16, /* bfd_getx_signed_16 */
- bfd_putb16, /* bfd_putx16 */
-
- /* hdrs */
- bfd_getb64, /* bfd_h_getx64 */
- bfd_getb_signed_64, /* bfd_h_getx_signed_64 */
- bfd_putb64, /* bfd_h_putx64 */
- bfd_getb32, /* bfd_h_getx32 */
- bfd_getb_signed_32, /* bfd_h_getx_signed_32 */
- bfd_putb32, /* bfd_h_putx32 */
- bfd_getb16, /* bfd_h_getx16 */
- bfd_getb_signed_16, /* bfd_h_getx_signed_16 */
- bfd_putb16, /* bfd_h_putx16 */
-
- { /* bfd_check_format */
- _bfd_dummy_target,
- coff_object_p,
- xcoff64_archive_p,
- xcoff64_core_p
- },
-
- { /* bfd_set_format */
- bfd_false,
- coff_mkobject,
- _bfd_generic_mkarchive,
- bfd_false
- },
-
- {/* bfd_write_contents */
+ {
+ "aix5coff64-rs6000",
+ bfd_target_xcoff_flavour,
+ BFD_ENDIAN_BIG, /* data byte order is big */
+ BFD_ENDIAN_BIG, /* header byte order is big */
+
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | DYNAMIC
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC),
+ 0, /* leading char */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen */
+
+ /* data */
+ bfd_getb64,
+ bfd_getb_signed_64,
+ bfd_putb64,
+ bfd_getb32,
+ bfd_getb_signed_32,
+ bfd_putb32,
+ bfd_getb16,
+ bfd_getb_signed_16,
+ bfd_putb16,
+
+ /* hdrs */
+ bfd_getb64,
+ bfd_getb_signed_64,
+ bfd_putb64,
+ bfd_getb32,
+ bfd_getb_signed_32,
+ bfd_putb32,
+ bfd_getb16,
+ bfd_getb_signed_16,
+ bfd_putb16,
+
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ xcoff64_archive_p,
+ xcoff64_core_p
+ },
+
+ { /* bfd_set_format */
+ bfd_false,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ bfd_false
+ },
+
+ {/* bfd_write_contents */
+ bfd_false,
+ xcoff64_write_object_contents,
+ _bfd_xcoff_write_archive_contents,
+ bfd_false
+ },
+
+ /* Generic */
+ bfd_true,
+ bfd_true,
+ coff_new_section_hook,
+ _bfd_generic_get_section_contents,
+ _bfd_generic_get_section_contents_in_window,
+
+ /* Copy */
+ _bfd_xcoff_copy_private_bfd_data,
+ ((boolean (*) (bfd *, bfd *)) bfd_true),
+ ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
+ ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((boolean (*) (bfd *, flagword)) bfd_true),
+ ((boolean (*) (bfd *, void * )) bfd_true),
+
+ /* Core */
+ xcoff64_core_file_failing_command,
+ xcoff64_core_file_failing_signal,
+ xcoff64_core_file_matches_executable_p,
+
+ /* Archive */
+ xcoff64_slurp_armap,
bfd_false,
- xcoff64_write_object_contents,
- _bfd_xcoff_write_archive_contents,
- bfd_false
- },
-
- /* Generic */
- bfd_true, /* _close_and_cleanup */
- bfd_true, /* _bfd_free_cached_info */
- coff_new_section_hook, /* _new_section_hook */
- _bfd_generic_get_section_contents, /* _bfd_get_section_contents */
- /* _bfd_get_section_contents_in_window */
- _bfd_generic_get_section_contents_in_window,
-
- /* Copy */
- _bfd_xcoff_copy_private_bfd_data, /* _bfd_copy_private_bfd */
- /* _bfd_merge_private_bfd_data */
- ((boolean (*) (bfd *, bfd *)) bfd_true),
- /* _bfd_copy_pivate_section_data */
- ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
- /* _bfd_copy_private_symbol_data */
- ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
- ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */
- ((boolean (*) (bfd *, void * )) bfd_true), /* _bfd_print_private_bfd_data */
-
- /* Core */
- xcoff64_core_file_failing_command, /* _core_file_failing_command */
- xcoff64_core_file_failing_signal, /* _core_file_failing_signal */
- xcoff64_core_file_matches_executable_p, /* _core_file_matches_executable_p */
-
- /* Archive */
- xcoff64_slurp_armap, /* _slurp_armap */
- /* XCOFF archives do not have anything which corresponds to an
- extended name table. */
- bfd_false, /* _slurp_extended_name_table */
- /* _construct_extended_name_table */
- ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
- bfd_dont_truncate_arname, /* _truncate_arname */
- _bfd_xcoff_write_armap, /* _write_armap */
- _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */
- xcoff64_openr_next_archived_file, /* _openr_next_archived_file */
- _bfd_generic_get_elt_at_index, /* _get_elt_at_index */
- _bfd_xcoff_stat_arch_elt, /* _generic_stat_arch_elt */
- /* XCOFF archives do not have a timestamp. */
- bfd_true, /* _update_armap_timestamp */
-
- /* Symbols */
- coff_get_symtab_upper_bound, /* _get_symtab_upper_bound */
- coff_get_symtab, /* _get_symtab */
- coff_make_empty_symbol, /* _make_empty_symbol */
- coff_print_symbol, /* _print_symbol */
- coff_get_symbol_info, /* _get_symbol_info */
- _bfd_xcoff_is_local_label_name, /* _bfd_is_local_label_name */
- coff_get_lineno, /* _get_lineno */
- coff_find_nearest_line, /* _find_nearest_line */
- coff_bfd_make_debug_symbol, /* _bfd_make_debug_symbol */
- _bfd_generic_read_minisymbols, /* _read_minisymbols */
- _bfd_generic_minisymbol_to_symbol, /* _minsymbol_to_symbol */
-
- /* Reloc */
- coff_get_reloc_upper_bound, /* _get_reloc_upper_bound */
- coff_canonicalize_reloc, /* _cononicalize_reloc */
- xcoff64_reloc_type_lookup, /* _bfd_reloc_type_lookup */
-
- /* Write */
- coff_set_arch_mach, /* _set_arch_mach */
- coff_set_section_contents, /* _set_section_contents */
-
- /* Link */
- xcoff64_sizeof_headers, /* _sizeof_headers */
- /* _bfd_get_relocated_section_contents */
- bfd_generic_get_relocated_section_contents,
- bfd_generic_relax_section, /* _bfd_relax_section */
- _bfd_xcoff_bfd_link_hash_table_create,/* _bfd_link_hash_table_create */
- _bfd_generic_link_hash_table_free, /* _bfd_link_hash_table_free */
- _bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */
- _bfd_generic_link_just_syms, /* _bfd_link_just_syms */
- _bfd_xcoff_bfd_final_link, /* _bfd_final_link */
- _bfd_generic_link_split_section, /* _bfd_link_split_section */
- bfd_generic_gc_sections, /* _bfd_gc_sections */
- bfd_generic_merge_sections, /* _bfd_merge_sections */
- bfd_generic_discard_group, /* _bfd_discard_group */
-
- /* Dynamic */
- /* _get_dynamic_symtab_upper_bound */
- _bfd_xcoff_get_dynamic_symtab_upper_bound,
- _bfd_xcoff_canonicalize_dynamic_symtab, /* _cononicalize_dynamic_symtab */
- _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */
- _bfd_xcoff_canonicalize_dynamic_reloc, /* _cononicalize_dynamic_reloc */
-
- /* Opposite endian version, none exists. */
- NULL,
-
- /* back end data */
- (void *) & bfd_xcoff_aix5_backend_data,
-};
+ ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
+ bfd_dont_truncate_arname,
+ _bfd_xcoff_write_armap,
+ _bfd_xcoff_read_ar_hdr,
+ xcoff64_openr_next_archived_file,
+ _bfd_generic_get_elt_at_index,
+ _bfd_xcoff_stat_arch_elt,
+ bfd_true,
+
+ /* Symbols */
+ coff_get_symtab_upper_bound,
+ coff_get_symtab,
+ coff_make_empty_symbol,
+ coff_print_symbol,
+ coff_get_symbol_info,
+ _bfd_xcoff_is_local_label_name,
+ coff_get_lineno,
+ coff_find_nearest_line,
+ coff_bfd_make_debug_symbol,
+ _bfd_generic_read_minisymbols,
+ _bfd_generic_minisymbol_to_symbol,
+
+ /* Reloc */
+ coff_get_reloc_upper_bound,
+ coff_canonicalize_reloc,
+ xcoff64_reloc_type_lookup,
+
+ /* Write */
+ coff_set_arch_mach,
+ coff_set_section_contents,
+
+ /* Link */
+ xcoff64_sizeof_headers,
+ bfd_generic_get_relocated_section_contents,
+ bfd_generic_relax_section,
+ _bfd_xcoff_bfd_link_hash_table_create,
+ _bfd_generic_link_hash_table_free,
+ _bfd_xcoff_bfd_link_add_symbols,
+ _bfd_generic_link_just_syms,
+ _bfd_xcoff_bfd_final_link,
+ _bfd_generic_link_split_section,
+ bfd_generic_gc_sections,
+ bfd_generic_merge_sections,
+ bfd_generic_discard_group,
+
+ /* Dynamic */
+ _bfd_xcoff_get_dynamic_symtab_upper_bound,
+ _bfd_xcoff_canonicalize_dynamic_symtab,
+ _bfd_xcoff_get_dynamic_reloc_upper_bound,
+ _bfd_xcoff_canonicalize_dynamic_reloc,
+
+ /* Opposite endian version, none exists. */
+ NULL,
+
+ (void *) & bfd_xcoff_aix5_backend_data,
+ };
flagword oflags = abfd->flags;
bfd_vma ostart = bfd_get_start_address (abfd);
PTR tdata;
+ PTR tdata_save;
bfd_size_type readsize; /* length of file_info */
unsigned int scnhsz;
char *external_sections;
/* Set up the tdata area. ECOFF uses its own routine, and overrides
abfd->flags. */
+ tdata_save = abfd->tdata.any;
tdata = bfd_coff_mkobject_hook (abfd, (PTR) internal_f, (PTR) internal_a);
if (tdata == NULL)
- return 0;
+ goto fail2;
scnhsz = bfd_coff_scnhsz (abfd);
readsize = (bfd_size_type) nscns * scnhsz;
fail:
bfd_release (abfd, tdata);
+ fail2:
+ abfd->tdata.any = tdata_save;
abfd->flags = oflags;
bfd_get_start_address (abfd) = ostart;
return (const bfd_target *) NULL;
filehdr = bfd_alloc (abfd, filhsz);
if (filehdr == NULL)
- return 0;
+ return NULL;
if (bfd_bread (filehdr, filhsz, abfd) != filhsz)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
- return 0;
+ bfd_release (abfd, filehdr);
+ return NULL;
}
bfd_coff_swap_filehdr_in (abfd, filehdr, &internal_f);
bfd_release (abfd, filehdr);
|| internal_f.f_opthdr > aoutsz)
{
bfd_set_error (bfd_error_wrong_format);
- return 0;
+ return NULL;
}
nscns = internal_f.f_nscns;
opthdr = bfd_alloc (abfd, aoutsz);
if (opthdr == NULL)
- return 0;
+ return NULL;
if (bfd_bread (opthdr, (bfd_size_type) internal_f.f_opthdr, abfd)
!= internal_f.f_opthdr)
{
- return 0;
+ bfd_release (abfd, opthdr);
+ return NULL;
}
bfd_coff_swap_aouthdr_in (abfd, opthdr, (PTR) &internal_a);
+ bfd_release (abfd, opthdr);
}
return coff_real_object_p (abfd, nscns, &internal_f,
targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
targ_underscore=yes
;;
+ arm-*-nto* | nto*arm*)
+ targ_defvec=bfd_elf32_littlearmqnx_vec
+ targ_selvecs=bfd_elf32_bigarmqnx_vec
+ ;;
arm-*-riscix*)
targ_defvec=riscix_vec
;;
i[3456]86-*-linux-gnu*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
+ targ64_selvecs=bfd_elf64_x86_64_vec
;;
#ifdef BFD64
x86_64-*-freebsd*)
;;
#ifdef BFD64
mips64*el-*-linux*)
- targ_defvec=bfd_elf32_tradlittlemips_vec
- targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
+ targ_defvec=bfd_elf32_ntradlittlemips_vec
+ targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
;;
mips64*-*-linux*)
- targ_defvec=bfd_elf32_tradbigmips_vec
- targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
+ targ_defvec=bfd_elf32_ntradbigmips_vec
+ targ_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
;;
#endif
mips*el-*-linux*)
targ_defvec=bfd_elf32_tradlittlemips_vec
- targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
+ targ_selvecs="bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
+ targ64_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec"
;;
mips*-*-linux*)
targ_defvec=bfd_elf32_tradbigmips_vec
- targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
+ targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
+ targ64_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec"
;;
#ifdef BFD64
mmix-*-*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="nlm32_powerpc_vec rs6000coff_vec"
;;
+ powerpc-*-nto*)
+ targ_defvec=bfd_elf32_powerpcqnx_vec
+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpcleqnx_vec ppcboot_vec"
+ ;;
+ powerpcle-*-nto*)
+ targ_defvec=bfd_elf32_powerpcleqnx_vec
+ targ_selvecs="rs6000coff_vec bfd_elf32_powerpcqnx_vec ppcboot_vec"
+ ;;
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
powerpcle-*-rtems*)
# to be used on an arbitrary ELF file for anything other than
# relocation information.
case "${targ_defvec} ${targ_selvecs}" in
- *bfd_elf64*)
+ *bfd_elf64* | *bfd_elf32_n*mips*)
targ_selvecs="${targ_selvecs} bfd_elf64_little_generic_vec bfd_elf64_big_generic_vec bfd_elf32_little_generic_vec bfd_elf32_big_generic_vec"
;;
*bfd_elf32*)
PACKAGE=bfd
-VERSION=2.12.90
+VERSION=2.13.90
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
{ echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcleqnx_vec) tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcqnx_vec) tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
# FIXME: We include cofflink.lo not because it's needed for
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
if test -n "$GCC" ; then
bad_64bit_gcc=no;
echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6326: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6334: checking for gcc version with buggy 64-bit support" >&5
# Add more tests for gcc versions with non-working 64-bit support here.
cat > conftest.$ac_ext <<EOF
-#line 6329 "configure"
+#line 6337 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6374: checking for $ac_hdr" >&5
+echo "configure:6382: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6379 "configure"
+#line 6387 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6413: checking for $ac_func" >&5
+echo "configure:6421: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6418 "configure"
+#line 6426 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6466: checking for working mmap" >&5
+echo "configure:6474: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6474 "configure"
+#line 6482 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
}
EOF
-if { (eval echo configure:6627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6652: checking for $ac_func" >&5
+echo "configure:6660: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6657 "configure"
+#line 6665 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:6680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
AC_CANONICAL_SYSTEM
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(bfd, 2.12.90)
+AM_INIT_AUTOMAKE(bfd, 2.13.90)
# Uncomment the next line to remove the date from the reported bfd version
#is_release=y
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearmqnx_vec) tb="$tb elfarmqnx-nabi.lo elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_ntradlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcleqnx_vec) tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcqnx_vec) tb="$tb elf32-ppcqnx.lo elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
# FIXME: We include cofflink.lo not because it's needed for
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
Almost totally rewritten by Ian Dall from initial work
by Andrew Cagney.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
static const bfd_arch_info_type arch_info_struct[] =
{
- N(32532,"ns32k:32532",true, 0), /* the word ns32k will match this too */
+ N(32532,"ns32k:32532",true, 0), /* The word ns32k will match this too. */
};
const bfd_arch_info_type bfd_ns32k_arch =
PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
bfd *, char **,
bfd_vma (*) (bfd_byte *, int),
- int (*) (bfd_vma, bfd_byte *, int)));
+ void (*) (bfd_vma, bfd_byte *, int)));
bfd_vma
_bfd_ns32k_get_displacement (buffer, size)
int size;
{
bfd_signed_vma value;
+
switch (size)
{
case 1:
abort ();
return 0;
}
+
return value;
}
-int
+void
_bfd_ns32k_put_displacement (value, buffer, size)
bfd_vma value;
bfd_byte *buffer;
switch (size)
{
case 1:
- if (value + 0x40 > 0x7f)
- return -1;
value &= 0x7f;
*buffer++ = value;
break;
case 2:
- if (value + 0x2000 > 0x3fff)
- return -1;
value &= 0x3fff;
value |= 0x8000;
*buffer++ = (value >> 8);
break;
case 4:
- /* FIXME: is this correct? -0x1f000000 <= value < 0x2000000 */
- if (value + 0x1f000000 > 0x3effffff)
- return -1;
value |= (bfd_vma) 0xc0000000;
*buffer++ = (value >> 24);
*buffer++ = (value >> 16);
*buffer++ = (value >> 8);
*buffer++ = value;
break;
- default:
- return -1;
}
- return 0;
+ return;
}
bfd_vma
int size;
{
bfd_vma value = 0;
+
switch (size)
{
- case 8:
- value = (value << 8) | (*buffer++ & 0xff);
- value = (value << 8) | (*buffer++ & 0xff);
- value = (value << 8) | (*buffer++ & 0xff);
- value = (value << 8) | (*buffer++ & 0xff);
case 4:
value = (value << 8) | (*buffer++ & 0xff);
value = (value << 8) | (*buffer++ & 0xff);
value = (value << 8) | (*buffer++ & 0xff);
case 1:
value = (value << 8) | (*buffer++ & 0xff);
+ break;
+ default:
+ abort ();
}
return value;
}
-int
+void
_bfd_ns32k_put_immediate (value, buffer, size)
bfd_vma value;
bfd_byte *buffer;
buffer += size - 1;
switch (size)
{
- case 8:
- *buffer-- = (value & 0xff); value >>= 8;
- *buffer-- = (value & 0xff); value >>= 8;
- *buffer-- = (value & 0xff); value >>= 8;
- *buffer-- = (value & 0xff); value >>= 8;
case 4:
*buffer-- = (value & 0xff); value >>= 8;
*buffer-- = (value & 0xff); value >>= 8;
case 1:
*buffer-- = (value & 0xff); value >>= 8;
}
- return 0;
}
/* This is just like the standard perform_relocation except we
- * use get_data and put_data which know about the ns32k
- * storage methods.
- * This is probably a lot more complicated than it needs to be!
- */
+ use get_data and put_data which know about the ns32k storage
+ methods. This is probably a lot more complicated than it
+ needs to be! */
+
static bfd_reloc_status_type
do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
error_message, get_data, put_data)
bfd *output_bfd;
char **error_message ATTRIBUTE_UNUSED;
bfd_vma (*get_data) PARAMS ((bfd_byte *, int));
- int (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
+ void (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
{
int overflow = 0;
bfd_vma relocation;
producing relocateable output it is not what the code
actually does. I don't want to change it, because it seems
far too likely that something will break. */
-
relocation -=
input_section->output_section->vma + input_section->output_offset;
relocation with -r. Removing the line below this comment
fixes that problem; see PR 2953.
-However, Ian wrote the following, regarding removing the line below,
-which explains why it is still enabled: --djm
-
-If you put a patch like that into BFD you need to check all the COFF
-linkers. I am fairly certain that patch will break coff-i386 (e.g.,
-SCO); see coff_i386_reloc in coff-i386.c where I worked around the
-problem in a different way. There may very well be a reason that the
-code works as it does.
-
-Hmmm. The first obvious point is that bfd_perform_relocation should
-not have any tests that depend upon the flavour. It's seem like
-entirely the wrong place for such a thing. The second obvious point
-is that the current code ignores the reloc addend when producing
-relocateable output for COFF. That's peculiar. In fact, I really
-have no idea what the point of the line you want to remove is.
-
-A typical COFF reloc subtracts the old value of the symbol and adds in
-the new value to the location in the object file (if it's a pc
-relative reloc it adds the difference between the symbol value and the
-location). When relocating we need to preserve that property.
-
-BFD handles this by setting the addend to the negative of the old
-value of the symbol. Unfortunately it handles common symbols in a
-non-standard way (it doesn't subtract the old value) but that's a
-different story (we can't change it without losing backward
-compatibility with old object files) (coff-i386 does subtract the old
-value, to be compatible with existing coff-i386 targets, like SCO).
-
-So everything works fine when not producing relocateable output. When
-we are producing relocateable output, logically we should do exactly
-what we do when not producing relocateable output. Therefore, your
-patch is correct. In fact, it should probably always just set
-reloc_entry->addend to 0 for all cases, since it is, in fact, going to
-add the value into the object file. This won't hurt the COFF code,
-which doesn't use the addend; I'm not sure what it will do to other
-formats (the thing to check for would be whether any formats both use
-the addend and set partial_inplace).
-
-When I wanted to make coff-i386 produce relocateable output, I ran
-into the problem that you are running into: I wanted to remove that
-line. Rather than risk it, I made the coff-i386 relocs use a special
-function; it's coff_i386_reloc in coff-i386.c. The function
-specifically adds the addend field into the object file, knowing that
-bfd_perform_relocation is not going to. If you remove that line, then
-coff-i386.c will wind up adding the addend field in twice. It's
-trivial to fix; it just needs to be done.
-
-The problem with removing the line is just that it may break some
-working code. With BFD it's hard to be sure of anything. The right
-way to deal with this is simply to build and test at least all the
-supported COFF targets. It should be straightforward if time and disk
-space consuming. For each target:
- 1) build the linker
- 2) generate some executable, and link it using -r (I would
- probably use paranoia.o and link against newlib/libc.a, which
- for all the supported targets would be available in
- /usr/cygnus/progressive/H-host/target/lib/libc.a).
- 3) make the change to reloc.c
- 4) rebuild the linker
- 5) repeat step 2
- 6) if the resulting object files are the same, you have at least
- made it no worse
- 7) if they are different you have to figure out which version is
- right
-*/
+ However, Ian wrote the following, regarding removing the line
+ below, which explains why it is still enabled: --djm
+
+ If you put a patch like that into BFD you need to check all
+ the COFF linkers. I am fairly certain that patch will break
+ coff-i386 (e.g., SCO); see coff_i386_reloc in coff-i386.c
+ where I worked around the problem in a different way. There
+ may very well be a reason that the code works as it does.
+
+ Hmmm. The first obvious point is that bfd_perform_relocation
+ should not have any tests that depend upon the flavour. It's
+ seem like entirely the wrong place for such a thing. The
+ second obvious point is that the current code ignores the
+ reloc addend when producing relocateable output for COFF.
+ That's peculiar. In fact, I really have no idea what the
+ point of the line you want to remove is.
+
+ A typical COFF reloc subtracts the old value of the symbol
+ and adds in the new value to the location in the object file
+ (if it's a pc relative reloc it adds the difference between
+ the symbol value and the location). When relocating we need
+ to preserve that property.
+
+ BFD handles this by setting the addend to the negative of the
+ old value of the symbol. Unfortunately it handles common
+ symbols in a non-standard way (it doesn't subtract the old
+ value) but that's a different story (we can't change it
+ without losing backward compatibility with old object files)
+ (coff-i386 does subtract the old value, to be compatible with
+ existing coff-i386 targets, like SCO).
+
+ So everything works fine when not producing relocateable
+ output. When we are producing relocateable output, logically
+ we should do exactly what we do when not producing
+ relocateable output. Therefore, your patch is correct. In
+ fact, it should probably always just set reloc_entry->addend
+ to 0 for all cases, since it is, in fact, going to add the
+ value into the object file. This won't hurt the COFF code,
+ which doesn't use the addend; I'm not sure what it will do
+ to other formats (the thing to check for would be whether
+ any formats both use the addend and set partial_inplace).
+
+ When I wanted to make coff-i386 produce relocateable output,
+ I ran into the problem that you are running into: I wanted
+ to remove that line. Rather than risk it, I made the
+ coff-i386 relocs use a special function; it's coff_i386_reloc
+ in coff-i386.c. The function specifically adds the addend
+ field into the object file, knowing that bfd_perform_relocation
+ is not going to. If you remove that line, then coff-i386.c
+ will wind up adding the addend field in twice. It's trivial
+ to fix; it just needs to be done.
+
+ The problem with removing the line is just that it may break
+ some working code. With BFD it's hard to be sure of anything.
+ The right way to deal with this is simply to build and test at
+ least all the supported COFF targets. It should be
+ straightforward if time and disk space consuming. For each
+ target:
+ 1) build the linker
+ 2) generate some executable, and link it using -r (I would
+ probably use paranoia.o and link against newlib/libc.a,
+ which for all the supported targets would be available in
+ /usr/cygnus/progressive/H-host/target/lib/libc.a).
+ 3) make the change to reloc.c
+ 4) rebuild the linker
+ 5) repeat step 2
+ 6) if the resulting object files are the same, you have at
+ least made it no worse
+ 7) if they are different you have to figure out which
+ version is right. */
relocation -= reloc_entry->addend;
#endif
reloc_entry->addend = 0;
}
}
- /*
- Either we are relocating all the way, or we don't want to apply
- the relocation to the reloc entry (probably because there isn't
- any room in the output format to describe addends to relocs)
- */
+ /* Either we are relocating all the way, or we don't want to apply
+ the relocation to the reloc entry (probably because there isn't
+ any room in the output format to describe addends to relocs). */
/* The cast to bfd_vma avoids a bug in the Alpha OSF/1 C compiler
(OSF version 1.3, compiler version 3.11). It miscompiles the
relocation >>= (bfd_vma) howto->rightshift;
- /* Shift everything up to where it's going to be used */
-
+ /* Shift everything up to where it's going to be used. */
relocation <<= (bfd_vma) howto->bitpos;
- /* Wait for the day when all have the mask in them */
+ /* Wait for the day when all have the mask in them. */
/* What we do:
i instruction to be left alone
B B B B B
or A A A A A
-----------------------
- R R R R R R R R R R put into bfd_put<size>
- */
+ R R R R R R R R R R put into bfd_put<size>. */
#define DOIT(x) \
x = ( (x & ~howto->dst_mask) | (((x & howto->src_mask) + relocation) & howto->dst_mask))
{
case 0:
{
- char x = get_data (location, 1);
+ bfd_vma x = get_data (location, 1);
DOIT (x);
- overflow = put_data ((bfd_vma) x, location, 1);
+ put_data ((bfd_vma) x, location, 1);
}
break;
case 1:
if (relocation)
{
- short x = get_data (location, 2);
+ bfd_vma x = get_data (location, 2);
DOIT (x);
- overflow = put_data ((bfd_vma) x, location, 2);
+ put_data ((bfd_vma) x, location, 2);
}
break;
case 2:
if (relocation)
{
- long x = get_data (location, 4);
+ bfd_vma x = get_data (location, 4);
DOIT (x);
- overflow = put_data ((bfd_vma) x, location, 4);
+ put_data ((bfd_vma) x, location, 4);
}
break;
case -2:
{
- long x = get_data (location, 4);
+ bfd_vma x = get_data (location, 4);
relocation = -relocation;
DOIT(x);
- overflow = put_data ((bfd_vma) x, location, 4);
+ put_data ((bfd_vma) x, location, 4);
}
break;
case 3:
- /* Do nothing */
+ /* Do nothing. */
break;
case 4:
{
bfd_vma x = get_data (location, 8);
DOIT (x);
- overflow = put_data (x, location, 8);
+ put_data (x, location, 8);
}
#else
abort ();
bfd_vma relocation;
bfd_byte *location;
bfd_vma (*get_data) PARAMS ((bfd_byte *, int));
- int (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
+ void (*put_data) PARAMS ((bfd_vma, bfd_byte *, int));
{
int size;
bfd_vma x;
char armag[SARMAG + 1];
bfd_size_type amt;
- tdata_hold = abfd->tdata.aout_ar_data;
-
if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG)
{
if (bfd_get_error () != bfd_error_system_call)
return NULL;
}
- /* We are setting bfd_ardata(abfd) here, but since bfd_ardata
- involves a cast, we can't do it as the left operand of
- assignment. */
- amt = sizeof (struct artdata);
- abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
+ tdata_hold = bfd_ardata (abfd);
+ amt = sizeof (struct artdata);
+ bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd) == (struct artdata *) NULL)
{
- abfd->tdata.aout_ar_data = tdata_hold;
+ bfd_ardata (abfd) = tdata_hold;
return (const bfd_target *) NULL;
}
|| ! _bfd_ecoff_slurp_extended_name_table (abfd))
{
bfd_release (abfd, bfd_ardata (abfd));
- abfd->tdata.aout_ar_data = tdata_hold;
+ bfd_ardata (abfd) = tdata_hold;
return (const bfd_target *) NULL;
}
first = bfd_openr_next_archived_file (abfd, (bfd *) NULL);
if (first != NULL)
{
- boolean fail;
-
first->target_defaulted = false;
- fail = false;
if (bfd_check_format (first, bfd_object)
&& first->xvec != abfd->xvec)
{
+#if 0
+ /* We ought to close `first' here, but we can't, because
+ we have no way to remove it from the archive cache.
+ It's close to impossible to figure out when we can
+ release bfd_ardata. FIXME. */
(void) bfd_close (first);
bfd_release (abfd, bfd_ardata (abfd));
- abfd->tdata.aout_ar_data = tdata_hold;
- bfd_set_error (bfd_error_wrong_format);
+#endif
+ bfd_set_error (bfd_error_wrong_object_format);
+ bfd_ardata (abfd) = tdata_hold;
return NULL;
}
-
- /* We ought to close first here, but we can't, because we
- have no way to remove it from the archive cache. FIXME. */
+ /* And we ought to close `first' here too. */
}
}
2002 Free Software Foundation, Inc.
Written by Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _LIBELF_H_
#define _LIBELF_H_ 1
unsigned can_refcount : 1;
unsigned want_got_sym : 1;
unsigned want_dynbss : 1;
+ /* Targets which do not support physical addressing often require
+ that the p_paddr field in the section header to be set to zero.
+ This field indicates whether this behavior is required. */
+ unsigned want_p_paddr_set_to_zero : 1;
};
/* Information stored for each BFD section in an ELF file. This
#define bfd_elf64_link_record_dynamic_symbol \
_bfd_elf_link_record_dynamic_symbol
-extern boolean _bfd_elf32_link_record_local_dynamic_symbol
- PARAMS ((struct bfd_link_info *, bfd *, long));
-extern boolean _bfd_elf64_link_record_local_dynamic_symbol
+extern int elf_link_record_local_dynamic_symbol
PARAMS ((struct bfd_link_info *, bfd *, long));
+#define _bfd_elf32_link_record_local_dynamic_symbol \
+ elf_link_record_local_dynamic_symbol
+#define _bfd_elf64_link_record_local_dynamic_symbol \
+ elf_link_record_local_dynamic_symbol
extern boolean _bfd_elf_close_and_cleanup
PARAMS ((bfd *));
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- struct elf64_hppa_link_hash_table *hppa_info = elf64_hppa_hash_table (info);
+ struct elf64_hppa_link_hash_table *hppa_info;
+ if (info->relocateable)
+ return true;
+
+ hppa_info = elf64_hppa_hash_table (info);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
rel = relocs;
return false;
}
- r_symndx = ELF_R_SYM (rel->r_info);
-
- if (info->relocateable)
- {
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sym_sec = local_sections[r_symndx];
- rel->r_addend += sym_sec->output_offset;
- }
- }
-
- continue;
- }
-
/* This is a final link. */
+ r_symndx = ELF_R_SYM (rel->r_info);
h = NULL;
sym = NULL;
sym_sec = NULL;
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, boolean, asymbol **));
-/* We have to use RELA instructions since md_apply_fix3 in the assembler
- does absolutely nothing. */
-#define USE_RELA
-
enum reloc_type {
R_MN10200_NONE = 0,
R_MN10200_32,
PARAMS ((bfd *, struct elf32_mn10300_link_hash_entry *,
bfd_vma, unsigned char *));
-/* We have to use RELA instructions since md_apply_fix3 in the assembler
- does absolutely nothing. */
-#define USE_RELA
-
static reloc_howto_type elf_mn10300_howto_table[] = {
/* Dummy relocation. Does nothing. */
HOWTO (R_MN10300_NONE,
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* SECTION
if ((asect->flags & SEC_GROUP) == 0 && elf_group_name (asect) != NULL)
this_hdr->sh_flags |= SHF_GROUP;
if ((asect->flags & SEC_THREAD_LOCAL) != 0)
- this_hdr->sh_flags |= SHF_TLS;
+ {
+ this_hdr->sh_flags |= SHF_TLS;
+ if (asect->_raw_size == 0 && (asect->flags & SEC_HAS_CONTENTS) == 0)
+ {
+ struct bfd_link_order *o;
+
+ this_hdr->sh_size = 0;
+ for (o = asect->link_order_head; o != NULL; o = o->next)
+ if (this_hdr->sh_size < o->offset + o->size)
+ this_hdr->sh_size = o->offset + o->size;
+ if (this_hdr->sh_size)
+ this_hdr->sh_type = SHT_NOBITS;
+ }
+ }
/* Check for processor-specific section types. */
if (bed->elf_backend_fake_sections
/* The Solaris native linker always sets p_paddr to 0.
We try to catch that case here, and set it to the
- correct value. */
+ correct value. Note - some backends require that
+ p_paddr be left as zero. */
if (segment->p_paddr == 0
&& segment->p_vaddr != 0
+ && (! bed->want_p_paddr_set_to_zero)
&& isec == 0
&& output_section->lma != 0
&& (output_section->vma == (segment->p_vaddr
LMA address of the output section. */
if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr)
|| IS_CONTAINED_BY_FILEPOS (section, segment, bed)
- || IS_COREFILE_NOTE (segment, section))
+ || IS_COREFILE_NOTE (segment, section)
+ || (bed->want_p_paddr_set_to_zero &&
+ IS_CONTAINED_BY_VMA (output_section, segment))
+ )
{
if (matching_lma == 0)
matching_lma = output_section->lma;
PARAMS ((struct bfd_link_info *, const char *, bfd *));
static struct elf_link_hash_entry *find_arm_glue
PARAMS ((struct bfd_link_info *, const char *, bfd *));
-static void record_arm_to_thumb_glue
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
-static void record_thumb_to_arm_glue
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
static void elf32_arm_post_process_headers
PARAMS ((bfd *, struct bfd_link_info *));
static int elf32_arm_to_thumb_stub
static void arm_add_to_rel
PARAMS ((bfd *, bfd_byte *, reloc_howto_type *, bfd_signed_vma));
#endif
+static enum elf_reloc_type_class elf32_arm_reloc_type_class
+ PARAMS ((const Elf_Internal_Rela *));
+#ifndef ELFARM_NABI_C_INCLUDED
+static void record_arm_to_thumb_glue
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static void record_thumb_to_arm_glue
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
boolean bfd_elf32_arm_allocate_interworking_sections
PARAMS ((struct bfd_link_info *));
boolean bfd_elf32_arm_get_bfd_for_interworking
PARAMS ((bfd *, struct bfd_link_info *));
boolean bfd_elf32_arm_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *, int));
-static enum elf_reloc_type_class elf32_arm_reloc_type_class
- PARAMS ((const Elf_Internal_Rela *));
+#endif
+
#define INTERWORK_FLAG(abfd) (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK)
static const insn32 t2a5_pop_insn = 0xe8bd4040;
static const insn32 t2a6_bx_insn = 0xe12fff1e;
+#ifndef ELFARM_NABI_C_INCLUDED
boolean
bfd_elf32_arm_allocate_interworking_sections (info)
struct bfd_link_info * info;
return false;
}
+#endif
/* The thumb form of a long branch is a bit finicky, because the offset
encoding is split over two fields, each in it's own instruction. They
#define ELF_ARCH bfd_arch_arm
#define ELF_MACHINE_CODE EM_ARM
+#ifndef ELF_MAXPAGESIZE
#define ELF_MAXPAGESIZE 0x8000
+#endif
#define bfd_elf32_bfd_copy_private_bfd_data elf32_arm_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data elf32_arm_merge_private_bfd_data
#define elf_backend_plt_header_size PLT_ENTRY_SIZE
#include "elf32-target.h"
+
static void bfd_elf_avr_final_write_processing PARAMS ((bfd *, boolean));
static boolean elf32_avr_object_p PARAMS ((bfd *));
-/* Use RELA instead of REL */
-#undef USE_REL
-
static reloc_howto_type elf_avr_howto_table[] =
{
HOWTO (R_AVR_NONE, /* type */
Elf_Internal_Rela * rel;
Elf_Internal_Rela * relend;
+ if (info->relocateable)
+ return true;
+
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
relend = relocs + input_section->reloc_count;
const char * name = NULL;
int r_type;
+ /* This is a final link. */
r_type = ELF32_R_TYPE (rel->r_info);
r_symndx = ELF32_R_SYM (rel->r_info);
-
- if (info->relocateable)
- {
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
-
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections [r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
- }
- }
-
- continue;
- }
-
- /* This is a final link. */
howto = elf_avr_howto_table + ELF32_R_TYPE (rel->r_info);
h = NULL;
sym = NULL;
#define elf_backend_gc_sweep_hook elf32_avr_gc_sweep_hook
#define elf_backend_check_relocs elf32_avr_check_relocs
#define elf_backend_can_gc_sections 1
+#define elf_backend_rela_normal 1
#define elf_backend_final_write_processing \
bfd_elf_avr_final_write_processing
#define elf_backend_object_p elf32_avr_object_p
Elf_Internal_Rela * rel;
Elf_Internal_Rela * relend;
+ if (info->relocateable)
+ return true;
+
dynobj = elf_hash_table (info)->dynobj;
local_got_offsets = elf_local_got_offsets (input_bfd);
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
|| r_type == R_CRIS_GNU_VTENTRY)
continue;
- r_symndx = ELF32_R_SYM (rel->r_info);
-
- if (info->relocateable)
- {
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
-
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections [r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
- }
- }
-
- continue;
- }
-
/* This is a final link. */
+ r_symndx = ELF32_R_SYM (rel->r_info);
howto = cris_elf_howto_table + r_type;
h = NULL;
sym = NULL;
take the easy route. */
#define elf_backend_may_use_rel_p 0
#define elf_backend_may_use_rela_p 1
+#define elf_backend_rela_normal 1
#include "elf32-target.h"
}
\f
/* Relocate an FR30 ELF section.
- There is some attempt to make this function usable for many architectures,
- both USE_REL and USE_RELA ['twould be nice if such a critter existed],
- if only to serve as a learning tool.
The RELOCATE_SECTION function is called by the new ELF backend linker
to handle the relocations for a section.
\f
/* Relocate an FRV ELF section.
- There is some attempt to make this function usable for many architectures,
- both USE_REL and USE_RELA ['twould be nice if such a critter existed],
- if only to serve as a learning tool.
The RELOCATE_SECTION function is called by the new ELF backend linker
to handle the relocations for a section.
static boolean
elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, local_syms, local_sections)
+ contents, relocs, local_syms, local_sections)
bfd * output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info * info;
bfd * input_bfd;
Elf_Internal_Rela * rel;
Elf_Internal_Rela * relend;
+ if (info->relocateable)
+ return true;
+
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
relend = relocs + input_section->reloc_count;
|| r_type == R_FRV_GNU_VTENTRY)
continue;
- r_symndx = ELF32_R_SYM (rel->r_info);
-
- if (info->relocateable)
- {
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
-
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections [r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
- }
- }
-
- continue;
- }
-
/* This is a final link. */
+ r_symndx = ELF32_R_SYM (rel->r_info);
howto = elf32_frv_howto_table + ELF32_R_TYPE (rel->r_info);
h = NULL;
sym = NULL;
#define elf_backend_add_symbol_hook elf32_frv_add_symbol_hook
#define elf_backend_can_gc_sections 1
+#define elf_backend_rela_normal 1
#define bfd_elf32_bfd_reloc_type_lookup frv_reloc_type_lookup
#define bfd_elf32_bfd_set_private_flags frv_elf_set_private_flags
struct elf_link_hash_entry **sym_hashes;
Elf_Internal_Rela *rel, *relend;
+ if (info->relocateable)
+ return true;
+
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
bfd_vma relocation;
bfd_reloc_status_type r;
+ /* This is a final link. */
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
-
- if (info->relocateable)
- {
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections[r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
- }
- }
-
- continue;
- }
-
- /* This is a final link. */
h = NULL;
sym = NULL;
sec = NULL;
/* Use an H8 specific linker, not the ELF generic linker. */
#define elf_backend_relocate_section elf32_h8_relocate_section
+#define elf_backend_rela_normal 1
/* And relaxing stuff. */
#define bfd_elf32_bfd_relax_section elf32_h8_relax_section
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
+ if (info->relocateable)
+ return true;
+
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
htab = hppa_link_hash_table (info);
|| r_type == (unsigned int) R_PARISC_GNU_VTINHERIT)
continue;
- r_symndx = ELF32_R_SYM (rel->r_info);
-
- if (info->relocateable)
- {
- /* This is a relocatable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sym_sec = local_sections[r_symndx];
- rel->r_addend += sym_sec->output_offset;
- }
- }
- continue;
- }
-
/* This is a final link. */
+ r_symndx = ELF32_R_SYM (rel->r_info);
h = NULL;
sym = NULL;
sym_sec = NULL;
#define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 8
+#define elf_backend_rela_normal 1
#define TARGET_BIG_SYM bfd_elf32_hppa_vec
#define TARGET_BIG_NAME "elf32-hppa"
#include "elf-bfd.h"
#include "elf/i370.h"
-#define USE_RELA /* we want RELA relocations, not REL */
-
/* i370 relocations */
/* Note that there is really just one relocation that we currently
* support (and only one that we seem to need, at the moment), and
ret->srelplt = NULL;
ret->sdynbss = NULL;
ret->srelbss = NULL;
+ ret->tls_ldm_got.refcount = 0;
ret->sym_sec.abfd = NULL;
return &ret->elf.root;
eind->dyn_relocs = NULL;
}
+ if (ind->root.type == bfd_link_hash_indirect
+ && dir->got.refcount <= 0)
+ {
+ edir->tls_type = eind->tls_type;
+ eind->tls_type = GOT_UNKNOWN;
+ }
_bfd_elf_link_hash_copy_indirect (dir, ind);
}
outrel.r_offset = (htab->sgot->output_section->vma
+ htab->sgot->output_offset + off);
- bfd_put_32 (output_bfd, 0,
- htab->sgot->contents + off);
indx = h && h->dynindx != -1 ? h->dynindx : 0;
if (r_type == R_386_TLS_GD)
dr_type = R_386_TLS_DTPMOD32;
else
dr_type = R_386_TLS_TPOFF32;
+ if (dr_type == R_386_TLS_TPOFF32 && indx == 0)
+ bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
+ htab->sgot->contents + off);
+ else
+ bfd_put_32 (output_bfd, 0,
+ htab->sgot->contents + off);
outrel.r_info = ELF32_R_INFO (indx, dr_type);
loc = (Elf32_External_Rel *) htab->srelgot->contents;
loc += htab->srelgot->reloc_count++;
Copyright 2002
Free Software Foundation, Inc.
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ELF32_I386_C_INCLUDED
#include "elf32-i386.c"
- /* Returns the end address of the segment + 1. */
-#define SEGMENT_END(segment, start) \
- (start + (segment->p_memsz > segment->p_filesz \
- ? segment->p_memsz : segment->p_filesz))
-
-static boolean elf_i386qnx_copy_private_bfd_data_p
- PARAMS ((bfd *, asection *, bfd *, asection *));
-static boolean elf_i386qnx_is_contained_by_filepos
- PARAMS ((asection *, Elf_Internal_Phdr *));
-static void elf_i386qnx_set_nonloadable_filepos
- PARAMS ((bfd *, Elf_Internal_Phdr *));
-
-static boolean
-elf_i386qnx_copy_private_bfd_data_p (ibfd, isec, obfd, osec)
- bfd *ibfd;
- asection *isec;
- bfd *obfd;
- asection *osec;
-{
- /* We don't use these parameters, but another target might. */
- ibfd = ibfd;
- obfd = obfd;
- osec = osec;
- return isec->next == NULL;
-}
-
-static boolean
-elf_i386qnx_is_contained_by_filepos (section, segment)
- asection *section;
- Elf_Internal_Phdr *segment;
-{
- return ((bfd_vma) section->filepos >= segment->p_offset
- && ((bfd_vma) section->filepos + section->_raw_size
- <= SEGMENT_END (segment, segment->p_offset)));
-}
-
-static void
-elf_i386qnx_set_nonloadable_filepos (abfd, phdrs)
- bfd *abfd;
- Elf_Internal_Phdr *phdrs;
-{
- struct elf_segment_map *m;
- Elf_Internal_Phdr *p;
- file_ptr off = 0;
-
- for (m = elf_tdata (abfd)->segment_map, p = phdrs;
- m != NULL;
- m = m->next, p++)
- {
- unsigned int i;
- asection **secpp;
-
- for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
- {
- asection *sec;
-
- sec = *secpp;
-
- if (p->p_type == PT_LOAD)
- off = sec->filepos;
- else
- {
- if (i == 0)
- {
- if (sec->filepos)
- p->p_offset = sec->filepos;
- else
- p->p_offset = off;
- }
- if (!sec->filepos)
- {
- off += sec->_raw_size;
- p->p_filesz += sec->_raw_size;
- }
- }
- }
- }
- return;
-}
+#include "elf32-qnx.h"
#undef TARGET_LITTLE_SYM
#define TARGET_LITTLE_SYM bfd_elf32_i386qnx_vec
-#define elf_backend_set_nonloadable_filepos elf_i386qnx_set_nonloadable_filepos
-#define elf_backend_is_contained_by_filepos elf_i386qnx_is_contained_by_filepos
-#define elf_backend_copy_private_bfd_data_p elf_i386qnx_copy_private_bfd_data_p
-
#include "elf32-target.h"
+
/* Relocate an i860 ELF section.
This is boiler-plate code copied from fr30.
- There is some attempt to make this function usable for many architectures,
- both USE_REL and USE_RELA ['twould be nice if such a critter existed],
- if only to serve as a learning tool.
The RELOCATE_SECTION function is called by the new ELF backend linker
to handle the relocations for a section.
-/* Scenix IP2xxx specific support for 32-bit ELF
+/* Ubicom IP2xxx specific support for 32-bit ELF
Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
Elf_Internal_Shdr * symtab_hdr;
Elf_Internal_Rela * irelbase;
bfd_byte * contents;
- bfd_byte * free_contents;
- Elf32_External_Sym * extsyms;
- Elf32_External_Sym * free_extsyms;
- Elf_Internal_Rela * free_relocs;
+ Elf_Internal_Sym * isymbuf;
};
/* Prototypes. */
static void ip2k_info_to_howto_rela PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
static asection * ip2k_elf_gc_mark_hook PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *));
static boolean ip2k_elf_gc_sweep_hook PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *));
-static bfd_vma symbol_value PARAMS ((bfd *, Elf_Internal_Shdr *, Elf32_External_Sym *, Elf_Internal_Rela *));
+static bfd_vma symbol_value PARAMS ((bfd *, Elf_Internal_Shdr *, Elf32_Internal_Sym *, Elf_Internal_Rela *));
static void adjust_all_relocations PARAMS ((bfd *, asection *, bfd_vma, bfd_vma, int, int));
static boolean ip2k_elf_relax_delete_bytes PARAMS ((bfd *, asection *, bfd_vma, int));
static boolean ip2k_elf_relax_add_bytes PARAMS ((bfd *, asection *, bfd_vma, const bfd_byte *, int, int));
static boolean unrelax_switch_dispatch_tables_passN PARAMS ((bfd *, asection *, bfd_vma, boolean *, struct misc *));
static boolean is_switch_128_dispatch_table_p PARAMS ((bfd *, bfd_vma, boolean, struct misc *));
static boolean is_switch_256_dispatch_table_p PARAMS ((bfd *, bfd_vma, boolean, struct misc *));
-static void tidyup_after_error PARAMS ((struct misc *));
static boolean ip2k_elf_relax_section_pass1 PARAMS ((bfd *, asection *, boolean *, struct misc *));
static boolean ip2k_elf_relax_section_passN PARAMS ((bfd *, asection *, boolean *, boolean *, struct misc *));
static bfd_reloc_status_type ip2k_final_link_relocate PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, bfd_vma));
/* Return the value of the symbol associated with the relocation IREL. */
static bfd_vma
-symbol_value (abfd, symtab_hdr, extsyms, irel)
+symbol_value (abfd, symtab_hdr, isymbuf, irel)
bfd *abfd;
Elf_Internal_Shdr *symtab_hdr;
- Elf32_External_Sym *extsyms;
+ Elf32_Internal_Sym *isymbuf;
Elf_Internal_Rela *irel;
{
if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
{
- Elf_External_Sym_Shndx *sym_shndx;
- Elf_Internal_Shdr *shndx_hdr;
- Elf_Internal_Sym isym;
+ Elf_Internal_Sym *isym;
asection *sym_sec;
- shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
- sym_shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
- sym_shndx = sym_shndx ? sym_shndx + ELF32_R_SYM (irel->r_info) : NULL;
- bfd_elf32_swap_symbol_in (abfd, extsyms + ELF32_R_SYM (irel->r_info),
- sym_shndx, &isym);
- if (isym.st_shndx == SHN_UNDEF)
+ isym = isymbuf + ELF32_R_SYM (irel->r_info);
+ if (isym->st_shndx == SHN_UNDEF)
sym_sec = bfd_und_section_ptr;
- else if (isym.st_shndx == SHN_ABS)
+ else if (isym->st_shndx == SHN_ABS)
sym_sec = bfd_abs_section_ptr;
- else if (isym.st_shndx == SHN_COMMON)
+ else if (isym->st_shndx == SHN_COMMON)
sym_sec = bfd_com_section_ptr;
else
- sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
+ sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
- return isym.st_value + BASEADDR (sym_sec);
+ return isym->st_value + BASEADDR (sym_sec);
}
else
{
struct bfd_link_info *link_info;
boolean *again;
{
- Elf_External_Sym_Shndx *shndx_buf;
- Elf_Internal_Shdr *shndx_hdr;
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Rela *internal_relocs;
+ bfd_byte *contents = NULL;
+ Elf_Internal_Sym *isymbuf = NULL;
static asection * first_section = NULL;
static asection * last_section = NULL;
static boolean changed = false;
if (pass == 1)
last_section = sec;
- misc.symtab_hdr = NULL;
- misc.irelbase = NULL;
- misc.contents = NULL;
- misc.free_contents = NULL;
- misc.extsyms = NULL;
- misc.free_extsyms = NULL;
- misc.free_relocs = NULL;
-
/* If this is the first time we have been called
for this section, initialise the cooked size. */
if (sec->_cooked_size == 0)
sec->_cooked_size = sec->_raw_size;
- misc.symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
-
- misc.irelbase = _bfd_elf32_link_read_relocs (abfd, sec, NULL,
- (Elf_Internal_Rela *)NULL,
- link_info->keep_memory);
- if (misc.irelbase == NULL)
- {
- tidyup_after_error (&misc);
- return false;
- }
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- if (! link_info->keep_memory)
- misc.free_relocs = misc.irelbase;
+ internal_relocs = _bfd_elf32_link_read_relocs (abfd, sec, NULL,
+ (Elf_Internal_Rela *)NULL,
+ link_info->keep_memory);
+ if (internal_relocs == NULL)
+ goto error_return;
/* Make sure the stac.rela stuff gets read in. */
stab = bfd_get_section_by_name (abfd, ".stab");
}
/* Get section contents cached copy if it exists. */
- if (elf_section_data (sec)->this_hdr.contents != NULL)
- misc.contents = elf_section_data (sec)->this_hdr.contents;
- else
+ if (contents == NULL)
{
- /* Go get them of disk. */
- misc.contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
- if (misc.contents == NULL)
- {
- tidyup_after_error (&misc);
- return false;
- }
-
- misc.free_contents = misc.contents;
- if (! bfd_get_section_contents (abfd, sec, misc.contents,
- (file_ptr)0,
- sec->_raw_size))
+ /* Get cached copy if it exists. */
+ if (elf_section_data (sec)->this_hdr.contents != NULL)
+ contents = elf_section_data (sec)->this_hdr.contents;
+ else
{
- tidyup_after_error (&misc);
- return false;
+ /* Go get them off disk. */
+ contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
+ if (contents == NULL)
+ goto error_return;
+
+ if (! bfd_get_section_contents (abfd, sec, contents,
+ (file_ptr) 0, sec->_raw_size))
+ goto error_return;
}
}
-
+
/* Read this BFD's symbols cached copy if it exists. */
- if (misc.symtab_hdr->contents != NULL)
- misc.extsyms = (Elf32_External_Sym *) misc.symtab_hdr->contents;
- else
+ if (isymbuf == NULL && symtab_hdr->sh_info != 0)
{
- /* Go get them off disk. */
- misc.extsyms = ((Elf32_External_Sym *)bfd_malloc (misc.symtab_hdr->sh_size));
- if (misc.extsyms == NULL)
- {
- tidyup_after_error (&misc);
- return false;
- }
-
- misc.free_extsyms = misc.extsyms;
- if (bfd_seek (abfd, misc.symtab_hdr->sh_offset, SEEK_SET) != 0
- || (bfd_read (misc.extsyms, 1, misc.symtab_hdr->sh_size, abfd)
- != misc.symtab_hdr->sh_size))
- {
- tidyup_after_error (&misc);
- return false;
- }
- }
-
- if (shndx_hdr->sh_size != 0)
- {
- bfd_size_type amt;
-
- amt = misc.symtab_hdr->sh_info * sizeof (Elf_External_Sym_Shndx);
- shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
- if (shndx_buf == NULL)
- {
- tidyup_after_error (&misc);
- return false;
- }
- if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
- || bfd_bread ((PTR) shndx_buf, amt, abfd) != amt)
- {
- tidyup_after_error (&misc);
- return false;
- }
- shndx_hdr->contents = (PTR) shndx_buf;
+ isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (isymbuf == NULL)
+ isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+ symtab_hdr->sh_info, 0,
+ NULL, NULL, NULL);
+ if (isymbuf == NULL)
+ goto error_return;
}
+ misc.symtab_hdr = symtab_hdr;
+ misc.isymbuf = isymbuf;
+ misc.irelbase = internal_relocs;
+ misc.contents = contents;
+
/* This is where all the relaxation actually get done. */
if (pass == 1)
we add page instructions back in as needed. */
if (! ip2k_elf_relax_section_pass1 (abfd, sec, again, &misc))
- {
- tidyup_after_error (&misc);
- return false;
- }
+ goto error_return;
changed |= *again;
}
so the we will again interate until we find a new approximate
solution which is closer to the final solution. */
- if (! ip2k_elf_relax_section_passN (abfd, sec, again,
- &final_pass, &misc))
- {
- tidyup_after_error (&misc);
- return false;
- }
+ if (! ip2k_elf_relax_section_passN (abfd, sec, again, &final_pass,
+ &misc))
+ goto error_return;
changed |= *again;
/* Perform some house keeping after relaxing the section. */
- if (misc.free_relocs != NULL)
- {
- free (misc.free_relocs);
- misc.free_relocs = NULL;
- }
-
- if (misc.free_contents != NULL)
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (unsigned char *) isymbuf)
{
if (! link_info->keep_memory)
- free (misc.free_contents);
+ free (isymbuf);
else
- {
- /* Cache the section contents for elf_link_input_bfd. */
- elf_section_data (sec)->this_hdr.contents = misc.contents;
- }
-
- misc.free_contents = NULL;
+ symtab_hdr->contents = (unsigned char *) isymbuf;
}
- if (misc.free_extsyms != NULL)
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
{
if (! link_info->keep_memory)
- free (misc.free_extsyms);
+ free (contents);
else
{
- /* Cache the symbols for elf_link_input_bfd. */
- misc.symtab_hdr->contents = misc.extsyms;
+ /* Cache the section contents for elf_link_input_bfd. */
+ elf_section_data (sec)->this_hdr.contents = contents;
}
-
- misc.free_extsyms = NULL;
}
- return true;
-}
+ if (internal_relocs != NULL
+ && elf_section_data (sec)->relocs != internal_relocs)
+ free (internal_relocs);
-static void
-tidyup_after_error (misc)
- struct misc *misc;
-{
- if (misc->free_relocs != NULL)
- {
- free (misc->free_relocs);
- misc->free_relocs = NULL;
- }
-
- if (misc->free_contents != NULL)
- {
- free (misc->free_contents);
- misc->free_contents = NULL;
- }
-
- if (misc->free_extsyms != NULL)
- {
- free (misc->free_extsyms);
- misc->free_extsyms = NULL;
- }
+ return true;
- return;
+ error_return:
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (unsigned char *) isymbuf)
+ free (isymbuf);
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ free (contents);
+ if (internal_relocs != NULL
+ && elf_section_data (sec)->relocs != internal_relocs)
+ free (internal_relocs);
+ return false;
}
/* This function handles relaxation during the first pass. */
{
/* Note that we've changed the relocs, section contents, etc. */
elf_section_data (sec)->relocs = misc->irelbase;
- misc->free_relocs = NULL;
-
elf_section_data (sec)->this_hdr.contents = misc->contents;
- misc->free_contents = NULL;
-
- misc->symtab_hdr->contents = (bfd_byte *) misc->extsyms;
- misc->free_extsyms = NULL;
+ misc->symtab_hdr->contents = (bfd_byte *) misc->isymbuf;
/* Handle switch dispatch tables/prologues. */
if (! relax_switch_dispatch_tables_pass1 (abfd, sec,
if (ELF32_R_TYPE (irel->r_info) == (int) R_IP2K_ADDR16CJP)
{
/* Get the value of the symbol referred to by the reloc. */
- bfd_vma symval = symbol_value (abfd, misc->symtab_hdr, misc->extsyms,
+ bfd_vma symval = symbol_value (abfd, misc->symtab_hdr, misc->isymbuf,
irel);
bfd_byte code0, code1;
int noadj;
{
Elf_Internal_Shdr *symtab_hdr;
- Elf32_External_Sym *extsyms;
- int shndx, index;
+ Elf_Internal_Sym *isymbuf, *isym, *isymend;
+ unsigned int shndx;
bfd_byte *contents;
Elf_Internal_Rela *irel, *irelend, *irelbase;
- Elf32_External_Sym *esym, *esymend;
- asection *stab;
- bfd_byte *stabp, *stabend, *stabcontents;
- Elf_Internal_Shdr *shndx_hdr;
- Elf_External_Sym_Shndx *sym_shndx;
+ struct elf_link_hash_entry **sym_hashes;
+ struct elf_link_hash_entry **end_hashes;
+ unsigned int symcount;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- extsyms = (Elf32_External_Sym *) symtab_hdr->contents;
+ isymbuf = (Elf32_Internal_Sym *) symtab_hdr->contents;
shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
/* Get the value of the symbol referred to by the reloc. */
if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
{
- Elf_Internal_Sym isym;
asection *sym_sec;
- Elf_External_Sym_Shndx *sym_shndx;
- Elf_Internal_Shdr *shndx_hdr;
/* A local symbol. */
-
- shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
- sym_shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
- sym_shndx = (sym_shndx
- ? sym_shndx + ELF32_R_SYM (irel->r_info) : NULL);
- bfd_elf32_swap_symbol_in (abfd,
- extsyms + ELF32_R_SYM (irel->r_info),
- sym_shndx, &isym);
-
- if (isym.st_shndx == SHN_UNDEF)
- sym_sec = bfd_und_section_ptr;
- else if (isym.st_shndx == SHN_ABS)
- sym_sec = bfd_abs_section_ptr;
- else if (isym.st_shndx == SHN_COMMON)
- sym_sec = bfd_com_section_ptr;
- else
- sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
-
- if (sym_sec == sec)
+ isym = isymbuf + ELF32_R_SYM (irel->r_info);
+ sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+
+ if (isym->st_shndx == shndx)
{
bfd_vma baseaddr = BASEADDR (sec);
- bfd_vma symval = BASEADDR (sym_sec) + isym.st_value
+ bfd_vma symval = BASEADDR (sym_sec) + isym->st_value
+ irel->r_addend;
if ((baseaddr + addr + noadj) <= symval
irel->r_offset += count;
}
- /* Now fix the stab relocations. */
- stab = bfd_get_section_by_name (abfd, ".stab");
- if (stab)
- {
- irelbase = elf_section_data (stab)->relocs;
- irelend = irelbase + stab->reloc_count;
-
- /* Pull out the contents of the stab section. */
- if (elf_section_data (stab)->this_hdr.contents != NULL)
- stabcontents = elf_section_data (stab)->this_hdr.contents;
- else
- {
- stabcontents = (bfd_byte *) bfd_alloc (abfd, stab->_raw_size);
- if (stabcontents == NULL)
- return;
- if (! bfd_get_section_contents (abfd, stab, stabcontents,
- (file_ptr) 0, stab->_raw_size))
- return;
-
- /* We need to remember this. */
- elf_section_data (stab)->this_hdr.contents = stabcontents;
- }
-
- stabend = stabcontents + stab->_raw_size;
-
- for (irel = irelbase; irel < irelend; irel++)
- {
- if (ELF32_R_TYPE (irel->r_info) != R_IP2K_NONE)
- {
- /* Get the value of the symbol referred to by the reloc. */
- if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
- {
- Elf_Internal_Sym isym;
- asection *sym_sec;
- Elf_External_Sym_Shndx *sym_shndx;
- Elf_Internal_Shdr *shndx_hdr;
-
- /* A local symbol. */
- shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
- sym_shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
- sym_shndx = (sym_shndx
- ? sym_shndx + ELF32_R_SYM (irel->r_info)
- : NULL);
-
- bfd_elf32_swap_symbol_in (abfd,
- (extsyms
- + ELF32_R_SYM (irel->r_info)),
- sym_shndx, &isym);
-
- if (isym.st_shndx == SHN_UNDEF)
- sym_sec = bfd_und_section_ptr;
- else if (isym.st_shndx == SHN_ABS)
- sym_sec = bfd_abs_section_ptr;
- else if (isym.st_shndx == SHN_COMMON)
- sym_sec = bfd_com_section_ptr;
- else
- sym_sec = bfd_section_from_elf_index (abfd, isym.st_shndx);
-
- if (sym_sec == sec)
- {
- const char *name;
- unsigned long strx;
- unsigned char type, other;
- unsigned short desc;
- bfd_vma value;
- bfd_vma baseaddr = BASEADDR (sec);
- bfd_vma symval = BASEADDR (sym_sec) + isym.st_value
- + irel->r_addend;
-
- if ((baseaddr + addr) <= symval
- && symval <= (baseaddr + endaddr))
- irel->r_addend += count;
-
- /* Go hunt up a function and fix its line info if needed. */
- stabp = stabcontents + irel->r_offset - 8;
-
- /* Go pullout the stab entry. */
- strx = bfd_h_get_32 (abfd, stabp + STRDXOFF);
- type = bfd_h_get_8 (abfd, stabp + TYPEOFF);
- other = bfd_h_get_8 (abfd, stabp + OTHEROFF);
- desc = bfd_h_get_16 (abfd, stabp + DESCOFF);
- value = bfd_h_get_32 (abfd, stabp + VALOFF);
-
- name = bfd_get_stab_name (type);
-
- if (strcmp (name, "FUN") == 0)
- {
- int function_adjusted = 0;
-
- if (symval > (baseaddr + addr))
- /* Not in this function. */
- continue;
-
- /* Hey we got a function hit. */
- stabp += STABSIZE;
- for (;stabp < stabend; stabp += STABSIZE)
- {
- /* Go pullout the stab entry. */
- strx = bfd_h_get_32 (abfd, stabp + STRDXOFF);
- type = bfd_h_get_8 (abfd, stabp + TYPEOFF);
- other = bfd_h_get_8 (abfd, stabp + OTHEROFF);
- desc = bfd_h_get_16 (abfd, stabp + DESCOFF);
- value = bfd_h_get_32 (abfd, stabp + VALOFF);
- name = bfd_get_stab_name (type);
-
- if (strcmp (name, "FUN") == 0)
- {
- /* Hit another function entry. */
- if (function_adjusted)
- {
- /* Adjust the value. */
- value += count;
-
- /* We need to put it back. */
- bfd_h_put_32 (abfd, value,stabp + VALOFF);
- }
-
- /* And then bale out. */
- break;
- }
-
- if (strcmp (name, "SLINE") == 0)
- {
- /* Got a line entry. */
- if ((baseaddr + addr) <= (symval + value))
- {
- /* Adjust the line entry. */
- value += count;
-
- /* We need to put it back. */
- bfd_h_put_32 (abfd, value,stabp + VALOFF);
- function_adjusted = 1;
- }
- }
- }
- }
- }
- }
- }
- }
- }
-
/* When adding an instruction back it is sometimes necessary to move any
global or local symbol that was referencing the first instruction of
the moved block to refer to the first instruction of the inserted block.
addr += noadj;
/* Adjust the local symbols defined in this section. */
- shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
- sym_shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
- esym = extsyms;
- esymend = esym + symtab_hdr->sh_info;
- for (; esym < esymend; esym++, sym_shndx = (sym_shndx ? sym_shndx + 1: NULL))
+ isymend = isymbuf + symtab_hdr->sh_info;
+ for (isym = isymbuf; isym < isymend; isym++)
{
- Elf_Internal_Sym isym;
- Elf_External_Sym_Shndx dummy;
-
- bfd_elf32_swap_symbol_in (abfd, esym, sym_shndx, &isym);
-
- if (isym.st_shndx == shndx)
- {
- if (addr <= isym.st_value && isym.st_value < endaddr)
- {
- isym.st_value += count;
- bfd_elf32_swap_symbol_out (abfd, &isym, esym, &dummy);
- }
- }
+ if (isym->st_shndx == shndx
+ && addr <= isym->st_value
+ && isym->st_value < endaddr)
+ isym->st_value += count;
}
- /* Now adjust the global symbols defined in this section. */
- shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
- sym_shndx = (Elf_External_Sym_Shndx *) shndx_hdr->contents;
- esym = extsyms + symtab_hdr->sh_info;
- esymend = extsyms + (symtab_hdr->sh_size / sizeof (Elf32_External_Sym));
- for (index = 0; esym < esymend;
- esym++, index++, sym_shndx = (sym_shndx ? sym_shndx + 1: NULL))
+ /* Now adjust the global symbols defined in this section. */
+ symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+ - symtab_hdr->sh_info);
+ sym_hashes = elf_sym_hashes (abfd);
+ end_hashes = sym_hashes + symcount;
+ for (; sym_hashes < end_hashes; sym_hashes++)
{
- Elf_Internal_Sym isym;
- struct elf_link_hash_entry *sym_hash;
-
- bfd_elf32_swap_symbol_in (abfd, esym, sym_shndx, &isym);
- sym_hash = elf_sym_hashes (abfd)[index];
-
- if (isym.st_shndx == shndx
- && (sym_hash->root.type == bfd_link_hash_defined
- || sym_hash->root.type == bfd_link_hash_defweak)
- && sym_hash->root.u.def.section == sec)
- {
+ struct elf_link_hash_entry *sym_hash = *sym_hashes;
+ if ((sym_hash->root.type == bfd_link_hash_defined
+ || sym_hash->root.type == bfd_link_hash_defweak)
+ && sym_hash->root.u.def.section == sec)
+ {
if (addr <= sym_hash->root.u.def.value
&& sym_hash->root.u.def.value < endaddr)
{
- Elf_External_Sym_Shndx dummy;
-
sym_hash->root.u.def.value += count;
- bfd_elf32_swap_symbol_out (abfd, &isym, esym, &dummy);
}
- }
+ }
}
return;
{
/* Note that we've changed the relocs, section contents, etc. */
elf_section_data (sec)->relocs = misc->irelbase;
- misc->free_relocs = NULL;
-
elf_section_data (sec)->this_hdr.contents = misc->contents;
- misc->free_contents = NULL;
-
- misc->symtab_hdr->contents = (bfd_byte *) misc->extsyms;
- misc->free_extsyms = NULL;
+ misc->symtab_hdr->contents = (bfd_byte *) misc->isymbuf;
/* Add the PAGE insn. */
if (! ip2k_elf_relax_add_bytes (abfd, sec, irel->r_offset,
}
/* Relocate a IP2K ELF section.
- There is some attempt to make this function usable for many architectures,
- both USE_REL and USE_RELA ['twould be nice if such a critter existed],
- if only to serve as a learning tool.
The RELOCATE_SECTION function is called by the new ELF backend linker
to handle the relocations for a section.
Elf_Internal_Rela * rel;
Elf_Internal_Rela * relend;
+ if (info->relocateable)
+ return true;
+
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
relend = relocs + input_section->reloc_count;
const char * name = NULL;
int r_type;
+ /* This is a final link. */
r_type = ELF32_R_TYPE (rel->r_info);
-
r_symndx = ELF32_R_SYM (rel->r_info);
-
- if (info->relocateable)
- {
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
-
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections [r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
- }
- }
-
- continue;
- }
-
- /* This is a final link. */
howto = ip2k_elf_howto_table + ELF32_R_TYPE (rel->r_info);
h = NULL;
sym = NULL;
#define ELF_MACHINE_CODE EM_IP2K
#define ELF_MAXPAGESIZE 1 /* No pages on the IP2K */
-#undef USE_REL
-#define USE_RELA
-
#define elf_info_to_howto_rel NULL
#define elf_info_to_howto ip2k_info_to_howto_rela
#define elf_backend_can_gc_sections 1
+#define elf_backend_rela_normal 1
#define elf_backend_gc_mark_hook ip2k_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook ip2k_elf_gc_sweep_hook
\f
/* Relocate an M32R/D ELF section.
There is some attempt to make this function usable for many architectures,
- both USE_REL and USE_RELA ['twould be nice if such a critter existed],
- if only to serve as a learning tool.
+ both for RELA and REL type relocs, if only to serve as a learning tool.
The RELOCATE_SECTION function is called by the new ELF backend linker
to handle the relocations for a section.
#define bfd_elf32_bfd_reloc_type_lookup reloc_type_lookup
#define ELF_ARCH bfd_arch_m68k
/* end code generated by elf.el */
-
-#define USE_RELA
\f
/* Functions for the m68k ELF linker. */
#include "elf/mcore.h"
#include <assert.h>
-#define USE_RELA /* Only USE_REL is actually significant, but this is
- here are a reminder... */
+/* RELA relocs are used here... */
static void mcore_elf_howto_init
PARAMS ((void));
static const struct elf_reloc_map mips_reloc_map[] =
{
- { BFD_RELOC_NONE, R_MIPS_NONE, },
+ { BFD_RELOC_NONE, R_MIPS_NONE },
{ BFD_RELOC_16, R_MIPS_16 },
{ BFD_RELOC_32, R_MIPS_32 },
/* There is no BFD reloc for R_MIPS_REL32. */
if (SGI_COMPAT (abfd))
elf_bad_symtab (abfd) = true;
+ if (ABI_N32_P (abfd))
+ return false;
+
mach = _bfd_elf_mips_mach (elf_elfheader (abfd)->e_flags);
bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach);
}
/* Relocate an OpenRISC ELF section.
- There is some attempt to make this function usable for many architectures,
- both USE_REL and USE_RELA ['twould be nice if such a critter existed],
- if only to serve as a learning tool.
The RELOCATE_SECTION function is called by the new ELF backend linker
to handle the relocations for a section.
#include "elf-bfd.h"
#include "elf/ppc.h"
-#define USE_RELA /* we want RELA relocations, not REL */
+/* RELA relocations are used here. */
static reloc_howto_type *ppc_elf_reloc_type_lookup
PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
#define elf_backend_grok_psinfo ppc_elf_grok_psinfo
#define elf_backend_reloc_type_class ppc_elf_reloc_type_class
+#ifndef ELF32_PPC_C_INCLUDED
#include "elf32-target.h"
+#endif
+
static boolean elf_s390_object_p PARAMS ((bfd *));
static boolean elf_s390_grok_prstatus PARAMS ((bfd *, Elf_Internal_Note *));
-#define USE_RELA 1 /* We want RELA relocations, not REL. */
-
#include "elf/s390.h"
/* The relocation "howto" table. */
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
+ if (info->relocateable)
+ return true;
+
dynobj = elf_hash_table (info)->dynobj;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
}
howto = _bfd_sparc_elf_howto_table + r_type;
- r_symndx = ELF32_R_SYM (rel->r_info);
-
- if (info->relocateable)
- {
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections[r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
- }
- }
-
- continue;
- }
-
/* This is a final link. */
+ r_symndx = ELF32_R_SYM (rel->r_info);
h = NULL;
sym = NULL;
sec = NULL;
#define elf_backend_want_plt_sym 1
#define elf_backend_got_header_size 4
#define elf_backend_plt_header_size (4*PLT_ENTRY_SIZE)
+#define elf_backend_rela_normal 1
#include "elf32-target.h"
Elf_Internal_Rela * rel;
Elf_Internal_Rela * relend;
+ if (info->relocateable)
+ return true;
+
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
|| r_type == R_V850_GNU_VTINHERIT)
continue;
- howto = v850_elf_howto_table + r_type;
-
- if (info->relocateable)
- {
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections[r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
- }
- }
-
- continue;
- }
-
/* This is a final link. */
+ howto = v850_elf_howto_table + r_type;
h = NULL;
sym = NULL;
sec = NULL;
#define elf_backend_gc_sweep_hook v850_elf_gc_sweep_hook
#define elf_backend_can_gc_sections 1
+#define elf_backend_rela_normal 1
#define bfd_elf32_bfd_is_local_label_name v850_elf_is_local_label_name
#define bfd_elf32_bfd_reloc_type_lookup v850_elf_reloc_type_lookup
#define bfd_elf32_bfd_reloc_type_lookup reloc_type_lookup
#define ELF_ARCH bfd_arch_vax
/* end code generated by elf.el */
-
-#define USE_RELA
\f
/* Functions for the VAX ELF linker. */
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
+ if (info->relocateable)
+ return true;
+
dynobj = elf_hash_table (info)->dynobj;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
}
howto = howto_table + r_type;
- r_symndx = ELF32_R_SYM (rel->r_info);
-
- if (info->relocateable)
- {
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections[r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
- }
- }
-
- continue;
- }
-
/* This is a final link. */
+ r_symndx = ELF32_R_SYM (rel->r_info);
h = NULL;
sym = NULL;
sec = NULL;
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 16
+#define elf_backend_rela_normal 1
#include "elf32-target.h"
}
\f
/* Relocate an XSTORMY16 ELF section.
- There is some attempt to make this function usable for many architectures,
- both USE_REL and USE_RELA ['twould be nice if such a critter existed],
- if only to serve as a learning tool.
The RELOCATE_SECTION function is called by the new ELF backend linker
to handle the relocations for a section.
#define elf_backend_fake_sections elf_hppa_fake_sections
#define elf_backend_add_symbol_hook elf_hppa_add_symbol_hook
-#define elf_backend_relocate_section elf_hppa_relocate_section
+#define elf_backend_relocate_section elf_hppa_relocate_section
#define bfd_elf64_bfd_final_link elf_hppa_final_link
#define elf_backend_type_change_ok true
#define elf_backend_get_symbol_type elf64_hppa_elf_get_symbol_type
#define elf_backend_reloc_type_class elf64_hppa_reloc_type_class
+#define elf_backend_rela_normal 1
#include "elf64-target.h"
. generally untested.
. - Relocation handling for RELA relocs related to GOT support are
. also likely to be wrong.
- . - Support for MIPS16 is only partially implemented.
- . - Embedded PIC is only partially implemented (is it needed?).
+ . - Support for MIPS16 is untested.
. - Combined relocs with RSS_* entries are unsupported.
. - The whole GOT handling for NewABI is missing, some parts of
. the OldABI version is still lying around and should be removed.
PARAMS((bfd *, asection *, Elf_Internal_Shdr *, int *, PTR));
static bfd_reloc_status_type mips_elf64_hi16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type mips_elf64_higher_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type mips_elf64_highest_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips_elf64_gprel16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_reloc_status_type mips_elf64_gprel16_reloca
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips_elf64_literal_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips_elf64_gprel32_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_reloc_status_type mips_elf64_got16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type mips16_jump_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static bfd_reloc_status_type mips16_gprel_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean mips_elf64_assign_gp PARAMS ((bfd *, bfd_vma *));
static bfd_reloc_status_type mips_elf64_final_gp
PARAMS ((bfd *, asymbol *, boolean, char **, bfd_vma *));
static boolean mips_elf64_object_p PARAMS ((bfd *));
static irix_compat_t elf64_mips_irix_compat PARAMS ((bfd *));
-extern const bfd_target bfd_elf64_tradbigmips_vec;
-extern const bfd_target bfd_elf64_tradlittlemips_vec;
-
-static bfd_vma prev_reloc_addend = 0;
-static bfd_size_type prev_reloc_address = 0;
-
-/* Whether we are trying to be compatible with IRIX6 (or little endianers
- which are otherwise IRIX-ABI compliant). */
-#define SGI_COMPAT(abfd) \
- (elf64_mips_irix_compat (abfd) != ict_none)
+extern const bfd_target bfd_elf64_bigmips_vec;
+extern const bfd_target bfd_elf64_littlemips_vec;
/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
from smaller values. Start with zero, widen, *then* decrement. */
\f
/* The relocation table used for SHT_REL sections. */
-#define UNUSED_RELOC(num) { num, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
-
static reloc_howto_type mips_elf64_howto_table_rel[] =
{
/* No relocation. */
0x03ffffff, /* dst_mask */
false), /* pcrel_offset */
+ /* R_MIPS_HI16 and R_MIPS_LO16 are unsupported for NewABI REL.
+ However, the native IRIX6 tools use them, so we try our best. */
+
/* High 16 bits of symbol value. */
HOWTO (R_MIPS_HI16, /* type */
0, /* rightshift */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf64_hi16_reloc, /* special_function */
"R_MIPS_HI16", /* name */
true, /* partial_inplace */
0x0000ffff, /* src_mask */
true), /* pcrel_offset */
/* 16 bit call through global offset table. */
- /* FIXME: This is not handled correctly. */
HOWTO (R_MIPS_CALL16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
- UNUSED_RELOC (13),
- UNUSED_RELOC (14),
- UNUSED_RELOC (15),
+ EMPTY_HOWTO (13),
+ EMPTY_HOWTO (14),
+ EMPTY_HOWTO (15),
/* A 5 bit shift field. */
HOWTO (R_MIPS_SHIFT5, /* type */
false), /* pcrel_offset */
/* Displacement in the global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_DISP, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* Displacement to page pointer in the global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_PAGE, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* Offset from page pointer in the global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_OFST, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* High 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_HI16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* Low 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_LO16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* 64 bit substraction. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_SUB, /* type */
0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
- /* Get the higher value of a 64 bit addend. */
- HOWTO (R_MIPS_HIGHER, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- mips_elf64_higher_reloc, /* special_function */
- "R_MIPS_HIGHER", /* name */
- true, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
- false), /* pcrel_offset */
-
- /* Get the highest value of a 64 bit addend. */
- HOWTO (R_MIPS_HIGHEST, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- mips_elf64_highest_reloc, /* special_function */
- "R_MIPS_HIGHEST", /* name */
- true, /* partial_inplace */
- 0x0000ffff, /* src_mask */
- 0x0000ffff, /* dst_mask */
- false), /* pcrel_offset */
+ /* The MIPS ELF64 ABI Draft wants us to support these for REL relocations.
+ We don't, because
+ a) It means building the addend from a R_MIPS_HIGHEST/R_MIPS_HIGHER/
+ R_MIPS_HI16/R_MIPS_LO16 sequence with varying ordering, using
+ fallable heuristics.
+ b) No other NewABI toolchain actually emits such relocations. */
+ EMPTY_HOWTO (R_MIPS_HIGHER),
+ EMPTY_HOWTO (R_MIPS_HIGHEST),
/* High 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_CALL_HI16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* Low 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_CALL_LO16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* Section displacement, used by an associated event location section. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_SCN_DISP, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0x03ffffff, /* dst_mask */
false), /* pcrel_offset */
- /* R_MIPS_HI16 and R_MIPS_LO16 are unsupported for 64 bit REL. */
/* High 16 bits of symbol value. */
HOWTO (R_MIPS_HI16, /* type */
0, /* rightshift */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- mips_elf64_gprel16_reloca, /* special_function */
+ mips_elf64_gprel16_reloc, /* special_function */
"R_MIPS_GPREL16", /* name */
false, /* partial_inplace */
0, /* src_mask */
false), /* pcrel_offset */
/* Reference to global offset table. */
- /* FIXME: This is not handled correctly. */
HOWTO (R_MIPS_GOT16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ mips_elf64_got16_reloc, /* special_function */
"R_MIPS_GOT16", /* name */
false, /* partial_inplace */
0, /* src_mask */
true), /* pcrel_offset */
/* 16 bit call through global offset table. */
- /* FIXME: This is not handled correctly. */
HOWTO (R_MIPS_CALL16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
- UNUSED_RELOC (13),
- UNUSED_RELOC (14),
- UNUSED_RELOC (15),
+ EMPTY_HOWTO (13),
+ EMPTY_HOWTO (14),
+ EMPTY_HOWTO (15),
/* A 5 bit shift field. */
HOWTO (R_MIPS_SHIFT5, /* type */
false), /* pcrel_offset */
/* Displacement in the global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_DISP, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* Displacement to page pointer in the global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_PAGE, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* Offset from page pointer in the global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_OFST, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* High 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_HI16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* Low 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_GOT_LO16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* 64 bit substraction. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_SUB, /* type */
0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* High 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_CALL_HI16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* Low 16 bits of displacement in global offset table. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_CALL_LO16, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
false), /* pcrel_offset */
/* Section displacement, used by an associated event location section. */
- /* FIXME: Not handled correctly. */
HOWTO (R_MIPS_SCN_DISP, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
0x00000000, /* dst_mask */
false), /* pcrel_offset */
};
+
+/* The reloc used for the mips16 jump instruction. */
+static reloc_howto_type elf_mips16_jump_howto =
+ HOWTO (R_MIPS16_26, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 26, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ /* This needs complex overflow
+ detection, because the upper four
+ bits must match the PC. */
+ mips16_jump_reloc, /* special_function */
+ "R_MIPS16_26", /* name */
+ true, /* partial_inplace */
+ 0x3ffffff, /* src_mask */
+ 0x3ffffff, /* dst_mask */
+ false); /* pcrel_offset */
+
+/* The reloc used for the mips16 gprel instruction. */
+static reloc_howto_type elf_mips16_gprel_howto =
+ HOWTO (R_MIPS16_GPREL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ mips16_gprel_reloc, /* special_function */
+ "R_MIPS16_GPREL", /* name */
+ true, /* partial_inplace */
+ 0x07ff001f, /* src_mask */
+ 0x07ff001f, /* dst_mask */
+ false); /* pcrel_offset */
+
+/* GNU extension to record C++ vtable hierarchy */
+static reloc_howto_type elf_mips_gnu_vtinherit_howto =
+ HOWTO (R_MIPS_GNU_VTINHERIT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "R_MIPS_GNU_VTINHERIT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false); /* pcrel_offset */
+
+/* GNU extension to record C++ vtable member usage */
+static reloc_howto_type elf_mips_gnu_vtentry_howto =
+ HOWTO (R_MIPS_GNU_VTENTRY, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_elf_rel_vtable_reloc_fn, /* special_function */
+ "R_MIPS_GNU_VTENTRY", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false); /* pcrel_offset */
\f
/* Swap in a MIPS 64-bit Rel reloc. */
\f
/* Do a R_MIPS_HI16 relocation. */
-bfd_reloc_status_type
-mips_elf64_hi16_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
+static bfd_reloc_status_type
+mips_elf64_hi16_reloc (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
asymbol *symbol;
return bfd_reloc_continue;
}
-/* Do a R_MIPS_HIGHER relocation. */
-
-bfd_reloc_status_type
-mips_elf64_higher_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- /* If we're relocating, and this is an external symbol, we don't
- want to change anything. */
- if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- if (((reloc_entry->addend & 0xffffffff) + 0x80008000)
- & ~0xffffffff)
- reloc_entry->addend += 0x80008000;
-
- return bfd_reloc_continue;
-}
-
-/* Do a R_MIPS_HIGHEST relocation. */
-
-bfd_reloc_status_type
-mips_elf64_highest_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
-{
- /* If we're relocating, and this is an external symbol, we don't
- want to change anything. */
- if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- if (((reloc_entry->addend & 0xffffffffffff) + 0x800080008000)
- & ~0xffffffffffff)
- reloc_entry->addend += 0x800080008000;
-
- return bfd_reloc_continue;
-}
-
/* Do a R_MIPS_GOT16 reloc. This is a reloc against the global offset
table used for PIC code. If the symbol is an external symbol, the
instruction is modified to contain the offset of the appropriate
This implementation suffices for the assembler, but the linker does
not yet know how to create global offset tables. */
-bfd_reloc_status_type
-mips_elf64_got16_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
+static bfd_reloc_status_type
+mips_elf64_got16_reloc (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
bfd *abfd;
arelent *reloc_entry;
asymbol *symbol;
bfd *output_bfd;
char **error_message;
{
- /* If we're relocating, and this an external symbol, we don't want
- to change anything. */
- if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
/* If we're relocating, and this is a local symbol, we can handle it
- just like HI16. */
+ just like an R_MIPS_HI16. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) != 0)
return mips_elf64_hi16_reloc (abfd, reloc_entry, symbol, data,
input_section, output_bfd, error_message);
- abort ();
+
+ /* Otherwise we try to handle it as R_MIPS_GOT_DISP. */
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
}
/* Set the GP value for OUTPUT_BFD. Returns false if this is a
/* Do a R_MIPS_GPREL16 relocation. This is a 16 bit value which must
become the offset from the gp register. */
-bfd_reloc_status_type
+static bfd_reloc_status_type
mips_elf64_gprel16_reloc (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd;
file. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (! reloc_entry->howto->partial_inplace
+ || reloc_entry->addend == 0))
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
data, gp);
}
-/* Do a R_MIPS_GPREL16 RELA relocation. */
+/* Do a R_MIPS_LITERAL relocation. */
-bfd_reloc_status_type
-mips_elf64_gprel16_reloca (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
+static bfd_reloc_status_type
+mips_elf64_literal_reloc (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
bfd *abfd;
arelent *reloc_entry;
asymbol *symbol;
- PTR data ATTRIBUTE_UNUSED;
+ PTR data;
asection *input_section;
bfd *output_bfd;
char **error_message;
{
boolean relocateable;
+ bfd_reloc_status_type ret;
bfd_vma gp;
- /* This works only for NewABI. */
- BFD_ASSERT (reloc_entry->howto->src_mask == 0);
-
- /* If we're relocating, and this is an external symbol with no
- addend, we don't want to change anything. We will only have an
- addend if this is a newly created reloc, not read from an ELF
- file. */
+ /* If we're relocating, and this is an external symbol, we don't
+ want to change anything. */
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
+ && (! reloc_entry->howto->partial_inplace
+ || reloc_entry->addend == 0))
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
+ /* FIXME: The entries in the .lit8 and .lit4 sections should be merged. */
if (output_bfd != (bfd *) NULL)
relocateable = true;
else
output_bfd = symbol->section->output_section->owner;
}
- if (prev_reloc_address != reloc_entry->address)
- prev_reloc_address = reloc_entry->address;
- else
- {
- mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message,
- &gp);
- prev_reloc_addend = reloc_entry->addend + reloc_entry->address - gp;
- if (symbol->flags & BSF_LOCAL)
- prev_reloc_addend += _bfd_get_gp_value (abfd);
-/*fprintf(stderr, "Addend: %lx, Next Addend: %lx\n", reloc_entry->addend, prev_reloc_addend);*/
- }
+ ret = mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message,
+ &gp);
+ if (ret != bfd_reloc_ok)
+ return ret;
- return bfd_reloc_ok;
+ return _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
+ input_section, relocateable,
+ data, gp);
}
-/* Do a R_MIPS_LITERAL relocation. */
+/* Do a R_MIPS_GPREL32 relocation. This is a 32 bit value which must
+ become the offset from the gp register. */
-bfd_reloc_status_type
-mips_elf64_literal_reloc (abfd, reloc_entry, symbol, data, input_section,
+static bfd_reloc_status_type
+mips_elf64_gprel32_reloc (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd;
arelent *reloc_entry;
asection *input_section;
bfd *output_bfd;
char **error_message;
-{
- /* If we're relocating, and this is an external symbol, we don't
- want to change anything. */
- if (output_bfd != (bfd *) NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* FIXME: The entries in the .lit8 and .lit4 sections should be merged.
- Currently we simply call mips_elf64_gprel16_reloc. */
- return mips_elf64_gprel16_reloc (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message);
-}
-
-/* Do a R_MIPS_GPREL32 relocation. Is this 32 bit value the offset
- from the gp register? XXX */
-
-bfd_reloc_status_type
-mips_elf64_gprel32_reloc (abfd,
- reloc_entry,
- symbol,
- data,
- input_section,
- output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
{
boolean relocateable;
bfd_reloc_status_type ret;
}
/* Do a R_MIPS_SHIFT6 relocation. The MSB of the shift is stored at bit 2,
- the rest is at bits 6-10. The bitpos alredy got right by the howto. */
+ the rest is at bits 6-10. The bitpos already got right by the howto. */
-bfd_reloc_status_type
+static bfd_reloc_status_type
mips_elf64_shift6_reloc (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd ATTRIBUTE_UNUSED;
return bfd_reloc_continue;
}
+/* Handle a mips16 jump. */
+
+static bfd_reloc_status_type
+mips16_jump_reloc (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data ATTRIBUTE_UNUSED;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message ATTRIBUTE_UNUSED;
+{
+ if (output_bfd != (bfd *) NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (! reloc_entry->howto->partial_inplace
+ || reloc_entry->addend == 0))
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ /* FIXME. */
+ {
+ static boolean warned;
+
+ if (! warned)
+ (*_bfd_error_handler)
+ (_("Linking mips16 objects into %s format is not supported"),
+ bfd_get_target (input_section->output_section->owner));
+ warned = true;
+ }
+
+ return bfd_reloc_undefined;
+}
+
+/* Handle a mips16 GP relative reloc. */
+
+static bfd_reloc_status_type
+mips16_gprel_reloc (abfd, reloc_entry, symbol, data, input_section,
+ output_bfd, error_message)
+ bfd *abfd;
+ arelent *reloc_entry;
+ asymbol *symbol;
+ PTR data;
+ asection *input_section;
+ bfd *output_bfd;
+ char **error_message;
+{
+ boolean relocateable;
+ bfd_reloc_status_type ret;
+ bfd_vma gp;
+ unsigned short extend, insn;
+ unsigned long final;
+
+ /* If we're relocating, and this is an external symbol with no
+ addend, we don't want to change anything. We will only have an
+ addend if this is a newly created reloc, not read from an ELF
+ file. */
+ if (output_bfd != NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && reloc_entry->addend == 0)
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+
+ if (output_bfd != NULL)
+ relocateable = true;
+ else
+ {
+ relocateable = false;
+ output_bfd = symbol->section->output_section->owner;
+ }
+
+ ret = mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message,
+ &gp);
+ if (ret != bfd_reloc_ok)
+ return ret;
+
+ if (reloc_entry->address > input_section->_cooked_size)
+ return bfd_reloc_outofrange;
+
+ /* Pick up the mips16 extend instruction and the real instruction. */
+ extend = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
+ insn = bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address + 2);
+
+ /* Stuff the current addend back as a 32 bit value, do the usual
+ relocation, and then clean up. */
+ bfd_put_32 (abfd,
+ (bfd_vma) (((extend & 0x1f) << 11)
+ | (extend & 0x7e0)
+ | (insn & 0x1f)),
+ (bfd_byte *) data + reloc_entry->address);
+
+ ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry,
+ input_section, relocateable, data, gp);
+
+ final = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+ bfd_put_16 (abfd,
+ (bfd_vma) ((extend & 0xf800)
+ | ((final >> 11) & 0x1f)
+ | (final & 0x7e0)),
+ (bfd_byte *) data + reloc_entry->address);
+ bfd_put_16 (abfd,
+ (bfd_vma) ((insn & 0xffe0)
+ | (final & 0x1f)),
+ (bfd_byte *) data + reloc_entry->address + 2);
+
+ return ret;
+}
+\f
+/* A mapping from BFD reloc types to MIPS ELF reloc types. */
+
+struct elf_reloc_map {
+ bfd_reloc_code_real_type bfd_val;
+ enum elf_mips_reloc_type elf_val;
+};
+
+static const struct elf_reloc_map mips_reloc_map[] =
+{
+ { BFD_RELOC_NONE, R_MIPS_NONE },
+ { BFD_RELOC_16, R_MIPS_16 },
+ { BFD_RELOC_32, R_MIPS_32 },
+ /* There is no BFD reloc for R_MIPS_REL32. */
+ { BFD_RELOC_64, R_MIPS_64 },
+ { BFD_RELOC_CTOR, R_MIPS_64 },
+ { BFD_RELOC_16_PCREL, R_MIPS_PC16 },
+ { BFD_RELOC_HI16_S, R_MIPS_HI16 },
+ { BFD_RELOC_LO16, R_MIPS_LO16 },
+ { BFD_RELOC_GPREL16, R_MIPS_GPREL16 },
+ { BFD_RELOC_GPREL32, R_MIPS_GPREL32 },
+ { BFD_RELOC_MIPS_JMP, R_MIPS_26 },
+ { BFD_RELOC_MIPS_LITERAL, R_MIPS_LITERAL },
+ { BFD_RELOC_MIPS_GOT16, R_MIPS_GOT16 },
+ { BFD_RELOC_MIPS_CALL16, R_MIPS_CALL16 },
+ { BFD_RELOC_MIPS_SHIFT5, R_MIPS_SHIFT5 },
+ { BFD_RELOC_MIPS_SHIFT6, R_MIPS_SHIFT6 },
+ { BFD_RELOC_MIPS_GOT_DISP, R_MIPS_GOT_DISP },
+ { BFD_RELOC_MIPS_GOT_PAGE, R_MIPS_GOT_PAGE },
+ { BFD_RELOC_MIPS_GOT_OFST, R_MIPS_GOT_OFST },
+ { BFD_RELOC_MIPS_GOT_HI16, R_MIPS_GOT_HI16 },
+ { BFD_RELOC_MIPS_GOT_LO16, R_MIPS_GOT_LO16 },
+ { BFD_RELOC_MIPS_SUB, R_MIPS_SUB },
+ { BFD_RELOC_MIPS_INSERT_A, R_MIPS_INSERT_A },
+ { BFD_RELOC_MIPS_INSERT_B, R_MIPS_INSERT_B },
+ { BFD_RELOC_MIPS_DELETE, R_MIPS_DELETE },
+ { BFD_RELOC_MIPS_HIGHEST, R_MIPS_HIGHEST },
+ { BFD_RELOC_MIPS_HIGHER, R_MIPS_HIGHER },
+ { BFD_RELOC_MIPS_CALL_HI16, R_MIPS_CALL_HI16 },
+ { BFD_RELOC_MIPS_CALL_LO16, R_MIPS_CALL_LO16 },
+ { BFD_RELOC_MIPS_SCN_DISP, R_MIPS_SCN_DISP },
+ { BFD_RELOC_MIPS_REL16, R_MIPS_REL16 },
+ /* Use of R_MIPS_ADD_IMMEDIATE and R_MIPS_PJUMP is deprecated. */
+ { BFD_RELOC_MIPS_RELGOT, R_MIPS_RELGOT },
+ { BFD_RELOC_MIPS_JALR, R_MIPS_JALR }
+};
+
/* Given a BFD reloc type, return a howto structure. */
static reloc_howto_type *
bfd *abfd ATTRIBUTE_UNUSED;
bfd_reloc_code_real_type code;
{
+ unsigned int i;
/* FIXME: We default to RELA here instead of choosing the right
relocation variant. */
reloc_howto_type *howto_table = mips_elf64_howto_table_rela;
+ for (i = 0; i < sizeof (mips_reloc_map) / sizeof (struct elf_reloc_map);
+ i++)
+ {
+ if (mips_reloc_map[i].bfd_val == code)
+ return &howto_table[(int) mips_reloc_map[i].elf_val];
+ }
+
switch (code)
{
- case BFD_RELOC_NONE:
- return &howto_table[R_MIPS_NONE];
- case BFD_RELOC_16:
- return &howto_table[R_MIPS_16];
- case BFD_RELOC_32:
- return &howto_table[R_MIPS_32];
- case BFD_RELOC_64:
- case BFD_RELOC_CTOR:
- return &howto_table[R_MIPS_64];
- case BFD_RELOC_16_PCREL:
- return &howto_table[R_MIPS_PC16];
- case BFD_RELOC_HI16_S:
- return &howto_table[R_MIPS_HI16];
- case BFD_RELOC_LO16:
- return &howto_table[R_MIPS_LO16];
- case BFD_RELOC_GPREL16:
- return &howto_table[R_MIPS_GPREL16];
- case BFD_RELOC_GPREL32:
- return &howto_table[R_MIPS_GPREL32];
- case BFD_RELOC_MIPS_JMP:
- return &howto_table[R_MIPS_26];
- case BFD_RELOC_MIPS_LITERAL:
- return &howto_table[R_MIPS_LITERAL];
- case BFD_RELOC_MIPS_GOT16:
- return &howto_table[R_MIPS_GOT16];
- case BFD_RELOC_MIPS_CALL16:
- return &howto_table[R_MIPS_CALL16];
- case BFD_RELOC_MIPS_SHIFT5:
- return &howto_table[R_MIPS_SHIFT5];
- case BFD_RELOC_MIPS_SHIFT6:
- return &howto_table[R_MIPS_SHIFT6];
- case BFD_RELOC_MIPS_GOT_DISP:
- return &howto_table[R_MIPS_GOT_DISP];
- case BFD_RELOC_MIPS_GOT_PAGE:
- return &howto_table[R_MIPS_GOT_PAGE];
- case BFD_RELOC_MIPS_GOT_OFST:
- return &howto_table[R_MIPS_GOT_OFST];
- case BFD_RELOC_MIPS_GOT_HI16:
- return &howto_table[R_MIPS_GOT_HI16];
- case BFD_RELOC_MIPS_GOT_LO16:
- return &howto_table[R_MIPS_GOT_LO16];
- case BFD_RELOC_MIPS_SUB:
- return &howto_table[R_MIPS_SUB];
- case BFD_RELOC_MIPS_INSERT_A:
- return &howto_table[R_MIPS_INSERT_A];
- case BFD_RELOC_MIPS_INSERT_B:
- return &howto_table[R_MIPS_INSERT_B];
- case BFD_RELOC_MIPS_DELETE:
- return &howto_table[R_MIPS_DELETE];
- case BFD_RELOC_MIPS_HIGHEST:
- return &howto_table[R_MIPS_HIGHEST];
- case BFD_RELOC_MIPS_HIGHER:
- return &howto_table[R_MIPS_HIGHER];
- case BFD_RELOC_MIPS_CALL_HI16:
- return &howto_table[R_MIPS_CALL_HI16];
- case BFD_RELOC_MIPS_CALL_LO16:
- return &howto_table[R_MIPS_CALL_LO16];
- case BFD_RELOC_MIPS_SCN_DISP:
- return &howto_table[R_MIPS_SCN_DISP];
- case BFD_RELOC_MIPS_REL16:
- return &howto_table[R_MIPS_REL16];
- /* Use of R_MIPS_ADD_IMMEDIATE and R_MIPS_PJUMP is deprecated. */
- case BFD_RELOC_MIPS_RELGOT:
- return &howto_table[R_MIPS_RELGOT];
- case BFD_RELOC_MIPS_JALR:
- return &howto_table[R_MIPS_JALR];
-/*
case BFD_RELOC_MIPS16_JMP:
return &elf_mips16_jump_howto;
case BFD_RELOC_MIPS16_GPREL:
return &elf_mips_gnu_vtinherit_howto;
case BFD_RELOC_VTABLE_ENTRY:
return &elf_mips_gnu_vtentry_howto;
- case BFD_RELOC_PCREL_HI16_S:
- return &elf_mips_gnu_rel_hi16;
- case BFD_RELOC_PCREL_LO16:
- return &elf_mips_gnu_rel_lo16;
- case BFD_RELOC_16_PCREL_S2:
- return &elf_mips_gnu_rel16_s2;
- case BFD_RELOC_64_PCREL:
- return &elf_mips_gnu_pcrel64;
- case BFD_RELOC_32_PCREL:
- return &elf_mips_gnu_pcrel32;
-*/
default:
bfd_set_error (bfd_error_bad_value);
return NULL;
{
switch (r_type)
{
-/*
case R_MIPS16_26:
return &elf_mips16_jump_howto;
- break;
case R_MIPS16_GPREL:
return &elf_mips16_gprel_howto;
- break;
case R_MIPS_GNU_VTINHERIT:
return &elf_mips_gnu_vtinherit_howto;
- break;
case R_MIPS_GNU_VTENTRY:
return &elf_mips_gnu_vtentry_howto;
- break;
- case R_MIPS_GNU_REL_HI16:
- return &elf_mips_gnu_rel_hi16;
- break;
- case R_MIPS_GNU_REL_LO16:
- return &elf_mips_gnu_rel_lo16;
- break;
- case R_MIPS_GNU_REL16_S2:
- return &elf_mips_gnu_rel16_s2;
- break;
- case R_MIPS_PC64:
- return &elf_mips_gnu_pcrel64;
- break;
- case R_MIPS_PC32:
- return &elf_mips_gnu_pcrel32;
- break;
-*/
-
default:
BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
if (rela_p)
/* Irix 6 is broken. Object file symbol tables are not always
sorted correctly such that local symbols precede global symbols,
and the sh_info field in the symbol table is not always right. */
- if (SGI_COMPAT(abfd))
+ if (elf64_mips_irix_compat (abfd) != ict_none)
elf_bad_symtab (abfd) = true;
mach = _bfd_elf_mips_mach (elf_elfheader (abfd)->e_flags);
elf64_mips_irix_compat (abfd)
bfd *abfd;
{
- if ((abfd->xvec == &bfd_elf64_tradbigmips_vec)
- || (abfd->xvec == &bfd_elf64_tradlittlemips_vec))
- return ict_none;
- else
+ if ((abfd->xvec == &bfd_elf64_bigmips_vec)
+ || (abfd->xvec == &bfd_elf64_littlemips_vec))
return ict_irix6;
+ else
+ return ict_none;
}
\f
/* ECOFF swapping routines. These are used when dealing with the
#define ELF_ARCH bfd_arch_mips
#define ELF_MACHINE_CODE EM_MIPS
+/* The SVR4 MIPS ABI says that this should be 0x10000, but Irix 5 uses
+ a value of 0x1000, and we are compatible.
+ FIXME: How does this affect NewABI? */
#define ELF_MAXPAGESIZE 0x1000
#define elf_backend_collect true
#include "elf/ppc.h"
#include "elf64-ppc.h"
-#define USE_RELA /* we want RELA relocations, not REL. */
-
-
static void ppc_howto_init
PARAMS ((void));
static reloc_howto_type *ppc64_elf_reloc_type_lookup
bfd_elf_generic_reloc, /* special_function */
"R_PPC64_NONE", /* name */
false, /* partial_inplace */
- 0xff, /* src_mask */
+ 0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
bfd_elf_generic_reloc, /* special_function */
"R_PPC64_ADDR24", /* name */
false, /* partial_inplace */
- 0xfc000003, /* src_mask */
+ 0, /* src_mask */
0x03fffffc, /* dst_mask */
false), /* pcrel_offset */
bfd_elf_generic_reloc, /* special_function */
"R_PPC64_ADDR14", /* name */
false, /* partial_inplace */
- 0xffff0003, /* src_mask */
+ 0, /* src_mask */
0x0000fffc, /* dst_mask */
false), /* pcrel_offset */
ppc64_elf_brtaken_reloc, /* special_function */
"R_PPC64_ADDR14_BRTAKEN",/* name */
false, /* partial_inplace */
- 0xffff0003, /* src_mask */
+ 0, /* src_mask */
0x0000fffc, /* dst_mask */
false), /* pcrel_offset */
ppc64_elf_brtaken_reloc, /* special_function */
"R_PPC64_ADDR14_BRNTAKEN",/* name */
false, /* partial_inplace */
- 0xffff0003, /* src_mask */
+ 0, /* src_mask */
0x0000fffc, /* dst_mask */
false), /* pcrel_offset */
bfd_elf_generic_reloc, /* special_function */
"R_PPC64_REL24", /* name */
false, /* partial_inplace */
- 0xfc000003, /* src_mask */
+ 0, /* src_mask */
0x03fffffc, /* dst_mask */
true), /* pcrel_offset */
bfd_elf_generic_reloc, /* special_function */
"R_PPC64_REL14", /* name */
false, /* partial_inplace */
- 0xffff0003, /* src_mask */
+ 0, /* src_mask */
0x0000fffc, /* dst_mask */
true), /* pcrel_offset */
ppc64_elf_brtaken_reloc, /* special_function */
"R_PPC64_REL14_BRTAKEN", /* name */
false, /* partial_inplace */
- 0xffff0003, /* src_mask */
+ 0, /* src_mask */
0x0000fffc, /* dst_mask */
true), /* pcrel_offset */
ppc64_elf_brtaken_reloc, /* special_function */
"R_PPC64_REL14_BRNTAKEN",/* name */
false, /* partial_inplace */
- 0xffff0003, /* src_mask */
+ 0, /* src_mask */
0x0000fffc, /* dst_mask */
true), /* pcrel_offset */
bfd_elf_generic_reloc, /* special_function */
"R_PPC64_ADDR30", /* name */
false, /* partial_inplace */
- 0x00000003, /* src_mask */
+ 0, /* src_mask */
0xfffffffc, /* dst_mask */
true), /* pcrel_offset */
bfd_elf_generic_reloc, /* special_function */
"R_PPC64_ADDR16_DS", /* name */
false, /* partial_inplace */
- 0x0003, /* src_mask */
+ 0, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
bfd_elf_generic_reloc, /* special_function */
"R_PPC64_ADDR16_LO_DS",/* name */
false, /* partial_inplace */
- 0x0003, /* src_mask */
+ 0, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
ppc64_elf_unhandled_reloc, /* special_function */
"R_PPC64_GOT16_DS", /* name */
false, /* partial_inplace */
- 0x0003, /* src_mask */
+ 0, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
ppc64_elf_unhandled_reloc, /* special_function */
"R_PPC64_GOT16_LO_DS", /* name */
false, /* partial_inplace */
- 0x0003, /* src_mask */
+ 0, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
ppc64_elf_unhandled_reloc, /* special_function */
"R_PPC64_PLT16_LO_DS", /* name */
false, /* partial_inplace */
- 0x0003, /* src_mask */
+ 0, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
ppc64_elf_sectoff_reloc, /* special_function */
"R_PPC64_SECTOFF_DS", /* name */
false, /* partial_inplace */
- 0x0003, /* src_mask */
+ 0, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
ppc64_elf_sectoff_reloc, /* special_function */
"R_PPC64_SECTOFF_LO_DS",/* name */
false, /* partial_inplace */
- 0x0003, /* src_mask */
+ 0, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
ppc64_elf_toc_reloc, /* special_function */
"R_PPC64_TOC16_DS", /* name */
false, /* partial_inplace */
- 0x0003, /* src_mask */
+ 0, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
ppc64_elf_toc_reloc, /* special_function */
"R_PPC64_TOC16_LO_DS", /* name */
false, /* partial_inplace */
- 0x0003, /* src_mask */
+ 0, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
ppc64_elf_unhandled_reloc, /* special_function */
"R_PPC64_PLTGOT16_DS", /* name */
false, /* partial_inplace */
- 0x0003, /* src_mask */
+ 0, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
ppc64_elf_unhandled_reloc, /* special_function */
"R_PPC64_PLTGOT16_LO_DS",/* name */
false, /* partial_inplace */
- 0x0003, /* src_mask */
+ 0, /* src_mask */
0xfffc, /* dst_mask */
false), /* pcrel_offset */
}
skip = sym_sec->output_section == bfd_abs_section_ptr;
- if (!skip)
+ if (skip)
+ {
+ if (h != NULL)
+ {
+ /* Arrange for the function descriptor sym
+ to be dropped. */
+ struct elf_link_hash_entry *fdh;
+ struct ppc_link_hash_entry *fh;
+
+ fh = (struct ppc_link_hash_entry *) h;
+ BFD_ASSERT (fh->is_func);
+ fdh = fh->oh;
+ fdh->root.u.def.value = 0;
+ fdh->root.u.def.section = sym_sec;
+ }
+ }
+ else
{
/* We'll be keeping this opd entry. */
PARAMS ((bfd *, struct bfd_link_info *));
static boolean elf_s390_object_p PARAMS ((bfd *));
-#define USE_RELA 1 /* We want RELA relocations, not REL. */
-
#include "elf/s390.h"
/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
+ if (info->relocateable)
+ return true;
+
dynobj = elf_hash_table (info)->dynobj;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
}
howto = sparc64_elf_howto_table + r_type;
- r_symndx = ELF64_R_SYM (rel->r_info);
-
- if (info->relocateable)
- {
- /* This is a relocateable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections[r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
- }
- }
-
- continue;
- }
-
/* This is a final link. */
+ r_symndx = ELF64_R_SYM (rel->r_info);
h = NULL;
sym = NULL;
sec = NULL;
#define elf_backend_want_got_plt 0
#define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 1
+#define elf_backend_rela_normal 1
/* Section 5.2.4 of the ABI specifies a 256-byte boundary for the table. */
#define elf_backend_plt_alignment 8
#include "elf/x86-64.h"
-/* We use only the RELA entries. */
-#define USE_RELA 1
-
/* In case we're on a 32-bit machine, construct a 64-bit "-1" value. */
#define MINUS_ONE (~ (bfd_vma) 0)
#define elf_backend_grok_prstatus elf32_arm_nabi_grok_prstatus
#define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo
+#ifndef ELFARM_NABI_C_INCLUDED
#include "elf32-arm.h"
+#endif
#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
#endif
-#define USE_RELA
-
#define TARGET_LITTLE_SYM bfd_elf32_littlearm_oabi_vec
#define TARGET_LITTLE_NAME "elf32-littlearm-oabi"
#define TARGET_BIG_SYM bfd_elf32_bigarm_oabi_vec
return true;
}
+/* Record a new local dynamic symbol. Returns 0 on failure, 1 on
+ success, and 2 on a failure caused by attempting to record a symbol
+ in a discarded section, eg. a discarded link-once section symbol. */
+
+int
+elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ long input_indx;
+{
+ bfd_size_type amt;
+ struct elf_link_local_dynamic_entry *entry;
+ struct elf_link_hash_table *eht;
+ struct elf_strtab_hash *dynstr;
+ unsigned long dynstr_index;
+ char *name;
+ Elf_External_Sym_Shndx eshndx;
+ char esym[sizeof (Elf64_External_Sym)];
+
+ if (! is_elf_hash_table (info))
+ return 0;
+
+ /* See if the entry exists already. */
+ for (entry = elf_hash_table (info)->dynlocal; entry ; entry = entry->next)
+ if (entry->input_bfd == input_bfd && entry->input_indx == input_indx)
+ return 1;
+
+ amt = sizeof (*entry);
+ entry = (struct elf_link_local_dynamic_entry *) bfd_alloc (input_bfd, amt);
+ if (entry == NULL)
+ return 0;
+
+ /* Go find the symbol, so that we can find it's name. */
+ if (!bfd_elf_get_elf_syms (input_bfd, &elf_tdata (input_bfd)->symtab_hdr,
+ (size_t) 1, (size_t) input_indx,
+ &entry->isym, esym, &eshndx))
+ {
+ bfd_release (input_bfd, entry);
+ return 0;
+ }
+
+ if (entry->isym.st_shndx != SHN_UNDEF
+ && (entry->isym.st_shndx < SHN_LORESERVE
+ || entry->isym.st_shndx > SHN_HIRESERVE))
+ {
+ asection *s;
+
+ s = bfd_section_from_elf_index (input_bfd, entry->isym.st_shndx);
+ if (s == NULL || bfd_is_abs_section (s->output_section))
+ {
+ /* We can still bfd_release here as nothing has done another
+ bfd_alloc. We can't do this later in this function. */
+ bfd_release (input_bfd, entry);
+ return 2;
+ }
+ }
+
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd, elf_tdata (input_bfd)->symtab_hdr.sh_link,
+ entry->isym.st_name));
+
+ dynstr = elf_hash_table (info)->dynstr;
+ if (dynstr == NULL)
+ {
+ /* Create a strtab to hold the dynamic symbol names. */
+ elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init ();
+ if (dynstr == NULL)
+ return 0;
+ }
+
+ dynstr_index = _bfd_elf_strtab_add (dynstr, name, false);
+ if (dynstr_index == (unsigned long) -1)
+ return 0;
+ entry->isym.st_name = dynstr_index;
+
+ eht = elf_hash_table (info);
+
+ entry->next = eht->dynlocal;
+ eht->dynlocal = entry;
+ entry->input_bfd = input_bfd;
+ entry->input_indx = input_indx;
+ eht->dynsymcount++;
+
+ /* Whatever binding the symbol had before, it's now local. */
+ entry->isym.st_info
+ = ELF_ST_INFO (STB_LOCAL, ELF_ST_TYPE (entry->isym.st_info));
+
+ /* The dynindx will be set at the end of size_dynamic_sections. */
+
+ return 1;
+}
+
/* Return the dynindex of a local dynamic symbol. */
long
if (override)
{
/* Here SHORTNAME is a versioned name, so we don't expect to see
- the type of override we do in the case above. */
- (*_bfd_error_handler)
- (_("%s: warning: unexpected redefinition of `%s'"),
- bfd_archive_filename (abfd), shortname);
+ the type of override we do in the case above unless it is
+ overridden by a versioned definiton. */
+ if (hi->root.type != bfd_link_hash_defined
+ && hi->root.type != bfd_link_hash_defweak)
+ (*_bfd_error_handler)
+ (_("%s: warning: unexpected redefinition of indirect versioned symbol `%s'"),
+ bfd_archive_filename (abfd), shortname);
}
else
{
return true;
}
-
-/* Record a new local dynamic symbol. */
-
-boolean
-elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
- struct bfd_link_info *info;
- bfd *input_bfd;
- long input_indx;
-{
- struct elf_link_local_dynamic_entry *entry;
- struct elf_link_hash_table *eht;
- struct elf_strtab_hash *dynstr;
- Elf_External_Sym esym;
- Elf_External_Sym_Shndx eshndx;
- Elf_External_Sym_Shndx *shndx;
- unsigned long dynstr_index;
- char *name;
- file_ptr pos;
- bfd_size_type amt;
-
- if (! is_elf_hash_table (info))
- return false;
-
- /* See if the entry exists already. */
- for (entry = elf_hash_table (info)->dynlocal; entry ; entry = entry->next)
- if (entry->input_bfd == input_bfd && entry->input_indx == input_indx)
- return true;
-
- entry = (struct elf_link_local_dynamic_entry *)
- bfd_alloc (input_bfd, (bfd_size_type) sizeof (*entry));
- if (entry == NULL)
- return false;
-
- /* Go find the symbol, so that we can find it's name. */
- amt = sizeof (Elf_External_Sym);
- pos = elf_tdata (input_bfd)->symtab_hdr.sh_offset + input_indx * amt;
- if (bfd_seek (input_bfd, pos, SEEK_SET) != 0
- || bfd_bread ((PTR) &esym, amt, input_bfd) != amt)
- return false;
- shndx = NULL;
- if (elf_tdata (input_bfd)->symtab_shndx_hdr.sh_size != 0)
- {
- amt = sizeof (Elf_External_Sym_Shndx);
- pos = elf_tdata (input_bfd)->symtab_shndx_hdr.sh_offset;
- pos += input_indx * amt;
- shndx = &eshndx;
- if (bfd_seek (input_bfd, pos, SEEK_SET) != 0
- || bfd_bread ((PTR) shndx, amt, input_bfd) != amt)
- return false;
- }
- elf_swap_symbol_in (input_bfd, (const PTR) &esym, (const PTR) shndx,
- &entry->isym);
-
- name = (bfd_elf_string_from_elf_section
- (input_bfd, elf_tdata (input_bfd)->symtab_hdr.sh_link,
- entry->isym.st_name));
-
- dynstr = elf_hash_table (info)->dynstr;
- if (dynstr == NULL)
- {
- /* Create a strtab to hold the dynamic symbol names. */
- elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init ();
- if (dynstr == NULL)
- return false;
- }
-
- dynstr_index = _bfd_elf_strtab_add (dynstr, name, false);
- if (dynstr_index == (unsigned long) -1)
- return false;
- entry->isym.st_name = dynstr_index;
-
- eht = elf_hash_table (info);
-
- entry->next = eht->dynlocal;
- eht->dynlocal = entry;
- entry->input_bfd = input_bfd;
- entry->input_indx = input_indx;
- eht->dynsymcount++;
-
- /* Whatever binding the symbol had before, it's now local. */
- entry->isym.st_info
- = ELF_ST_INFO (STB_LOCAL, ELF_ST_TYPE (entry->isym.st_info));
-
- /* The dynindx will be set at the end of size_dynamic_sections. */
-
- return true;
-}
\f
/* Read and swap the relocs from the section indicated by SHDR. This
may be either a REL or a RELA section. The relocations are
struct elf_info_failed eif;
struct elf_link_hash_entry *h;
asection *dynstr;
+ struct bfd_elf_version_tree *t;
+ struct bfd_elf_version_expr *d;
+ boolean all_defined;
*sinterpptr = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (*sinterpptr != NULL || info->shared);
return false;
}
+ /* Make all global versions with definiton. */
+ for (t = verdefs; t != NULL; t = t->next)
+ for (d = t->globals; d != NULL; d = d->next)
+ if (!d->symver && strchr (d->pattern, '*') == NULL)
+ {
+ const char *verstr, *name;
+ size_t namelen, verlen, newlen;
+ char *newname, *p;
+ struct elf_link_hash_entry *newh;
+
+ name = d->pattern;
+ namelen = strlen (name);
+ verstr = t->name;
+ verlen = strlen (verstr);
+ newlen = namelen + verlen + 3;
+
+ newname = (char *) bfd_malloc ((bfd_size_type) newlen);
+ if (newname == NULL)
+ return false;
+ memcpy (newname, name, namelen);
+
+ /* Check the hidden versioned definition. */
+ p = newname + namelen;
+ *p++ = ELF_VER_CHR;
+ memcpy (p, verstr, verlen + 1);
+ newh = elf_link_hash_lookup (elf_hash_table (info),
+ newname, false, false,
+ false);
+ if (newh == NULL
+ || (newh->root.type != bfd_link_hash_defined
+ && newh->root.type != bfd_link_hash_defweak))
+ {
+ /* Check the default versioned definition. */
+ *p++ = ELF_VER_CHR;
+ memcpy (p, verstr, verlen + 1);
+ newh = elf_link_hash_lookup (elf_hash_table (info),
+ newname, false, false,
+ false);
+ }
+ free (newname);
+
+ /* Mark this version if there is a definition. */
+ if (newh != NULL
+ && (newh->root.type == bfd_link_hash_defined
+ || newh->root.type == bfd_link_hash_defweak))
+ d->symver = 1;
+ }
+
/* Attach all the symbols to their version information. */
asvinfo.output_bfd = output_bfd;
asvinfo.info = info;
if (asvinfo.failed)
return false;
+ if (!info->allow_undefined_version)
+ {
+ /* Check if all global versions have a definiton. */
+ all_defined = true;
+ for (t = verdefs; t != NULL; t = t->next)
+ for (d = t->globals; d != NULL; d = d->next)
+ if (!d->symver && !d->script
+ && strchr (d->pattern, '*') == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%s: undefined version: %s"),
+ d->pattern, t->name);
+ all_defined = false;
+ }
+
+ if (!all_defined)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ }
+
/* Find all symbols which were defined in a dynamic object and make
the backend pick a reasonable value for them. */
elf_link_hash_traverse (elf_hash_table (info),
(_("%s: undefined versioned symbol name %s"),
bfd_get_filename (sinfo->output_bfd), h->root.root.string);
bfd_set_error (bfd_error_bad_value);
- error_return:
sinfo->failed = true;
return false;
}
{
if (t->globals != NULL)
{
+ boolean matched;
+
+ matched = false;
for (d = t->globals; d != NULL; d = d->next)
{
if ((*d->match) (d, h->root.root.string))
{
- h->verinfo.vertree = t;
- local_ver = NULL;
- break;
+ if (d->symver)
+ matched = true;
+ else
+ {
+ /* There is a version without definition. Make
+ the symbol the default definition for this
+ version. */
+ h->verinfo.vertree = t;
+ local_ver = NULL;
+ d->script = 1;
+ break;
+ }
}
}
if (d != NULL)
break;
+ else if (matched)
+ /* There is no undefined version for this symbol. Hide the
+ default one. */
+ (*bed->elf_backend_hide_symbol) (info, h, true);
}
if (t->locals != NULL)
(*bed->elf_backend_hide_symbol) (info, h, true);
}
}
-
- /* We need to check if a hidden versioned definition should
- hide the default one. */
- if (h->dynindx != -1 && h->verinfo.vertree != NULL)
- {
- const char *verstr, *name;
- size_t namelen, verlen, newlen;
- char *newname;
- struct elf_link_hash_entry *newh;
-
- name = h->root.root.string;
- namelen = strlen (name);
- verstr = h->verinfo.vertree->name;
- verlen = strlen (verstr);
- newlen = namelen + verlen + 2;
-
- newname = (char *) bfd_malloc ((bfd_size_type) newlen);
- if (newname == NULL)
- goto error_return;
- memcpy (newname, name, namelen);
-
- /* Check the hidden versioned definition. */
- p = newname + namelen;
- *p++ = ELF_VER_CHR;
- memcpy (p, verstr, verlen + 1);
- newh = elf_link_hash_lookup (elf_hash_table (info), newname,
- false, false, false);
-
- if (newh
- && (newh->root.type == bfd_link_hash_defined
- || newh->root.type == bfd_link_hash_defweak))
- /* We found a hidden versioned definition. Hide the
- default one. */
- (*bed->elf_backend_hide_symbol) (info, h, true);
-
- free (newname);
- }
}
return true;
/* If we're stripping it, then it was just a dynamic symbol, and
there's nothing else to do. */
- if (strip)
+ if (strip || (input_sec->flags & SEC_EXCLUDE) != 0)
return true;
h->indx = bfd_get_symcount (finfo->output_bfd);
{
unsigned long r_symndx;
asection *sec;
+ Elf_Internal_Sym sym;
if (next_erel == bed->s->int_rels_per_ext_rel)
{
/* This is a reloc against a local symbol. */
*rel_hash = NULL;
- isym = isymbuf + r_symndx;
+ sym = isymbuf[r_symndx];
sec = finfo->sections[r_symndx];
- if (ELF_ST_TYPE (isym->st_info) == STT_SECTION)
+ if (ELF_ST_TYPE (sym.st_info) == STT_SECTION)
{
/* I suppose the backend ought to fill in the
section of any STT_SECTION symbol against a
must output it now. */
shlink = symtab_hdr->sh_link;
name = (bfd_elf_string_from_elf_section
- (input_bfd, shlink, isym->st_name));
+ (input_bfd, shlink, sym.st_name));
if (name == NULL)
return false;
osec = sec->output_section;
- isym->st_shndx =
+ sym.st_shndx =
_bfd_elf_section_from_bfd_section (output_bfd,
osec);
- if (isym->st_shndx == SHN_BAD)
+ if (sym.st_shndx == SHN_BAD)
return false;
- isym->st_value += sec->output_offset;
+ sym.st_value += sec->output_offset;
if (! finfo->info->relocateable)
{
- isym->st_value += osec->vma;
- if (ELF_ST_TYPE (isym->st_info) == STT_TLS)
+ sym.st_value += osec->vma;
+ if (ELF_ST_TYPE (sym.st_info) == STT_TLS)
{
/* STT_TLS symbols are relative to PT_TLS
segment base. */
BFD_ASSERT (finfo->first_tls_sec != NULL);
- isym->st_value -= finfo->first_tls_sec->vma;
+ sym.st_value -= finfo->first_tls_sec->vma;
}
}
finfo->indices[r_symndx]
= bfd_get_symcount (output_bfd);
- if (! elf_link_output_sym (finfo, name, isym, sec))
+ if (! elf_link_output_sym (finfo, name, &sym, sec))
return false;
}
Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "opcode/ia64.h"
#include "elf/ia64.h"
-/*
- * THE RULES for all the stuff the linker creates --
- *
- * GOT Entries created in response to LTOFF or LTOFF_FPTR
- * relocations. Dynamic relocs created for dynamic
- * symbols in an application; REL relocs for locals
- * in a shared library.
- *
- * FPTR The canonical function descriptor. Created for local
- * symbols in applications. Descriptors for dynamic symbols
- * and local symbols in shared libraries are created by
- * ld.so. Thus there are no dynamic relocs against these
- * objects. The FPTR relocs for such _are_ passed through
- * to the dynamic relocation tables.
- *
- * FULL_PLT Created for a PCREL21B relocation against a dynamic symbol.
- * Requires the creation of a PLTOFF entry. This does not
- * require any dynamic relocations.
- *
- * PLTOFF Created by PLTOFF relocations. For local symbols, this
- * is an alternate function descriptor, and in shared libraries
- * requires two REL relocations. Note that this cannot be
- * transformed into an FPTR relocation, since it must be in
- * range of the GP. For dynamic symbols, this is a function
- * descriptor for a MIN_PLT entry, and requires one IPLT reloc.
- *
- * MIN_PLT Created by PLTOFF entries against dynamic symbols. This
- * does not reqire dynamic relocations.
- */
-
-#define USE_RELA /* we want RELA relocs, not REL */
+/* THE RULES for all the stuff the linker creates --
+
+ GOT Entries created in response to LTOFF or LTOFF_FPTR
+ relocations. Dynamic relocs created for dynamic
+ symbols in an application; REL relocs for locals
+ in a shared library.
+
+ FPTR The canonical function descriptor. Created for local
+ symbols in applications. Descriptors for dynamic symbols
+ and local symbols in shared libraries are created by
+ ld.so. Thus there are no dynamic relocs against these
+ objects. The FPTR relocs for such _are_ passed through
+ to the dynamic relocation tables.
+
+ FULL_PLT Created for a PCREL21B relocation against a dynamic symbol.
+ Requires the creation of a PLTOFF entry. This does not
+ require any dynamic relocations.
+
+ PLTOFF Created by PLTOFF relocations. For local symbols, this
+ is an alternate function descriptor, and in shared libraries
+ requires two REL relocations. Note that this cannot be
+ transformed into an FPTR relocation, since it must be in
+ range of the GP. For dynamic symbols, this is a function
+ descriptor for a MIN_PLT entry, and requires one IPLT reloc.
+
+ MIN_PLT Created by PLTOFF entries against dynamic symbols. This
+ does not reqire dynamic relocations. */
#define NELEMS(a) ((int) (sizeof (a) / sizeof ((a)[0])))
struct elfNN_ia64_link_hash_table
{
- /* The main hash table */
+ /* The main hash table. */
struct elf_link_hash_table root;
asection *got_sec; /* the linkage table section (or NULL) */
boolean elfNN_hpux_backend_section_from_bfd_section
PARAMS ((bfd *abfd, asection *sec, int *retval));
\f
-/* ia64-specific relocation */
+/* ia64-specific relocation. */
/* Perform a relocation. Not much to do here as all the hard work is
done in elfNN_ia64_final_link_relocate. */
/* Given a BFD reloc type, return the matching HOWTO structure. */
-static reloc_howto_type*
+static reloc_howto_type *
lookup_howto (rtype)
unsigned int rtype;
{
else if (strcmp (name, ".HP.opt_annot") == 0)
hdr->sh_type = SHT_IA_64_HP_OPT_ANOT;
else if (strcmp (name, ".reloc") == 0)
- /*
- * This is an ugly, but unfortunately necessary hack that is
- * needed when producing EFI binaries on IA-64. It tells
- * elf.c:elf_fake_sections() not to consider ".reloc" as a section
- * containing ELF relocation info. We need this hack in order to
- * be able to generate ELF binaries that can be translated into
- * EFI applications (which are essentially COFF objects). Those
- * files contain a COFF ".reloc" section inside an ELFNN object,
- * which would normally cause BFD to segfault because it would
- * attempt to interpret this section as containing relocation
- * entries for section "oc". With this hack enabled, ".reloc"
- * will be treated as a normal data section, which will avoid the
- * segfault. However, you won't be able to create an ELFNN binary
- * with a section named "oc" that needs relocations, but that's
- * the kind of ugly side-effects you get when detecting section
- * types based on their names... In practice, this limitation is
- * unlikely to bite.
- */
+ /* This is an ugly, but unfortunately necessary hack that is
+ needed when producing EFI binaries on IA-64. It tells
+ elf.c:elf_fake_sections() not to consider ".reloc" as a section
+ containing ELF relocation info. We need this hack in order to
+ be able to generate ELF binaries that can be translated into
+ EFI applications (which are essentially COFF objects). Those
+ files contain a COFF ".reloc" section inside an ELFNN object,
+ which would normally cause BFD to segfault because it would
+ attempt to interpret this section as containing relocation
+ entries for section "oc". With this hack enabled, ".reloc"
+ will be treated as a normal data section, which will avoid the
+ segfault. However, you won't be able to create an ELFNN binary
+ with a section named "oc" that needs relocations, but that's
+ the kind of ugly side-effects you get when detecting section
+ types based on their names... In practice, this limitation is
+ unlikely to bite. */
hdr->sh_type = SHT_PROGBITS;
if (sec->flags & SEC_SMALL_DATA)
break;
}
}
+
+ if (! elf_flags_init (abfd))
+ {
+ unsigned long flags = 0;
+
+ if (abfd->xvec->byteorder == BFD_ENDIAN_BIG)
+ flags |= EF_IA_64_BE;
+ if (bfd_get_mach (abfd) == bfd_mach_ia64_elf64)
+ flags |= EF_IA_64_ABI64;
+
+ elf_elfheader(abfd)->e_flags = flags;
+ elf_flags_init (abfd) = true;
+ }
}
/* Hook called by the linker routine which adds symbols from an object
case STV_INTERNAL:
case STV_HIDDEN:
return false;
+ default:
+ break;
}
if (h->root.type == bfd_link_hash_undefweak
#undef elf_backend_section_from_bfd_section
#define elf_backend_section_from_bfd_section elfNN_hpux_backend_section_from_bfd_section
+#undef elf_backend_want_p_paddr_set_to_zero
+#define elf_backend_want_p_paddr_set_to_zero 1
+
#undef ELF_MAXPAGESIZE
#define ELF_MAXPAGESIZE 0x1000 /* 1K */
#define elfNN_bed elfNN_ia64_hpux_bed
#include "elfNN-target.h"
+
+#undef elf_backend_want_p_paddr_set_to_zero
/* Nonzero if ABFD is using the N64 ABI. */
#define ABI_64_P(abfd) \
- ((get_elf_backend_data (abfd)->s->elfclass == ELFCLASS64) != 0)
+ (get_elf_backend_data (abfd)->s->elfclass == ELFCLASS64)
/* Nonzero if ABFD is using NewABI conventions. */
#define NEWABI_P(abfd) (ABI_N32_P (abfd) || ABI_64_P (abfd))
bfd_vma index;
asection *sgot;
struct mips_got_info *g;
+ long global_got_dynindx = 0;
g = mips_elf_got_info (abfd, &sgot);
+ if (g->global_gotsym != NULL)
+ global_got_dynindx = g->global_gotsym->dynindx;
/* Once we determine the global GOT entry with the lowest dynamic
symbol table index, we must put all dynamic symbols with greater
indices into the GOT. That makes it easy to calculate the GOT
offset. */
- BFD_ASSERT (h->dynindx >= g->global_gotsym->dynindx);
- index = ((h->dynindx - g->global_gotsym->dynindx + g->local_gotno)
+ BFD_ASSERT (h->dynindx >= global_got_dynindx);
+ index = ((h->dynindx - global_got_dynindx + g->local_gotno)
* MIPS_ELF_GOT_SIZE (abfd));
BFD_ASSERT (index < sgot->_raw_size);
/* The relocation is always an REL32 relocation because we don't
know where the shared library will wind up at load-time. */
- outrel[0].r_info = ELF_R_INFO (output_bfd, indx, R_MIPS_REL32);
+ outrel[0].r_info = ELF_R_INFO (output_bfd, (unsigned long) indx,
+ R_MIPS_REL32);
/* Adjust the output offset of the relocation to reference the
correct location in the output file. */
old_flags &= ~EF_MIPS_ABI;
}
+ /* For now, allow arbitrary mixing of ASEs (retain the union). */
+ if ((new_flags & EF_MIPS_ARCH_ASE) != (old_flags & EF_MIPS_ARCH_ASE))
+ {
+ elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_ARCH_ASE;
+
+ new_flags &= ~ EF_MIPS_ARCH_ASE;
+ old_flags &= ~ EF_MIPS_ARCH_ASE;
+ }
+
/* Warn about any other mismatches */
if (new_flags != old_flags)
{
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This structure contains everything that BFD knows about a target.
It includes things like its byte order, name, what routines to call
#ifndef elf_backend_want_dynbss
#define elf_backend_want_dynbss 1
#endif
+#ifndef elf_backend_want_p_paddr_set_to_zero
+#define elf_backend_want_p_paddr_set_to_zero 0
+#endif
#define bfd_elfNN_bfd_debug_info_start bfd_void
#define bfd_elfNN_bfd_debug_info_end bfd_void
elf_backend_can_gc_sections,
elf_backend_can_refcount,
elf_backend_want_got_sym,
- elf_backend_want_dynbss
+ elf_backend_want_dynbss,
+ elf_backend_want_p_paddr_set_to_zero
};
#endif
abfd->tdata.ieee_ar_data = (ieee_ar_data_type *) bfd_alloc (abfd, amt);
if (!abfd->tdata.ieee_ar_data)
- goto error_return;
+ goto error_ret_restore;
ieee = IEEE_AR_DATA (abfd);
/* Ignore the return value here. It doesn't matter if we don't read
return abfd->xvec;
got_wrong_format_error:
- bfd_release (abfd, ieee);
- abfd->tdata.ieee_ar_data = save;
bfd_set_error (bfd_error_wrong_format);
-
error_return:
if (elts != NULL)
free (elts);
+ bfd_release (abfd, ieee);
+ error_ret_restore:
+ abfd->tdata.ieee_ar_data = save;
return NULL;
}
got_wrong_format:
bfd_set_error (bfd_error_wrong_format);
fail:
- (void) bfd_release (abfd, ieee);
+ bfd_release (abfd, ieee);
abfd->tdata.ieee_data = save;
return (const bfd_target *) NULL;
}
ihex_mkobject (abfd)
bfd *abfd;
{
- if (abfd->tdata.ihex_data == NULL)
- {
- struct ihex_data_struct *tdata;
- bfd_size_type amt = sizeof (struct ihex_data_struct);
+ struct ihex_data_struct *tdata;
+ bfd_size_type amt = sizeof (struct ihex_data_struct);
- tdata = (struct ihex_data_struct *) bfd_alloc (abfd, amt);
- if (tdata == NULL)
- return false;
- abfd->tdata.ihex_data = tdata;
- tdata->head = NULL;
- tdata->tail = NULL;
- }
+ tdata = (struct ihex_data_struct *) bfd_alloc (abfd, amt);
+ if (tdata == NULL)
+ return false;
+ abfd->tdata.ihex_data = tdata;
+ tdata->head = NULL;
+ tdata->tail = NULL;
return true;
}
ihex_object_p (abfd)
bfd *abfd;
{
+ PTR tdata_save;
bfd_byte b[9];
unsigned int i;
unsigned int type;
}
/* OK, it looks like it really is an Intel Hex file. */
- if (! ihex_mkobject (abfd)
- || ! ihex_scan (abfd))
- return NULL;
+ tdata_save = abfd->tdata.any;
+ if (! ihex_mkobject (abfd) || ! ihex_scan (abfd))
+ {
+ if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL)
+ bfd_release (abfd, abfd->tdata.any);
+ abfd->tdata.any = tdata_save;
+ return NULL;
+ }
return abfd->xvec;
}
long _xcoff_machine;
/* Function pointers to xcoff specific swap routines. */
- void (* _xcoff_swap_ldhdr_in)(bfd *, const PTR, struct internal_ldhdr *);
- void (* _xcoff_swap_ldhdr_out)(bfd *, const struct internal_ldhdr *, PTR);
- void (* _xcoff_swap_ldsym_in)(bfd *, const PTR, struct internal_ldsym *);
- void (* _xcoff_swap_ldsym_out)(bfd *, const struct internal_ldsym *, PTR);
- void (* _xcoff_swap_ldrel_in)(bfd *, const PTR, struct internal_ldrel *);
- void (* _xcoff_swap_ldrel_out)(bfd *, const struct internal_ldrel *, PTR);
+ void (* _xcoff_swap_ldhdr_in)
+ PARAMS ((bfd *, const PTR, struct internal_ldhdr *));
+ void (* _xcoff_swap_ldhdr_out)
+ PARAMS ((bfd *, const struct internal_ldhdr *, PTR));
+ void (* _xcoff_swap_ldsym_in)
+ PARAMS ((bfd *, const PTR, struct internal_ldsym *));
+ void (* _xcoff_swap_ldsym_out)
+ PARAMS ((bfd *, const struct internal_ldsym *, PTR));
+ void (* _xcoff_swap_ldrel_in)
+ PARAMS ((bfd *, const PTR, struct internal_ldrel *));
+ void (* _xcoff_swap_ldrel_out)
+ PARAMS ((bfd *, const struct internal_ldrel *, PTR));
/* Size of the external struct. */
unsigned int _xcoff_ldhdrsz;
unsigned long _xcoff_ldhdr_version;
boolean (* _xcoff_put_symbol_name)
- PARAMS ((bfd *, struct bfd_strtab_hash *, struct internal_syment *,
- const char *));
+ PARAMS ((bfd *, struct bfd_strtab_hash *, struct internal_syment *,
+ const char *));
boolean (* _xcoff_put_ldsymbol_name)
- PARAMS ((bfd *, struct xcoff_loader_info *, struct internal_ldsym *,
- const char *));
+ PARAMS ((bfd *, struct xcoff_loader_info *, struct internal_ldsym *,
+ const char *));
reloc_howto_type *_xcoff_dynamic_reloc;
asection * (* _xcoff_create_csect_from_smclas)
- PARAMS ((bfd *, union internal_auxent *, const char *));
+ PARAMS ((bfd *, union internal_auxent *, const char *));
/* Line number and relocation overflow.
XCOFF32 overflows to another section when the line number or the
relocation count exceeds 0xffff. XCOFF64 does not overflow. */
- boolean (*_xcoff_is_lineno_count_overflow)(bfd *, bfd_vma);
- boolean (*_xcoff_is_reloc_count_overflow)(bfd *, bfd_vma);
+ boolean (*_xcoff_is_lineno_count_overflow)
+ PARAMS ((bfd *, bfd_vma));
+ boolean (*_xcoff_is_reloc_count_overflow)
+ PARAMS ((bfd *, bfd_vma));
/* Loader section symbol and relocation table offset
XCOFF32 is after the .loader header
XCOFF64 is offset in .loader header. */
- bfd_vma (*_xcoff_loader_symbol_offset)(bfd *, struct internal_ldhdr *);
- bfd_vma (*_xcoff_loader_reloc_offset)(bfd *, struct internal_ldhdr *);
+ bfd_vma (*_xcoff_loader_symbol_offset)
+ PARAMS ((bfd *, struct internal_ldhdr *));
+ bfd_vma (*_xcoff_loader_reloc_offset)
+ PARAMS ((bfd *, struct internal_ldhdr *));
/* Global linkage. The first word of global linkage code must be be
modified by filling in the correct TOC offset. */
/* rtinit. */
unsigned int _xcoff_rtinit_size;
- boolean (*_xcoff_generate_rtinit)(bfd *, const char *, const char *,
- boolean);
+ boolean (*_xcoff_generate_rtinit)
+ PARAMS ((bfd *, const char *, const char *, boolean));
};
/* Look up an entry in an XCOFF link hash table. */
bfd *, bfd_vma, bfd_vma, struct reloc_howto_struct *howto
extern boolean (*xcoff_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
- (XCOFF_RELOC_FUNCTION_ARGS);
+ PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
extern boolean (*xcoff_complain_overflow[XCOFF_MAX_COMPLAIN_OVERFLOW])
- (XCOFF_COMPLAIN_FUNCTION_ARGS);
+ PARAMS ((XCOFF_COMPLAIN_FUNCTION_ARGS));
/* Relocation functions */
boolean xcoff_reloc_type_noop PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
Written by Fred Fish @ Cygnus Support, using ELF support as the
template.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#define nlm_swap_fixed_header_out(abfd,src,dst) \
(nlm_swap_fixed_header_out_func(abfd)) (abfd,src,dst)
-/* Forward declarations of static functions */
+/* Forward declarations of static functions. */
static boolean add_bfd_section
PARAMS ((bfd *, char *, file_ptr, bfd_size_type, flagword));
}
/* Read in the fixed length portion of the NLM header in external format. */
-
amt = nlm_fixed_header_size (abfd);
x_fxdhdr = (PTR) bfd_malloc (amt);
if (x_fxdhdr == NULL)
/* Allocate an instance of the nlm_obj_tdata structure and hook it up to
the tdata pointer in the bfd. */
-
amt = sizeof (struct nlm_obj_tdata);
new_tdata = (struct nlm_obj_tdata *) bfd_zalloc (abfd, amt);
if (new_tdata == NULL)
/* Check to see if we have an NLM file for this backend by matching
the NLM signature. */
-
signature = nlm_signature (abfd);
if (signature != NULL
&& *signature != '\0'
/* There's no supported way to discover the endianess of an NLM, so test for
a sane version number after doing byte swapping appropriate for this
- XVEC. (Hack alert!) */
-
+ XVEC. (Hack alert!) */
if (i_fxdhdrp->version > 0xFFFF)
goto got_wrong_format_error;
/* There's no supported way to check for 32 bit versus 64 bit addresses,
so ignore this distinction for now. (FIXME) */
-
/* Swap in the rest of the required header. */
if (!nlm_swap_variable_header_in (abfd))
{
additional sections described in the cygnus_ext header.
From this point on we assume that we have an NLM, and do not
treat errors as indicating the wrong format. */
-
if (!add_bfd_section (abfd, NLM_CODE_NAME,
i_fxdhdrp->codeImageOffset,
i_fxdhdrp->codeImageSize,
newsect = bfd_make_section (abfd, name);
if (newsect == NULL)
- {
- return false;
- }
+ return false;
+
newsect->vma = 0; /* NLM's are relocatable. */
newsect->_raw_size = size;
newsect->filepos = offset;
newsect->flags = flags;
newsect->alignment_power = bfd_log2 ((bfd_vma) 0); /* FIXME */
+
return true;
}
bfd_size_type amt;
/* Write the description length and text members. */
-
amt = sizeof (nlm_variable_header (abfd)->descriptionLength);
if (bfd_bwrite ((PTR) & nlm_variable_header (abfd)->descriptionLength, amt,
abfd) != amt)
return false;
/* Convert and write the stackSize field. */
-
put_word (abfd, (bfd_vma) nlm_variable_header (abfd)->stackSize,
(bfd_byte *) temp);
amt = sizeof (temp);
return false;
/* Convert and write the reserved field. */
-
put_word (abfd, (bfd_vma) nlm_variable_header (abfd)->reserved,
(bfd_byte *) temp);
amt = sizeof (temp);
return false;
/* Write the oldThreadName field. This field is a fixed length string. */
-
amt = sizeof (nlm_variable_header (abfd)->oldThreadName);
if (bfd_bwrite ((PTR) nlm_variable_header (abfd)->oldThreadName, amt,
abfd) != amt)
return false;
/* Write the screen name length and text members. */
-
amt = sizeof (nlm_variable_header (abfd)->screenNameLength);
if (bfd_bwrite ((PTR) & nlm_variable_header (abfd)->screenNameLength, amt,
abfd) != amt)
return false;
/* Write the thread name length and text members. */
-
amt = sizeof (nlm_variable_header (abfd)->threadNameLength);
if (bfd_bwrite ((PTR) & nlm_variable_header (abfd)->threadNameLength, amt,
abfd) != amt)
}
}
else
- {
- break;
- }
+ break;
}
return true;
}
return false;
}
+ /* Note - the CoPyRiGhT tag is emitted before the MeSsAgEs
+ tag in order to make the NW4.x and NW5.x loaders happy. */
+
+ /* Write out the copyright header if there is one. */
+ if (find_nonzero ((PTR) nlm_copyright_header (abfd),
+ sizeof (Nlm_Internal_Copyright_Header)))
+ {
+ Nlm_External_Copyright_Header thdr;
+
+ memcpy (thdr.stamp, "CoPyRiGhT=", 10);
+ amt = sizeof (thdr.stamp);
+ if (bfd_bwrite ((PTR) thdr.stamp, amt, abfd) != amt)
+ return false;
+ thdr.copyrightMessageLength[0] =
+ nlm_copyright_header (abfd)->copyrightMessageLength;
+ amt = 1;
+ if (bfd_bwrite ((PTR) thdr.copyrightMessageLength, amt, abfd) != amt)
+ return false;
+ /* The copyright message is a variable length string. */
+ amt = nlm_copyright_header (abfd)->copyrightMessageLength + 1;
+ if (bfd_bwrite ((PTR) nlm_copyright_header (abfd)->copyrightMessage,
+ amt, abfd) != amt)
+ return false;
+ }
+
/* Write out the extended header if there is one. */
if (find_nonzero ((PTR) nlm_extended_header (abfd),
sizeof (Nlm_Internal_Extended_Header)))
return false;
}
- /* Write out the copyright header if there is one. */
- if (find_nonzero ((PTR) nlm_copyright_header (abfd),
- sizeof (Nlm_Internal_Copyright_Header)))
- {
- Nlm_External_Copyright_Header thdr;
-
- memcpy (thdr.stamp, "CoPyRiGhT=", 10);
- amt = sizeof (thdr.stamp);
- if (bfd_bwrite ((PTR) thdr.stamp, amt, abfd) != amt)
- return false;
- thdr.copyrightMessageLength[0] =
- nlm_copyright_header (abfd)->copyrightMessageLength;
- amt = 1;
- if (bfd_bwrite ((PTR) thdr.copyrightMessageLength, amt, abfd) != amt)
- return false;
- /* The copyright message is a variable length string. */
- amt = nlm_copyright_header (abfd)->copyrightMessageLength + 1;
- if (bfd_bwrite ((PTR) nlm_copyright_header (abfd)->copyrightMessage,
- amt, abfd) != amt)
- return false;
- }
-
/* Write out the custom header if there is one. */
if (find_nonzero ((PTR) nlm_custom_header (abfd),
sizeof (Nlm_Internal_Custom_Header)))
nlm_get_symtab_upper_bound (abfd)
bfd *abfd;
{
- Nlm_Internal_Fixed_Header *i_fxdhdrp; /* Nlm file header, internal form */
+ Nlm_Internal_Fixed_Header *i_fxdhdrp; /* Nlm file header, internal form. */
long symcount;
long symtab_size = 0;
The bfd symbols are copied to SYMPTRS.
When we return, the bfd symcount is either zero or contains the correct
- number of symbols.
-*/
+ number of symbols. */
static boolean
nlm_slurp_symbol_table (abfd)
bfd *abfd;
{
- Nlm_Internal_Fixed_Header *i_fxdhdrp; /* Nlm file header, internal form */
- bfd_size_type totsymcount; /* Number of NLM symbols */
- bfd_size_type symcount; /* Counter of NLM symbols */
- nlm_symbol_type *sym; /* Pointer to current bfd symbol */
- unsigned char symlength; /* Symbol length read into here */
- unsigned char symtype; /* Type of debugging symbol */
- bfd_byte temp[NLM_TARGET_LONG_SIZE]; /* Symbol offsets read into here */
+ Nlm_Internal_Fixed_Header *i_fxdhdrp; /* Nlm file header, internal form. */
+ bfd_size_type totsymcount; /* Number of NLM symbols. */
+ bfd_size_type symcount; /* Counter of NLM symbols. */
+ nlm_symbol_type *sym; /* Pointer to current bfd symbol. */
+ unsigned char symlength; /* Symbol length read into here. */
+ unsigned char symtype; /* Type of debugging symbol. */
+ bfd_byte temp[NLM_TARGET_LONG_SIZE]; /* Symbol offsets read into here. */
boolean (*read_import_func) PARAMS ((bfd *, nlm_symbol_type *));
boolean (*set_public_section_func) PARAMS ((bfd *, nlm_symbol_type *));
bfd_size_type amt;
+ i_fxdhdrp->numberOfDebugRecords
+ i_fxdhdrp->numberOfExternalReferences);
if (totsymcount == 0)
- {
- return true;
- }
+ return true;
if (bfd_seek (abfd, i_fxdhdrp->publicsOffset, SEEK_SET) != 0)
return false;
/* Read in the import records. We can only do this if we know how
to read relocs for this target. */
-
read_import_func = nlm_read_import_func (abfd);
if (read_import_func != NULL)
{
/* Header file for ns32k routines.
- Copyright 1996, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 2001, 2002 Free Software Foundation, Inc.
Written by Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern bfd_reloc_status_type _bfd_ns32k_relocate_contents
PARAMS ((reloc_howto_type *, bfd *, bfd_vma, bfd_byte *));
extern bfd_reloc_status_type _bfd_do_ns32k_reloc_contents
PARAMS ((reloc_howto_type *, bfd *, bfd_vma, bfd_byte *,
bfd_vma (*) (bfd_byte *, int),
- int (*) (bfd_vma, bfd_byte *, int)));
+ void (*) (bfd_vma, bfd_byte *, int)));
extern bfd_reloc_status_type _bfd_ns32k_final_link_relocate
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, bfd_vma,
extern bfd_vma _bfd_ns32k_get_displacement PARAMS ((bfd_byte *, int));
extern bfd_vma _bfd_ns32k_get_immediate PARAMS ((bfd_byte *, int));
-extern int _bfd_ns32k_put_displacement PARAMS ((bfd_vma, bfd_byte *, int));
-extern int _bfd_ns32k_put_immediate PARAMS ((bfd_vma, bfd_byte *, int));
+extern void _bfd_ns32k_put_displacement PARAMS ((bfd_vma, bfd_byte *, int));
+extern void _bfd_ns32k_put_immediate PARAMS ((bfd_vma, bfd_byte *, int));
extern bfd_reloc_status_type _bfd_ns32k_reloc_disp
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
return NULL;
if (bfd_bread (ptr, size, abfd) != size)
- return NULL;
+ {
+ bfd_release (abfd, ptr);
+ return NULL;
+ }
symbol_name = ptr;
source_dll = ptr + strlen (ptr) + 1;
(_("%s: string not null terminated in ILF object file."),
bfd_archive_filename (abfd));
bfd_set_error (bfd_error_malformed_archive);
-
+ bfd_release (abfd, ptr);
return NULL;
}
/* Now construct the bfd. */
if (! pe_ILF_build_a_bfd (abfd, magic, symbol_name,
source_dll, ordinal, types))
- return NULL;
+ {
+ bfd_release (abfd, ptr);
+ return NULL;
+ }
return abfd->xvec;
}
cpu-i860.c
cpu-i960.c
cpu-ia64.c
+cpu-ip2k.c
cpu-m10200.c
cpu-m10300.c
cpu-m32r.c
elf32-i386qnx.c
elf32-i860.c
elf32-i960.c
+elf32-ip2k.c
elf32-m32r.c
elf32-m68hc11.c
elf32-m68hc12.c
-# Mensajes en español para bfd 2.12-pre020121.
+# Mensajes en español para bfd 2.12.91.
# Copyright (C) 2002 Free Software Foundation, Inc.
# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2002.
#
msgid ""
msgstr ""
-"Project-Id-Version: bfd 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-31 17:07+0000\n"
-"PO-Revision-Date: 2002-01-24 10:04-0600\n"
+"Project-Id-Version: bfd 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-24 02:29-0500\n"
"Last-Translator: Cristian Othón Martínez Vera <cfuga@itam.mx>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: aout-adobe.c:196
+#: aout-adobe.c:197
#, c-format
msgid "%s: Unknown section type in a.out.adobe file: %x\n"
msgstr "%s: Tipo de sección desconocido en el fichero a.out.adobe: %x\n"
#: aoutx.h:1282 aoutx.h:1699
#, c-format
msgid "%s: can not represent section `%s' in a.out object file format"
-msgstr ""
-"%s: no se puede representar la sección `%s' en el fichero objeto de formato "
-"a.out"
+msgstr "%s: no se puede representar la sección `%s' en el fichero objeto de formato a.out"
#: aoutx.h:1669
#, c-format
-msgid ""
-"%s: can not represent section for symbol `%s' in a.out object file format"
-msgstr ""
-"%s: no se puede representar la sección para el símbolo `%s' en el fichero "
-"objeto de formato a.out"
+msgid "%s: can not represent section for symbol `%s' in a.out object file format"
+msgstr "%s: no se puede representar la sección para el símbolo `%s' en el fichero objeto de formato a.out"
#: aoutx.h:1671
msgid "*unknown*"
msgstr "*desconocido*"
-#: aoutx.h:3735
+#: aoutx.h:3732
#, c-format
msgid "%s: relocateable link from %s to %s not supported"
msgstr "%s: enlace reubicable desde %s a %s sin soporte"
#: archive.c:1826
msgid "Warning: writing archive was slow: rewriting timestamp\n"
-msgstr ""
-"Aviso: la escritura del fichero fue lenta: reescribiendo la marca de tiempo\n"
+msgstr "Aviso: la escritura del fichero fue lenta: reescribiendo la marca de tiempo\n"
# ¡Uff! Si utilizáramos file=archivo, esta traducción sería imposible. cfuga
#: archive.c:2093
msgstr "error interno de BFD %s, abortando en %s línea %d en %s\n"
#: bfd.c:723
-#, fuzzy, c-format
+#, c-format
msgid "BFD %s internal error, aborting at %s line %d\n"
msgstr "error interno de BFD %s, abortando en %s línea %d\n"
#: binary.c:306
#, c-format
msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
-msgstr ""
-"Aviso: Escribiendo la sección `%s' a un desplazamiento de fichero grande (pe "
-"negativo) 0x%lx."
+msgstr "Aviso: Escribiendo la sección `%s' a un desplazamiento de fichero grande (pe negativo) 0x%lx."
#: coff-a29k.c:119
msgid "Missing IHCONST"
msgid "Missing IHIHALF"
msgstr "IHIHALF faltante"
-#: coff-a29k.c:212 coff-or32.c:228
+#: coff-a29k.c:212 coff-or32.c:229
msgid "Unrecognized reloc"
msgstr "Reubicación no reconocida"
msgid "missing IHIHALF reloc"
msgstr "reubicación IHIHALF faltante"
-#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1433
+#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
msgid "GP relative relocation used when GP not defined"
msgstr "se usó una reubicación GP relativa cuando GP no estaba definido"
msgid "using multiple gp values"
msgstr "usando valores múltiples de gp"
-#: coff-arm.c:1051 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:285
#, c-format
msgid "%s: unable to find THUMB glue '%s' for `%s'"
msgstr "%s: no se puede encontrar el pegamento THUMB '%s' para `%s'"
-#: coff-arm.c:1080 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:320
#, c-format
msgid "%s: unable to find ARM glue '%s' for `%s'"
msgstr "%s: no se puede encontrar el pegamento ARM '%s' para `%s'"
-#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990
+#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
#, c-format
msgid "%s(%s): warning: interworking not enabled."
msgstr "%s(%s): aviso: interoperabilidad no activada."
-#: coff-arm.c:1379 elf32-arm.h:993
+#: coff-arm.c:1395 elf32-arm.h:994
#, c-format
msgid " first occurrence: %s: arm call to thumb"
msgstr " primera ocurrencia: %s: llamada arm a thumb"
-#: coff-arm.c:1474 elf32-arm.h:889
+#: coff-arm.c:1490 elf32-arm.h:890
#, c-format
msgid " first occurrence: %s: thumb call to arm"
msgstr " primera ocurrencia: %s: llamada thumb a arm"
-#: coff-arm.c:1477
+#: coff-arm.c:1493
msgid " consider relinking with --support-old-code enabled"
msgstr " considere el reenlace con --support-old-code activado"
-#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017
+#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
#, c-format
msgid "%s: bad reloc address 0x%lx in section `%s'"
msgstr "%s: dirección de reubicación 0x%lx errónea en la sección `%s'"
-#: coff-arm.c:2107
+#: coff-arm.c:2127
#, c-format
msgid "%s: illegal symbol index in reloc: %d"
msgstr "%s: índice de símbolos ilegal en la reubicación: %d"
-#: coff-arm.c:2235
+#: coff-arm.c:2255
#, c-format
-msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"
-msgstr ""
-"%s: ERROR: compilado para APCS-%d mientras que el objetivo %s usa APCS-%d"
+msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
+msgstr "ERROR: %s está compilado para APCS-%d, mientras que %s está compilado para APCS-%d"
-#: coff-arm.c:2250
+#: coff-arm.c:2270 elf32-arm.h:2297
#, c-format
-msgid ""
-"%s: ERROR: passes floats in float registers whereas target %s uses integer "
-"registers"
-msgstr ""
-"%s: ERROR: pasan números de coma flotante en registros de coma flotante "
-"mientras que el objetivo %s usa registros enteros"
+msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
+msgstr "ERROR: %s pasa números de coma flotante en registros de coma flotante, mientras que %s los pasa en registros enteros"
-#: coff-arm.c:2253
+#: coff-arm.c:2273 elf32-arm.h:2302
#, c-format
-msgid ""
-"%s: ERROR: passes floats in integer registers whereas target %s uses float "
-"registers"
-msgstr ""
-"%s: ERROR: pasan números de coma flotante en registros enteros mientras que "
-"el objetivo %s usa registros de coma flotante"
+msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
+msgstr "ERROR: %s pasa números de coma flotante en registros enteros, mientras que %s los pasa en registros de coma flotante"
-#: coff-arm.c:2268
+#: coff-arm.c:2288
#, c-format
-msgid ""
-"%s: ERROR: compiled as position independent code, whereas target %s is "
-"absolute position"
-msgstr ""
-"%s: ERROR: compilado como código independiente de posición, mientras que el "
-"objetivo %s es de posición absoluta"
+msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
+msgstr "ERROR: %s está compilado como código independiente de posición, mientras que el objetivo %s es de posición absoluta"
-#: coff-arm.c:2271
+#: coff-arm.c:2291
#, c-format
-msgid ""
-"%s: ERROR: compiled as absolute position code, whereas target %s is position "
-"independent"
-msgstr ""
-"%s: ERROR: compilado como código de posición absoluta, mientras que el "
-"objetivo %s es independiente de posición"
+msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
+msgstr "ERROR: %s está compilado como código de posición absoluta, mientras que el objetivo %s es independiente de posición"
-#: coff-arm.c:2300
-#, fuzzy, c-format
-msgid "Warning: %s supports interworking, whereas %s does not."
-msgstr ""
-"Aviso: el fichero de entrada %s soporta interoperabilidad, mientras que %s no"
+#: coff-arm.c:2320 elf32-arm.h:2358
+#, c-format
+msgid "Warning: %s supports interworking, whereas %s does not"
+msgstr "Aviso: el fichero de entrada %s soporta interoperabilidad, mientras que %s no"
-#: coff-arm.c:2303
-#, fuzzy, c-format
-msgid "Warning: %s does not support interworking, whereas %s does."
-msgstr ""
-"Aviso: el fichero de entrada %s no soporta interoperabilidad, mientras que %"
-"s sí"
+#: coff-arm.c:2323 elf32-arm.h:2365
+#, c-format
+msgid "Warning: %s does not support interworking, whereas %s does"
+msgstr "Aviso: el fichero de entrada %s no soporta interoperabilidad, mientras que %s sí"
-#: coff-arm.c:2330
+#: coff-arm.c:2350
#, c-format
msgid "private flags = %x:"
msgstr "opciones privadas = %x:"
-#: coff-arm.c:2338 elf32-arm.h:2408
+#: coff-arm.c:2358 elf32-arm.h:2418
msgid " [floats passed in float registers]"
msgstr "[números de coma flotante pasados en registros de coma flotante]"
-#: coff-arm.c:2340
+#: coff-arm.c:2360
msgid " [floats passed in integer registers]"
msgstr "[números de coma flotante pasados en registros enteros]"
-#: coff-arm.c:2343 elf32-arm.h:2411
+#: coff-arm.c:2363 elf32-arm.h:2421
msgid " [position independent]"
msgstr "[independiente de posición]"
-#: coff-arm.c:2345
+#: coff-arm.c:2365
msgid " [absolute position]"
msgstr "[posición absoluta]"
-#: coff-arm.c:2349
+#: coff-arm.c:2369
msgid " [interworking flag not initialised]"
msgstr "[opción de interoperabilidad no iniciada]"
-#: coff-arm.c:2351
+#: coff-arm.c:2371
msgid " [interworking supported]"
msgstr "[soporte para interoperabilidad]"
-#: coff-arm.c:2353
+#: coff-arm.c:2373
msgid " [interworking not supported]"
msgstr "[sin soporte para interoperabilidad]"
-#: coff-arm.c:2401 elf32-arm.h:2114
-#, fuzzy, c-format
-msgid ""
-"Warning: Not setting interworking flag of %s since it has already been "
-"specified as non-interworking"
-msgstr ""
-"Aviso: No se establece la opción de interoperabilidad de %s, ya que ya había "
-"sido especificado como no interoperable"
+#: coff-arm.c:2421 elf32-arm.h:2124
+#, c-format
+msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
+msgstr "Aviso: No se establece la opción de interoperabilidad de %s ya que se había especificado con anterioridad como no interoperable"
-#: coff-arm.c:2405 elf32-arm.h:2118
+#: coff-arm.c:2425 elf32-arm.h:2128
#, c-format
msgid "Warning: Clearing the interworking flag of %s due to outside request"
-msgstr ""
-"Aviso: Limpiando la opción de interoperabilidad de %s debido a una petición "
-"externa"
+msgstr "Aviso: Limpiando la opción de interoperabilidad de %s debido a una petición externa"
#: coff-i960.c:136 coff-i960.c:485
msgid "uncertain calling convention for non-COFF symbol"
msgstr "convención de llamada incierta para un símbolo que no es COFF"
-#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2212 elf32-mips.c:9954
+#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
msgid "unsupported reloc type"
msgstr "tipo de reubicación sin soporte"
-#: coff-mips.c:875 elf32-mips.c:1997 elf64-mips.c:1739
+#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
msgid "GP relative relocation when _gp not defined"
msgstr "reubicación GP relativa cuando _gp no está definido"
#. No other sections should appear in -membedded-pic
#. code.
-#: coff-mips.c:2468
+#: coff-mips.c:2466
msgid "reloc against unsupported section"
msgstr "reubicación contra una sección sin soporte"
-#: coff-mips.c:2476
+#: coff-mips.c:2474
msgid "reloc not properly aligned"
msgstr "reubicación no alineada adecuadamente"
-#: coff-rs6000.c:2710 coff64-rs6000.c:1164
+#: coff-rs6000.c:2766
#, c-format
msgid "%s: unsupported relocation type 0x%02x"
msgstr "%s: tipo de reubicación 0x%02x sin soporte"
-#: coff-rs6000.c:2756 coff64-rs6000.c:1210
+#: coff-rs6000.c:2859
#, c-format
msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
msgstr "%s: reubicación de TOC en 0x%x al símbolo `%s' sin entrada TOC"
-#: coff-rs6000.c:3006 coff64-rs6000.c:2060
+#: coff-rs6000.c:3590 coff64-rs6000.c:2091
#, c-format
msgid "%s: symbol `%s' has unrecognized smclas %d"
msgstr "%s: el símbolo `%s' tiene smclas %d no reconocido"
msgid "Unrecognized reloc type 0x%x"
msgstr "Tipo de reubicación 0x%x no reconocida"
-#: coff-tic54x.c:390 coffcode.h:4868
+#: coff-tic54x.c:390 coffcode.h:4974
#, c-format
msgid "%s: warning: illegal symbol index %ld in relocs"
msgstr "%s: aviso: íncide de símbolos %ld ilegal en reubicaciones"
msgid "ignoring reloc %s\n"
msgstr "ignorando la reubicación %s\n"
-#: coffcode.h:1081
+#: coffcode.h:1086
#, c-format
msgid "%s (%s): Section flag %s (0x%x) ignored"
msgstr "%s (%s): Se ignora la opción de sección %s (0x%x)"
-#: coffcode.h:2132
+#: coffcode.h:2143
#, c-format
msgid "Unrecognized TI COFF target id '0x%x'"
msgstr "Id de objetivo TI COFF '0x%x' no reconocido"
-#: coffcode.h:4257
+#: coffcode.h:4365
#, c-format
msgid "%s: warning: illegal symbol index %ld in line numbers"
msgstr "%s: aviso: índice de símbolos %ld ilegal en los números de línea"
-#: coffcode.h:4271
+#: coffcode.h:4379
#, c-format
msgid "%s: warning: duplicate line number information for `%s'"
msgstr "%s: aviso: información duplicada de números de línea para `%s'"
-#: coffcode.h:4630
+#: coffcode.h:4736
#, c-format
msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
msgstr "%s: Clase de almacenamiento %d no reconocida para %s símbolo `%s'"
-#: coffcode.h:4761
+#: coffcode.h:4867
#, c-format
msgid "warning: %s: local symbol `%s' has no section"
msgstr "aviso: %s: el símbolo local `%s' no tiene sección"
-#: coffcode.h:4906
+#: coffcode.h:5012
#, c-format
msgid "%s: illegal relocation type %d at address 0x%lx"
msgstr "%s: tipo de reubicación %d ilegal en la dirección 0x%lx"
msgid "%s: bad string table size %lu"
msgstr "%s: tamaño de tabla de cadenas %lu erróneo"
-#: cofflink.c:536 elflink.h:1967
+#: cofflink.c:534 elflink.h:1912
#, c-format
msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
msgstr "Aviso: el tipo del símbolo `%s' cambió de %d a %d en %s"
-#: cofflink.c:2317
+#: cofflink.c:2321
#, c-format
msgid "%s: relocs in section `%s', but it has no contents"
msgstr "%s: reubicaciones en la sección `%s', pero no tiene contenidos"
-#: cofflink.c:2653 coffswap.h:889
+#: cofflink.c:2664 coffswap.h:877
#, c-format
msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
msgstr "%s: %s: desbordamiento de reubicación: 0x%lx > 0xffff"
-#: cofflink.c:2662 coffswap.h:876
+#: cofflink.c:2673 coffswap.h:864
#, c-format
msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
msgstr "%s: aviso: %s: desbordamiento de número de línea: 0x%lx > 0xffff"
-#: dwarf2.c:381
+#: dwarf2.c:382
msgid "Dwarf Error: Can't find .debug_str section."
msgstr "Error de Dwarf: No se puede encontrar la sección .debug_str."
-#: dwarf2.c:398
+#: dwarf2.c:399
#, c-format
-msgid ""
-"Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str "
-"size (%u)."
-msgstr ""
-"Error de Dwarf: El desplazamiento DW_FROM_strp (%u) es más grande que el "
-"tamaño de .debug_str (%u)."
+msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
+msgstr "Error de Dwarf: El desplazamiento DW_FROM_strp (%lu) es más grande o igual que el tamaño de .debug_str (%lu)."
-#: dwarf2.c:542
+#: dwarf2.c:543
msgid "Dwarf Error: Can't find .debug_abbrev section."
msgstr "Error de Dwarf: No se puede encontrar la sección .debug_abbrev."
-#: dwarf2.c:559
-#, fuzzy, c-format
-msgid ""
-"Dwarf Error: Abbrev offset (%u) greater than or equal to .debug_abbrev size "
-"(%u)."
-msgstr ""
-"Error de Dwarf: El desplazamiento de abreviatura (%u) es más grande que el "
-"tamaño de abreviatura (%u)."
+#: dwarf2.c:560
+#, c-format
+msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
+msgstr "Error de Dwarf: El desplazamiento de abreviatura (%lu) es más grande o igual que el tamaño de .debug_abbrev (%lu)."
-#: dwarf2.c:756
+#: dwarf2.c:757
#, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %d."
-msgstr "Error de Dwarf: Valor de FORM inválido o no manejado: %d."
+msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
+msgstr "Error de Dwarf: Valor de FORM inválido o no manejado: %u."
-#: dwarf2.c:843
+#: dwarf2.c:852
msgid "Dwarf Error: mangled line number section (bad file number)."
-msgstr ""
-"Error de Dwarf: sección de números de línea revuelta (número erróneo de "
-"fichero)."
+msgstr "Error de Dwarf: sección de números de línea revuelta (número erróneo de fichero)."
-#: dwarf2.c:929
+#: dwarf2.c:938
msgid "Dwarf Error: Can't find .debug_line section."
msgstr "Error de Dwarf: No se puede encontrar lan sección .debug_line."
-#: dwarf2.c:952
-#, fuzzy, c-format
-msgid ""
-"Dwarf Error: Line offset (%u) greater than or equal to .debug_line size (%u)."
-msgstr ""
-"Error de Dwarf: El desplazamiento de línea (%u) es más grande que el tamaño "
-"de línea (%u)."
+#: dwarf2.c:961
+#, c-format
+msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
+msgstr "Error de Dwarf: El desplazamiento de línea (%lu) es más grande o igual que el tamaño de .debug_line (%lu)."
-#: dwarf2.c:1143
+#: dwarf2.c:1159
msgid "Dwarf Error: mangled line number section."
msgstr "Error de Dwarf: sección de números de línea revuelta."
-#: dwarf2.c:1318 dwarf2.c:1529
+#: dwarf2.c:1355 dwarf2.c:1566
#, c-format
-msgid "Dwarf Error: Could not find abbrev number %d."
-msgstr "Error de Dwarf: No se puede encontrar el número de abreviatura %d."
+msgid "Dwarf Error: Could not find abbrev number %u."
+msgstr "Error de Dwarf: No se puede encontrar el número de abreviatura %u."
-#: dwarf2.c:1490
+#: dwarf2.c:1527
#, c-format
-msgid ""
-"Dwarf Error: found dwarf version '%hu', this reader only handles version 2 "
-"information."
-msgstr ""
-"Error de Dwarf: se encontró la versión de dwarf '%hu', este lector solamente "
-"maneja información de la versión 2."
+msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
+msgstr "Error de Dwarf: se encontró la versión de dwarf '%u', este lector solamente maneja información de la versión 2."
-#: dwarf2.c:1497
+#: dwarf2.c:1534
#, c-format
-msgid ""
-"Dwarf Error: found address size '%u', this reader can not handle sizes "
-"greater than '%u'."
-msgstr ""
-"Error de Dwarf: se encontró el tamaño de dirección '%u', este lector no "
-"puede manejar tamaños más grandes que '%u'."
+msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
+msgstr "Error de Dwarf: se encontró el tamaño de dirección '%u', este lector no puede manejar tamaños más grandes que '%u'."
-#: dwarf2.c:1520
+#: dwarf2.c:1557
#, c-format
-msgid "Dwarf Error: Bad abbrev number: %d."
-msgstr "Error de Dwarf: Número de abreviación erróneo: %d."
+msgid "Dwarf Error: Bad abbrev number: %u."
+msgstr "Error de Dwarf: Número de abreviación erróneo: %u."
-#: ecoff.c:1328
+#: ecoff.c:1318
#, c-format
msgid "Unknown basic type %d"
msgstr "Tipo básico %d desconocido"
-#: ecoff.c:1597
+#: ecoff.c:1578
#, c-format
msgid ""
"\n"
"\n"
" Símbolo final+1: %ld"
-#: ecoff.c:1604 ecoff.c:1607
+#: ecoff.c:1585 ecoff.c:1588
#, c-format
msgid ""
"\n"
"\n"
" Primer símbolo: %ld"
-#: ecoff.c:1619
+#: ecoff.c:1600
#, c-format
msgid ""
"\n"
"\n"
" Símbolo final+1: %-7ld Tipo: %s"
-#: ecoff.c:1626
+#: ecoff.c:1607
#, c-format
msgid ""
"\n"
"\n"
" Símbolo local: %ld"
-#: ecoff.c:1634
+#: ecoff.c:1615
#, c-format
msgid ""
"\n"
"\n"
" struct; símbolo final+1: %ld"
-#: ecoff.c:1639
+#: ecoff.c:1620
#, c-format
msgid ""
"\n"
"\n"
" union; símbolo final+1: %ld"
-#: ecoff.c:1644
+#: ecoff.c:1625
#, c-format
msgid ""
"\n"
"\n"
" enum; símbolo final+1: %ld"
-#: ecoff.c:1650
+#: ecoff.c:1631
#, c-format
msgid ""
"\n"
"\n"
" Tipo: %s"
-#: elf-hppa.h:1366 elf-hppa.h:1399 elf32-ppc.c:3062 elf32-sh.c:3201
-#: elf64-x86-64.c:1275
+#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
+#: elf64-sh64.c:1659
#, c-format
-msgid ""
-"%s: warning: unresolvable relocation against symbol `%s' from %s section"
-msgstr ""
-"%s: aviso: reubicación sin resolución contra el símbolo `%s' de la sección %s"
+msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
+msgstr "%s: aviso: reubicación sin resolución contra el símbolo `%s' de la sección %s"
-#: elf-m10200.c:463 elf-m10300.c:673 elf32-arm.h:2074 elf32-avr.c:835
-#: elf32-cris.c:1406 elf32-d10v.c:482 elf32-fr30.c:653 elf32-h8300.c:547
-#: elf32-i860.c:1048 elf32-m32r.c:1280 elf32-openrisc.c:455 elf32-v850.c:1691
-#: elf32-xstormy16.c:976 elf64-mmix.c:1164
+#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
+#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
+#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
+#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
msgid "internal error: out of range error"
msgstr "error interno: error fuera de rango"
-#: elf-m10200.c:467 elf-m10300.c:677 elf32-arm.h:2078 elf32-avr.c:839
-#: elf32-cris.c:1410 elf32-d10v.c:486 elf32-fr30.c:657 elf32-h8300.c:551
-#: elf32-i860.c:1052 elf32-m32r.c:1284 elf32-mips.c:7587 elf32-openrisc.c:459
-#: elf32-v850.c:1695 elf32-xstormy16.c:980 elf64-mips.c:4464 elf64-mmix.c:1168
+#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
+#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
+#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
+#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
msgid "internal error: unsupported relocation error"
msgstr "error interno: error de reubicación sin soporte"
-#: elf-m10200.c:471 elf-m10300.c:681 elf32-arm.h:2082 elf32-d10v.c:490
-#: elf32-h8300.c:555 elf32-m32r.c:1288
+#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
+#: elf32-h8300.c:556 elf32-m32r.c:1286
msgid "internal error: dangerous error"
msgstr "error interno: error peligroso"
-#: elf-m10200.c:475 elf-m10300.c:685 elf32-arm.h:2086 elf32-avr.c:847
-#: elf32-cris.c:1418 elf32-d10v.c:494 elf32-fr30.c:665 elf32-h8300.c:559
-#: elf32-i860.c:1060 elf32-m32r.c:1292 elf32-openrisc.c:467 elf32-v850.c:1715
-#: elf32-xstormy16.c:988 elf64-mmix.c:1176
+#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
+#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
+#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
+#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
msgid "internal error: unknown error"
msgstr "error interno: error desconocido"
msgid "%s: invalid string offset %u >= %lu for section `%s'"
msgstr "%s: desplazamiento de cadena inválido %u >= %lu para la sección `%s'"
-#: elf.c:448
+#: elf.c:589
#, c-format
msgid "%s: invalid SHT_GROUP entry"
msgstr "%s: entrada SHT_GROUP inválida"
-#: elf.c:529
+#: elf.c:660
#, c-format
msgid "%s: no group info for section %s"
msgstr "%s: no hay información de grupo para la sección %s"
-#: elf.c:840
+#: elf.c:1023
msgid ""
"\n"
"Program Header:\n"
"\n"
"Encabezado del Programa:\n"
-#: elf.c:889
+#: elf.c:1073
msgid ""
"\n"
"Dynamic Section:\n"
"\n"
"Sección Dinámica:\n"
-#: elf.c:1018
+#: elf.c:1202
msgid ""
"\n"
"Version definitions:\n"
"\n"
"Definiciones de versión:\n"
-#: elf.c:1041
+#: elf.c:1225
msgid ""
"\n"
"Version References:\n"
"\n"
"Referencias de Versión:\n"
-#: elf.c:1046
+#: elf.c:1230
#, c-format
msgid " required from %s:\n"
msgstr " requerido desde %s:\n"
-#: elf.c:1682
+#: elf.c:1902
#, c-format
msgid "%s: invalid link %lu for reloc section %s (index %u)"
msgstr "%s: enlace %lu inválido para la sección de reubicación %s (índice %u)"
-#: elf.c:3296
+#: elf.c:3603
#, c-format
msgid "%s: Not enough room for program headers (allocated %u, need %u)"
-msgstr ""
-"%s: No hay suficiente espacio para los encabezados del programa (%u "
-"asignados, %u necesarios)"
+msgstr "%s: No hay suficiente espacio para los encabezados del programa (%u asignados, %u necesarios)"
-#: elf.c:3400
+#: elf.c:3708
#, c-format
msgid "%s: Not enough room for program headers, try linking with -N"
-msgstr ""
-"%s: No hay suficiente espacio para los encabezados del programa, pruebe "
-"enlazar con -N"
+msgstr "%s: No hay suficiente espacio para los encabezados del programa, pruebe enlazar con -N"
-#: elf.c:3525
+#: elf.c:3833
#, c-format
-msgid ""
-"Error: First section in segment (%s) starts at 0x%x whereas the segment "
-"starts at 0x%x"
-msgstr ""
-"Error: La primera sección en el segmento (%s) inicia en 0x%x mientras que el "
-"segmento inicia en 0x%x"
+msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
+msgstr "Error: La primera sección en el segmento (%s) inicia en 0x%x mientras que el segmento inicia en 0x%x"
-#: elf.c:3811
+#: elf.c:4148
#, c-format
msgid "%s: warning: allocated section `%s' not in segment"
msgstr "%s: aviso: la sección asignada `%s' no está en el segmento"
-#: elf.c:4142
+#: elf.c:4472
#, c-format
msgid "%s: symbol `%s' required but not present"
msgstr "%s: se requiere el símbolo `%s' pero no está presente"
-#: elf.c:4395
+#: elf.c:4749
#, c-format
-msgid "%s: warning: Empty loadable segment detected\n"
-msgstr "%s: aviso: Se detectó un segmento cargable vacío\n"
+msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr "%s: aviso: Se detectó un segmento cargable vacío, ¿ es intencional ?\n"
-#: elf.c:5808
+#: elf.c:6193
#, c-format
msgid "%s: unsupported relocation type %s"
msgstr "%s: tipo de reubicación %s sin soporte"
-#: elf32-arm.h:1224
+#: elf32-arm.h:1221
#, c-format
msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
msgstr "%s: Aviso: La instrucción Arm BLX apunta a la función Arm '%s'."
-#: elf32-arm.h:1420
+#: elf32-arm.h:1417
#, c-format
msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
msgstr "%s: Aviso: La instrucción Thumb BLX apunta a la función thumb '%s'."
-#: elf32-arm.h:1904 elf32-i386.c:1778 elf32-sh.c:3133
+#: elf32-arm.h:1914 elf32-sh.c:4125
#, c-format
msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
msgstr "%s(%s+0x%lx): reubicación %s contra la sección SEC_MERGE"
-#: elf32-arm.h:1998
+#: elf32-arm.h:2008
#, c-format
-msgid ""
-"%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
-msgstr ""
-"%s: aviso: reubicación %d sin resolución contra el símbolo `%s' de la "
-"sección %s"
+msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
+msgstr "%s: aviso: reubicación %d sin resolución contra el símbolo `%s' de la sección %s"
-#: elf32-arm.h:2166
-#, fuzzy, c-format
-msgid ""
-"Warning: Clearing the interworking flag of %s because non-interworking code "
-"in %s has been linked with it"
-msgstr ""
-"Aviso: Limpiando la opción de interoperación en %s porque se ha enlazado "
-"código no interoperable en %s"
-
-#: elf32-arm.h:2261
+#: elf32-arm.h:2176
#, c-format
-msgid ""
-"Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"
-msgstr ""
-"Error: %s compilado para EABI versión %d, mientras que %s está compilado "
-"para la versión %d"
+msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
+msgstr "Aviso: Limpiando la opción de interoperación en %s porque se ha enlazado con él código no interoperable en %s"
-#: elf32-arm.h:2275
+#: elf32-arm.h:2271
#, c-format
-msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"
-msgstr ""
-"Error: %s compilado para APCS-%d, mientras que %s está compilado para APCS-%d"
+msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
+msgstr "ERROR: %s está compilado para EABI versión %d, mientras que %s está compilado para la versión %d"
-#: elf32-arm.h:2287
+#: elf32-arm.h:2285
#, c-format
-msgid ""
-"Error: %s passes floats in FP registers, whereas %s passes them in integer "
-"registers"
-msgstr ""
-"Error: %s pasa números de coma flotante en registros FP, mientras que %s los "
-"pasa en registros enteros"
-
-#: elf32-arm.h:2292
-#, c-format
-msgid ""
-"Error: %s passes floats in integer registers, whereas %s passes them in FP "
-"registers"
-msgstr ""
-"Error: %s pasa números de coma flotante en registros enteros, mientras que %"
-"s los pasa en registros FP"
-
-#: elf32-arm.h:2303
-#, fuzzy, c-format
-msgid "Error: %s uses VFP instructions, whereas %s uses FPA instructions"
-msgstr ""
-"Error: %s utiliza instrucciones VFP, mientras que %s utiliza instrucciones "
-"FPA"
-
-#: elf32-arm.h:2308
-#, fuzzy, c-format
-msgid "Error: %s uses FPA instructions, whereas %s uses VFP instructions"
-msgstr ""
-"Error: %s utiliza instrucciones FPA, mientras que %s utiliza instrucciones "
-"VFP"
+msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
+msgstr "ERROR: %s está compilado para APCS-%d mientras que el objetivo %s usa APCS-%d"
-#: elf32-arm.h:2328
+#: elf32-arm.h:2313
#, c-format
-msgid "Error: %s uses software FP, whereas %s uses hardware FP"
-msgstr ""
-"Error: %s utiliza FP de software, mientras que %s utiliza FP de hardware"
+msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
+msgstr "ERROR: %s utiliza instrucciones VFP, mientras que %s utiliza instrucciones FPA"
-#: elf32-arm.h:2333
+#: elf32-arm.h:2318
#, c-format
-msgid "Error: %s uses hardware FP, whereas %s uses software FP"
-msgstr ""
-"Error: %s utiliza FP de hardware, mientras que %s utiliza FP de software"
+msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
+msgstr "ERROR: %s utiliza instrucciones FPA, mientras que %s utiliza instrucciones VFP"
-#: elf32-arm.h:2348
+#: elf32-arm.h:2338
#, c-format
-msgid "Warning: %s supports interworking, whereas %s does not"
-msgstr ""
-"Aviso: el fichero de entrada %s soporta interoperabilidad, mientras que %s no"
+msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
+msgstr "ERROR: %s utiliza FP de software, mientras que %s utiliza FP de hardware"
-#: elf32-arm.h:2355
+#: elf32-arm.h:2343
#, c-format
-msgid "Warning: %s does not support interworking, whereas %s does"
-msgstr ""
-"Aviso: el fichero de entrada %s no soporta interoperabilidad, mientras que %"
-"s sí"
+msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
+msgstr "ERROR: %s utiliza FP de hardware, mientras que %s utiliza FP de software"
#. Ignore init flag - it may not be set, despite the flags field
#. containing valid data.
-#: elf32-arm.h:2386 elf32-cris.c:2991 elf32-m68k.c:410 elf32-mips.c:3242
+#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
+#: elfxx-mips.c:7756
#, c-format
msgid "private flags = %lx:"
msgstr "opciones privadas = %lx:"
-#: elf32-arm.h:2395
+#: elf32-arm.h:2405
msgid " [interworking enabled]"
msgstr " [interoperabilidad activada]"
-#: elf32-arm.h:2398
-msgid " [APCS-26]"
-msgstr " [APCS-26]"
-
-#: elf32-arm.h:2400
-msgid " [APCS-32]"
-msgstr " [APCS-32]"
-
-#: elf32-arm.h:2403
+#: elf32-arm.h:2413
msgid " [VFP float format]"
msgstr " [formato de coma flotante VFP]"
-#: elf32-arm.h:2405
+#: elf32-arm.h:2415
msgid " [FPA float format]"
msgstr " [formato de coma flotante FPA]"
-#: elf32-arm.h:2414
+#: elf32-arm.h:2424
msgid " [new ABI]"
msgstr " [ABI nuevo]"
-#: elf32-arm.h:2417
+#: elf32-arm.h:2427
msgid " [old ABI]"
msgstr " [ABI antiguo]"
-#: elf32-arm.h:2420
+#: elf32-arm.h:2430
msgid " [software FP]"
msgstr " [FP por software]"
-#: elf32-arm.h:2428
+#: elf32-arm.h:2438
msgid " [Version1 EABI]"
msgstr " [EABI Version1]"
-#: elf32-arm.h:2431 elf32-arm.h:2442
+#: elf32-arm.h:2441 elf32-arm.h:2452
msgid " [sorted symbol table]"
msgstr " [tabla de símbolos ordenados]"
-#: elf32-arm.h:2433 elf32-arm.h:2444
+#: elf32-arm.h:2443 elf32-arm.h:2454
msgid " [unsorted symbol table]"
msgstr " [tabla de símbolos sin ordenar]"
-#: elf32-arm.h:2439
+#: elf32-arm.h:2449
msgid " [Version2 EABI]"
msgstr " [EABI Version2]"
-#: elf32-arm.h:2447
+#: elf32-arm.h:2457
msgid " [dynamic symbols use segment index]"
msgstr " [los símbolos dinámicos utilizan índices de segmento]"
-#: elf32-arm.h:2450
+#: elf32-arm.h:2460
msgid " [mapping symbols precede others]"
msgstr " [el mapeo de símbolos precede a otros]"
-#: elf32-arm.h:2457
+#: elf32-arm.h:2467
msgid " <EABI version unrecognised>"
msgstr " <versión de EABI no reconocida>"
-#: elf32-arm.h:2464
+#: elf32-arm.h:2474
msgid " [relocatable executable]"
msgstr " [ejecutable reubicable]"
-#: elf32-arm.h:2467
+#: elf32-arm.h:2477
msgid " [has entry point]"
msgstr " [tiene punto de entrada]"
-#: elf32-arm.h:2472
+#: elf32-arm.h:2482
msgid "<Unrecognised flag bits set>"
msgstr "<Conjunto de bits de opción no reconocidos>"
-#: elf32-avr.c:843 elf32-cris.c:1414 elf32-fr30.c:661 elf32-i860.c:1056
-#: elf32-openrisc.c:463 elf32-v850.c:1699 elf32-xstormy16.c:984
-#: elf64-mmix.c:1172
+#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
+#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
+#: elf32-xstormy16.c:941 elf64-mmix.c:1310
msgid "internal error: dangerous relocation"
msgstr "error interno: reubicación peligrosa"
#: elf32-cris.c:949
#, c-format
msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
-msgstr ""
-"%s: reubicación %s sin resolución contra el símbolo `%s' de la sección %s"
+msgstr "%s: reubicación %s sin resolución contra el símbolo `%s' de la sección %s"
#: elf32-cris.c:1012
#, c-format
-msgid ""
-"%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
-msgstr ""
-"%s: No hay PLT ni GOT para la reubicación %s contra el símbolo `%s' de la "
-"sección %s"
+msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
+msgstr "%s: No hay PLT ni GOT para la reubicación %s contra el símbolo `%s' de la sección %s"
-#: elf32-cris.c:1015 elf32-cris.c:1142
+#: elf32-cris.c:1015 elf32-cris.c:1141
msgid "[whose name is lost]"
msgstr "[cuyo nombre se pierde]"
-#: elf32-cris.c:1131
+#: elf32-cris.c:1130
#, c-format
-msgid ""
-"%s: relocation %s with non-zero addend %d against local symbol from %s "
-"section"
-msgstr ""
-"%s: reubicación %s con adición %d que no es cero contra un símbolo local de "
-"la sección %s"
+msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
+msgstr "%s: reubicación %s con adición %d que no es cero contra un símbolo local de la sección %s"
-#: elf32-cris.c:1138
+#: elf32-cris.c:1137
#, c-format
-msgid ""
-"%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
-msgstr ""
-"%s: reubicación %s con adición %d que no es cero contra el símbolo `%s' de "
-"la sección %s"
+msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
+msgstr "%s: reubicación %s con adición %d que no es cero contra el símbolo `%s' de la sección %s"
-#: elf32-cris.c:1156
+#: elf32-cris.c:1155
#, c-format
-msgid ""
-"%s: relocation %s is not allowed for global symbol: `%s' from %s section"
-msgstr ""
-"%s: no se permite la reubicación %s para el símbolo global: `%s' de la "
-"sección %s"
+msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
+msgstr "%s: no se permite la reubicación %s para el símbolo global: `%s' de la sección %s"
-#: elf32-cris.c:1171
-#, fuzzy, c-format
+#: elf32-cris.c:1170
+#, c-format
msgid "%s: relocation %s in section %s with no GOT created"
-msgstr "%s: reubicaciones en la sección `%s', pero no tiene contenidos"
+msgstr "%s: la reubicación %s en la sección %s sin GOT creado"
-#: elf32-cris.c:1289
+#: elf32-cris.c:1288
#, c-format
msgid "%s: Internal inconsistency; no relocation section %s"
-msgstr ""
-"%s: Inconsistencia interna; no se encuentra la sección de reubicación %s"
+msgstr "%s: Inconsistencia interna; no se encuentra la sección de reubicación %s"
-#: elf32-cris.c:2523
+#: elf32-cris.c:2514
#, c-format
msgid ""
"%s, section %s:\n"
" relocation %s should not be used in a shared object; recompile with -fPIC"
msgstr ""
"%s, sección %s:\n"
-" no se debe usar la reubicación %s en un objeto compartido; recompile con -"
-"fPIC"
+" no se debe usar la reubicación %s en un objeto compartido; recompile con -fPIC"
-#: elf32-cris.c:2994
+#: elf32-cris.c:2991
msgid " [symbols have a _ prefix]"
msgstr " [los símbolos tiene un prefijo _]"
-#: elf32-cris.c:3033
+#: elf32-cris.c:3030
#, c-format
msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
-msgstr ""
-"%s: utiliza símbolos con prefijo _, pero escribe el fichero con símbolos sin "
-"prefijo"
+msgstr "%s: utiliza símbolos con prefijo _, pero escribe el fichero con símbolos sin prefijo"
-#: elf32-cris.c:3034
+#: elf32-cris.c:3031
#, c-format
msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
-msgstr ""
-"%s: utiliza símbolos sin prefijo, pero escribe el fichero con símbolos con "
-"prefijo _"
+msgstr "%s: utiliza símbolos sin prefijo, pero escribe el fichero con símbolos con prefijo _"
+
+#: elf32-frv.c:1217
+#, c-format
+msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr "%s: compilado con %s y enlazado con módulos que usan reubicaciones que no son pic"
+
+#: elf32-frv.c:1267
+#, c-format
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr "%s: compilado con %s y enlazado con módulos compilados con %s"
+
+#: elf32-frv.c:1279
+#, c-format
+msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: usa campos e_flags desconocidos (0x%lx) diferentes a aquéllos de los módulos previos (0x%lx)"
+
+#: elf32-frv.c:1315
+#, c-format
+msgid "private flags = 0x%lx:"
+msgstr "opciones privadas = 0x%lx:"
#: elf32-gen.c:82 elf64-gen.c:82
#, c-format
msgid "%s: Relocations in generic ELF (EM: %d)"
msgstr "%s: Reubicaciones en ELF genérico (EM: %d)"
-#: elf32-hppa.c:646
+#: elf32-hppa.c:671 elf64-ppc.c:2323
#, c-format
msgid "%s: cannot create stub entry %s"
msgstr "%s: no se puede crear la entrada de cabo %s"
-#: elf32-hppa.c:937 elf32-hppa.c:3545
+#: elf32-hppa.c:956 elf32-hppa.c:3555
#, c-format
msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
-msgstr ""
-"%s(%s+0x%lx): no se puede alcanzar %s, recompile con -ffuntion-sections"
+msgstr "%s(%s+0x%lx): no se puede alcanzar %s, recompile con -ffuntion-sections"
-#: elf32-hppa.c:1312
+#: elf32-hppa.c:1338 elf64-x86-64.c:673
#, c-format
-msgid ""
-"%s: relocation %s can not be used when making a shared object; recompile "
-"with -fPIC"
-msgstr ""
-"%s: no se puede usar la reubicación %s cuando se hace un objeto compartido; "
-"recompile con -fPIC"
+msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
+msgstr "%s: no se puede usar la reubicación %s cuando se hace un objeto compartido; recompile con -fPIC"
-#: elf32-hppa.c:1332
+#: elf32-hppa.c:1358
#, c-format
-msgid ""
-"%s: relocation %s should not be used when making a shared object; recompile "
-"with -fPIC"
-msgstr ""
-"%s: no se debe usar la reubicación %s cuando se hace un objeto compartido; "
-"recompile con -fPIC"
+msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
+msgstr "%s: no se debe usar la reubicación %s cuando se hace un objeto compartido; recompile con -fPIC"
-#: elf32-hppa.c:1525
+#: elf32-hppa.c:1551
#, c-format
msgid "Could not find relocation section for %s"
msgstr "No se puede encontrar la sección de reubicación para %s"
-#: elf32-hppa.c:2867
+#: elf32-hppa.c:2855
#, c-format
msgid "%s: duplicate export stub %s"
msgstr "%s: cabo de exportación %s duplicado"
-#: elf32-hppa.c:3429
+#: elf32-hppa.c:3433
#, c-format
msgid "%s(%s+0x%lx): fixing %s"
msgstr "%s(%s+0x%lx): componiendo %s"
-#: elf32-hppa.c:4069
+#: elf32-hppa.c:4080
#, c-format
msgid "%s(%s+0x%lx): cannot handle %s for %s"
msgstr "%s(%s+0x%lx): no se puede manejar %s para %s"
-#: elf32-hppa.c:4408
+#: elf32-hppa.c:4393
msgid ".got section not immediately after .plt section"
msgstr "la sección .got no está inmediatamente después de la sección .plt"
-#: elf32-i386.c:298
+#: elf32-i386.c:379
#, c-format
msgid "%s: invalid relocation type %d"
msgstr "%s: tipo de reubicación %d inválido"
-#: elf32-i386.c:718 elf32-s390.c:636 elf64-s390.c:595
+#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
#, c-format
msgid "%s: bad symbol index: %d"
msgstr "%s: índice de símbolos erróneo: %d"
-#: elf32-i386.c:863 elf32-s390.c:790 elf64-ppc.c:2198 elf64-s390.c:759
+#: elf32-i386.c:948
+#, c-format
+msgid "%s: `%s' accessed both as normal and thread local symbol"
+msgstr "%s: se accesó `%s' como un símbolo normal y un símbolo local de hilo"
+
+#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
+#: elf64-x86-64.c:761
#, c-format
msgid "%s: bad relocation section name `%s'"
msgstr "%s: nombre de sección de reubicación `%s' erróneo"
-#: elf32-i386.c:2069 elf32-s390.c:1951 elf64-ppc.c:4124 elf64-s390.c:1955
+#: elf32-i386.c:1159 elf64-alpha.c:4768
+#, c-format
+msgid "%s: TLS local exec code cannot be linked into shared objects"
+msgstr "%s: el código de ejecución local TLS no se puede enlazar en objetos compartidos"
+
+#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
+#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
#, c-format
msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
msgstr "%s(%s+0x%lx): reubicación sin resolución contra el símbolo `%s'"
-#: elf32-i386.c:2107 elf32-s390.c:1989 elf64-s390.c:1993
+#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
+#: elf64-x86-64.c:1986
#, c-format
msgid "%s(%s+0x%lx): reloc against `%s': error %d"
msgstr "%s(%s+0x%lx): reubicación contra `%s': error %d"
-#: elf32-m32r.c:923
+#: elf32-m32r.c:924
msgid "SDA relocation when _SDA_BASE_ not defined"
msgstr "reubicación SDA cuando _SDA_BASE_ no está definido"
-#: elf32-ia64.c:3537 elf32-m32r.c:1007 elf32-ppc.c:2930 elf64-ia64.c:3537
+#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
+#: elf64-alpha.c:4313 elf64-ia64.c:3687
#, c-format
msgid "%s: unknown relocation type %d"
msgstr "%s: tipo de reubicación %d desconocido"
-#: elf32-m32r.c:1223
+#: elf32-m32r.c:1221
#, c-format
msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
-msgstr ""
-"%s: El objetivo (%s) de una reubicación %s está en la sección errónea (%s)"
+msgstr "%s: El objetivo (%s) de una reubicación %s está en la sección errónea (%s)"
-#: elf32-m32r.c:2000
+#: elf32-m32r.c:1947
#, c-format
msgid "%s: Instruction set mismatch with previous modules"
msgstr "%s: Conjunto de instrucciones no coincidente con módulos previos"
-#: elf32-m32r.c:2023
+#: elf32-m32r.c:1970
#, c-format
msgid "private flags = %lx"
msgstr "opciones privadas = %lx"
-#: elf32-m32r.c:2028
+#: elf32-m32r.c:1975
msgid ": m32r instructions"
msgstr ": instrucciones m32r"
-#: elf32-m32r.c:2029
+#: elf32-m32r.c:1976
msgid ": m32rx instructions"
msgstr ": instrucciones m32rx"
msgid " [cpu32]"
msgstr " [cpu32]"
-#: elf32-mcore.c:353 elf32-mcore.c:479
+#: elf32-m68k.c:416
+msgid " [m68000]"
+msgstr " [m68000]"
+
+#: elf32-mcore.c:354 elf32-mcore.c:457
#, c-format
msgid "%s: Relocation %s (%d) is not currently supported.\n"
msgstr "%s: La reubicación %s (%d) actualmente no tiene soporte.\n"
-#: elf32-mcore.c:438
+#: elf32-mcore.c:442
#, c-format
msgid "%s: Unknown relocation type %d\n"
msgstr "%s: Tipo de reubicación %d desconocido\n"
-#: elf32-mips.c:2156 elf64-mips.c:1972
+#: elf32-mips.c:1152 elf64-mips.c:1783
msgid "32bits gp relative relocation occurs for an external symbol"
msgstr "la reubicación gp relativa de 32bits sucede para un símbolo externo"
-#: elf32-mips.c:2305
+#: elf32-mips.c:1301
#, c-format
msgid "Linking mips16 objects into %s format is not supported"
msgstr "Enlazar objetos mips16 en el formato %s no tiene soporte"
-#: elf32-mips.c:3129
+#: elf32-ppc.c:1460
#, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s: enlazando ficheros PIC con ficheros que no son PIC"
-
-#: elf32-mips.c:3139
-#, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
-msgstr ""
-"%s: enlazando ficheros de llamadas abi con ficheros que no son de llamadas "
-"abi"
+msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
+msgstr "%s: compilado con -mrelocatable y enlazado con módulos compilados de forma normal"
-#: elf32-mips.c:3168
+#: elf32-ppc.c:1468
#, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%s: no coincide el ISA (-mips%d) con módulos previos (-mips%d)"
-
-#: elf32-mips.c:3177
-#, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%s: no coincide el ISA (%d) con módulos previos (%d)"
-
-#: elf32-mips.c:3200
-#, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
-msgstr "%s: no coincide el ABI: enlazando el módulo %s con módulos %s previos"
+msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
+msgstr "%s: compilado de forma normal y enlazado con módulos compilados con -mrelocatable"
-#: elf32-mips.c:3214 elf32-ppc.c:1470 elf64-ppc.c:1556 elf64-sparc.c:3027
+#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
#, c-format
msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr ""
-"%s: usa campos de e_flags diferentes (0x%lx) que los módulos previos (0x%lx)"
-
-#: elf32-mips.c:3245
-msgid " [abi=O32]"
-msgstr " [abi=O32]"
-
-#: elf32-mips.c:3247
-msgid " [abi=O64]"
-msgstr " [abi=O64]"
-
-#: elf32-mips.c:3249
-msgid " [abi=EABI32]"
-msgstr " [abi=EABI32]"
-
-#: elf32-mips.c:3251
-msgid " [abi=EABI64]"
-msgstr " [abi=EABI64]"
-
-#: elf32-mips.c:3253
-msgid " [abi unknown]"
-msgstr " [abi desconocido]"
-
-#: elf32-mips.c:3255
-msgid " [abi=N32]"
-msgstr " [abi=N32]"
-
-#: elf32-mips.c:3257
-msgid " [abi=64]"
-msgstr " [abi=64]"
-
-#: elf32-mips.c:3259
-msgid " [no abi set]"
-msgstr " [no hay conjunto abi]"
-
-#: elf32-mips.c:3262
-msgid " [mips1]"
-msgstr " [mips1]"
-
-#: elf32-mips.c:3264
-msgid " [mips2]"
-msgstr " [mips2]"
-
-#: elf32-mips.c:3266
-msgid " [mips3]"
-msgstr " [mips3]"
-
-#: elf32-mips.c:3268
-msgid " [mips4]"
-msgstr " [mips4]"
-
-#: elf32-mips.c:3270
-msgid " [mips5]"
-msgstr " [mips5]"
-
-#: elf32-mips.c:3272
-msgid " [mips32]"
-msgstr " [mips32]"
-
-#: elf32-mips.c:3274
-msgid " [mips64]"
-msgstr " [mips64]"
-
-#: elf32-mips.c:3276
-msgid " [unknown ISA]"
-msgstr " [ISA desconocido]"
-
-#: elf32-mips.c:3279
-msgid " [32bitmode]"
-msgstr " [modo 32bit]"
-
-#: elf32-mips.c:3281
-msgid " [not 32bitmode]"
-msgstr " [no es modo 32bit]"
-
-#: elf32-mips.c:4954
-msgid "static procedure (no name)"
-msgstr "procedimiento estático (sin nombre)"
-
-#: elf32-mips.c:5572 elf64-mips.c:6694
-#, c-format
-msgid "%s: illegal section name `%s'"
-msgstr "%s: nombre de sección `%s' ilegal"
-
-#: elf32-mips.c:6139 elf64-mips.c:3150
-msgid "not enough GOT space for local GOT entries"
-msgstr "no hay suficiente espacio GOT para entradas GOT locales"
-
-#: elf32-mips.c:7250 elf64-mips.c:4203
-#, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
-msgstr "%s: %s+0x%lx: salto a una rutina cabo la cual no es jal"
-
-#: elf32-mips.c:8259 elf64-mips.c:5891
-#, c-format
-msgid "%s: Malformed reloc detected for section %s"
-msgstr "%s: Se detectó una reubicación malformada para la sección %s"
-
-#: elf32-mips.c:8337 elf64-mips.c:5969
-#, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
-msgstr "%s: la reubicación CALL16 en 0x%lx no es contra un símbolo global"
+msgstr "%s: usa campos de e_flags diferentes (0x%lx) que los módulos previos (0x%lx)"
-#: elf32-ppc.c:1436 elf64-ppc.c:1521
-#, c-format
-msgid ""
-"%s: compiled with -mrelocatable and linked with modules compiled normally"
-msgstr ""
-"%s: compilado con -mrelocatable y enlazado con módulos compilados de forma "
-"normal"
-
-#: elf32-ppc.c:1444 elf64-ppc.c:1529
-#, c-format
-msgid ""
-"%s: compiled normally and linked with modules compiled with -mrelocatable"
-msgstr ""
-"%s: compilado de forma normal y enlazado con módulos compilados con -"
-"mrelocatable"
-
-#: elf32-ppc.c:1568
+#: elf32-ppc.c:1592
#, c-format
msgid "%s: Unknown special linker type %d"
msgstr "%s: Tipo de enlazador especial %d desconocido"
-#: elf32-ppc.c:2218 elf32-ppc.c:2252 elf32-ppc.c:2287
+#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
#, c-format
msgid "%s: relocation %s cannot be used when making a shared object"
-msgstr ""
-"%s: no se puede usar la reubicación %s cuando se hace un objeto compartido"
+msgstr "%s: no se puede usar la reubicación %s cuando se hace un objeto compartido"
-#: elf32-ppc.c:3097 elf64-ppc.c:3716
+#: elf32-ppc.c:3126 elf64-ppc.c:5473
#, c-format
msgid "%s: unknown relocation type %d for symbol %s"
msgstr "%s: tipo de reubicación %d desconocido para el símbolo %s"
-#: elf32-ppc.c:3452 elf32-ppc.c:3473 elf32-ppc.c:3523
+#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
#, c-format
-msgid ""
-"%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
-msgstr ""
-"%s: El objetivo (%s) de una reubicación %s está en la sección de salida "
-"errónea (%s)"
+msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
+msgstr "%s: El objetivo (%s) de una reubicación %s está en la sección de salida errónea (%s)"
-#: elf32-ppc.c:3589
+#: elf32-ppc.c:3619
#, c-format
msgid "%s: Relocation %s is not yet supported for symbol %s."
msgstr "%s: La reubicación %s aún no tiene soporte para el símbolo %s."
-#: elf32-sh.c:1101
+#: elf32-sh.c:1964
#, c-format
msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
msgstr "%s: 0x%lx: aviso: desplazamiento R_SH_USES erróneo"
-#: elf32-sh.c:1113
+#: elf32-sh.c:1976
#, c-format
msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
msgstr "%s: 0x%lx: aviso: R_SH_USES señala al insn 0x%x no reconocido"
-#: elf32-sh.c:1130
+#: elf32-sh.c:1993
#, c-format
msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
msgstr "%s: 0x%lx: aviso: desplazamiento de carga R_SH_USES erróneo"
-#: elf32-sh.c:1145
+#: elf32-sh.c:2008
#, c-format
msgid "%s: 0x%lx: warning: could not find expected reloc"
msgstr "%s: 0x%lx: aviso: no se puede encontrar la reubicación esperada"
-#: elf32-sh.c:1202
+#: elf32-sh.c:2036
#, c-format
msgid "%s: 0x%lx: warning: symbol in unexpected section"
msgstr "%s: 0x%lx: aviso: símbolo en una sección inesperada"
-#: elf32-sh.c:1323
+#: elf32-sh.c:2153
#, c-format
msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
msgstr "%s: 0x%lx: aviso: no se puede encontrar la reubicación COUNT esperada"
-#: elf32-sh.c:1332
+#: elf32-sh.c:2162
#, c-format
msgid "%s: 0x%lx: warning: bad count"
msgstr "%s: 0x%lx: aviso: cuenta errónea"
-#: elf32-sh.c:1741 elf32-sh.c:2132
+#: elf32-sh.c:2550 elf32-sh.c:2926
#, c-format
msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
msgstr "%s: 0x%lx: fatal: desbordamiento de reubicación durante la relajación"
-#: elf32-sh.c:3267
+#: elf32-sh.c:4073 elf64-sh64.c:1576
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+msgstr "No se maneja un STO_SH5_ISA32 inesperado en un símbolo local"
+
+#: elf32-sh.c:4284
#, c-format
msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
-msgstr ""
-"%s: 0x%lx: fatal: objetivo de ramificación sin alineación para la "
-"reubicación de soporte de relajamiento"
+msgstr "%s: 0x%lx: fatal: objetivo de ramificación sin alineación para la reubicación de soporte de relajamiento"
+
+#: elf32-sh64.c:203 elf64-sh64.c:2364
+#, c-format
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgstr "%s: compilado como un objeto de 32-bit y %s es de 64-bit"
-#: elf32-sparc.c:1554 elf64-sparc.c:2280
+#: elf32-sh64.c:206 elf64-sh64.c:2367
+#, c-format
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgstr "%s: compilado como un objeto de 64-bit y %s es de 32-bit"
+
+#: elf32-sh64.c:208 elf64-sh64.c:2369
+#, c-format
+msgid "%s: object size does not match that of target %s"
+msgstr "%s: el tamaño del objeto no coincide con el tamaño del objetivo %s"
+
+#: elf32-sh64.c:440 elf64-sh64.c:2941
+#, c-format
+msgid "%s: encountered datalabel symbol in input"
+msgstr "%s: se encontró un símbolo datalabel en la entrada"
+
+#: elf32-sh64.c:523
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr "No coincide PTB: una dirección SHmedia (bit 0 == 1)"
+
+#: elf32-sh64.c:526
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr "No coincide PTA: una dirección SHcompact (bit 0 == 0)"
+
+#: elf32-sh64.c:544
+#, c-format
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgstr "%s: error de GAS: instrucción PTB inesperada con R_SH_PT_16"
+
+#: elf32-sh64.c:593 elf64-sh64.c:1703
+#, c-format
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgstr "%s: error: tipo de reubicación %d sin alinear en %08x reubicación %08x\n"
+
+#: elf32-sh64.c:677
+#, c-format
+msgid "%s: could not write out added .cranges entries"
+msgstr "%s: no se pueden escribir las entradas .cranges agregadas"
+
+#: elf32-sh64.c:739
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
+msgstr "%s: no se pueden escribir las entradas .cranges ordenadas"
+
+#: elf32-sparc.c:1535 elf64-sparc.c:2224
#, c-format
msgid "%s: probably compiled without -fPIC?"
msgstr "%s: ¿Compilado probablemente sin -fPIC?"
-#: elf32-sparc.c:2007
+#: elf32-sparc.c:2002
#, c-format
msgid "%s: compiled for a 64 bit system and target is 32 bit"
msgstr "%s: compilado para un sistema de 64 bit y el objetivo es de 32 bit"
-#: elf32-sparc.c:2021
+#: elf32-sparc.c:2016
#, c-format
msgid "%s: linking little endian files with big endian files"
msgstr "%s: enlazando ficheros little endian con ficheros big endian"
#: elf32-v850.c:685
#, c-format
-msgid ""
-"Variable `%s' can only be in one of the small, zero, and tiny data regions"
-msgstr ""
-"La variable `%s' solamente puede estar en una de las regiones de datos "
-"small, cero, y tiny"
+msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
+msgstr "La variable `%s' solamente puede estar en una de las regiones de datos small, cero, y tiny"
#: elf32-v850.c:688
#, c-format
-msgid ""
-"Variable `%s' cannot be in both small and zero data regions simultaneously"
-msgstr ""
-"La variable `%s' no puede estar simultáneamente en las regiones de datos "
-"small y cero"
+msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
+msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos small y cero"
#: elf32-v850.c:691
#, c-format
-msgid ""
-"Variable `%s' cannot be in both small and tiny data regions simultaneously"
-msgstr ""
-"La variable `%s' no puede estar simultáneamente en las regiones de datos "
-"small y tiny"
+msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
+msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos small y tiny"
#: elf32-v850.c:694
#, c-format
-msgid ""
-"Variable `%s' cannot be in both zero and tiny data regions simultaneously"
-msgstr ""
-"La variable `%s' no puede estar simultáneamente en las regiones de datos "
-"cero y tiny"
+msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
+msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos cero y tiny"
#: elf32-v850.c:1072
msgid "FAILED to find previous HI16 reloc\n"
msgid "could not locate special linker symbol __ctbp"
msgstr "no se puede localizar el símbolo especial del enlazador __ctbp"
-#: elf32-v850.c:1877
+#: elf32-v850.c:1875
#, c-format
msgid "%s: Architecture mismatch with previous modules"
msgstr "%s: No coincide la arquitectura con los módulos previos"
-#: elf32-v850.c:1897
+#: elf32-v850.c:1895
#, c-format
msgid "private flags = %lx: "
msgstr "opciones privadas = %lx: "
-#: elf32-v850.c:1902
+#: elf32-v850.c:1900
msgid "v850 architecture"
msgstr "arquitectura v850"
-#: elf32-v850.c:1903
+#: elf32-v850.c:1901
msgid "v850e architecture"
msgstr "arquitectura v850e"
-#: elf32-v850.c:1904
+#: elf32-v850.c:1902
msgid "v850ea architecture"
msgstr "arquitectura v850ea"
-#: elf32-ia64.c:2247 elf32-xstormy16.c:414 elf64-ia64.c:2247
+#: elf32-vax.c:546
+msgid " [nonpic]"
+msgstr " [no pic]"
+
+#: elf32-vax.c:549
+msgid " [d-float]"
+msgstr " [flotante-d]"
+
+#: elf32-vax.c:552
+msgid " [g-float]"
+msgstr " [flotante-g]"
+
+#: elf32-vax.c:674
+#, c-format
+msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
+msgstr "%s: aviso: la adición GOT de %ld a `%s' no coincide con la adición previa GOT de %ld"
+
+#: elf32-vax.c:1679
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr "%s: aviso: se ignora la adición PLT de %d a `%s' de la sección %s"
+
+#: elf32-vax.c:1814
+#, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr "%s: aviso: reubicación %s contra el símbolo `%s' de la sección %s"
+
+#: elf32-vax.c:1820
+#, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
+msgstr "%s: aviso: reubicación %s a 0x%x de la sección %s"
+
+#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
msgid "non-zero addend in @fptr reloc"
msgstr "adición que no es cero en la reubicación @fptr"
-#: elf64-alpha.c:858
+#: elf64-alpha.c:1097
msgid "GPDISP relocation did not find ldah and lda instructions"
msgstr "la reubicación GPDISP no encontró las instrucciones ldah y lda"
-#: elf64-alpha.c:2934
+#: elf64-alpha.c:3675
#, c-format
msgid "%s: .got subsegment exceeds 64K (size %d)"
msgstr "%s: el subsegmento .got excede los 64K (tamaño %d)"
-#: elf64-alpha.c:3518 elf64-alpha.c:3530
+#: elf64-alpha.c:4498 elf64-alpha.c:4510
#, c-format
msgid "%s: gp-relative relocation against dynamic symbol %s"
msgstr "%s: reubicación gp relativa contra el símbolo dinámico %s"
-#: elf64-hppa.c:2070
+#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#, c-format
+msgid "%s: pc-relative relocation against dynamic symbol %s"
+msgstr "%s: reubicación relativa al pc contra el símbolo dinámico %s"
+
+#: elf64-alpha.c:4564
+#, c-format
+msgid "%s: change in gp: BRSGP %s"
+msgstr "%s: cambio en gp: BRSGP %s"
+
+#: elf64-alpha.c:4589
+msgid "<unknown>"
+msgstr "<desconocido>"
+
+#: elf64-alpha.c:4594
+#, c-format
+msgid "%s: !samegp reloc against symbol without .prologue: %s"
+msgstr "%s: reubicación !samegp contra un símbolo sin .prologue: %s"
+
+#: elf64-alpha.c:4639
+#, c-format
+msgid "%s: unhandled dynamic relocation against %s"
+msgstr "%s: reubicación dinámica sin manejar contra %s"
+
+#: elf64-alpha.c:4752
+#, c-format
+msgid "%s: dtp-relative relocation against dynamic symbol %s"
+msgstr "%s: reubicación relativa a dtp contra el símbolo dinámico %s"
+
+#: elf64-alpha.c:4775
+#, c-format
+msgid "%s: tp-relative relocation against dynamic symbol %s"
+msgstr "%s: reubicación relativa a tp contra el símbolo dinámico %s"
+
+#: elf64-hppa.c:2080
#, c-format
msgid "stub entry for %s cannot load .plt, dp offset = %ld"
+msgstr "la entrada de cabo para %s no puede cargar .plt, desplazamiento dp = %ld"
+
+#: elf64-mmix.c:1002
+#, c-format
+msgid ""
+"%s: Internal inconsistency error for value for\n"
+" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
msgstr ""
-"la entrada de cabo para %s no puede cargar .plt, desplazamiento dp = %ld"
+"%s: Error de inconsistencia interna para el valor para\n"
+" un registro global colocado por el enlazador: enlazado: 0x%lx%08lx != relajado: 0x%lx%08lx\n"
+
+#: elf64-mmix.c:1386
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
+msgstr "%s: reubicación base-más-desplazamiento contra un símbolo de registro: (desconocido) en %s"
-#: elf64-mmix.c:1271
-#, fuzzy, c-format
+#: elf64-mmix.c:1391
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
+msgstr "%s: reubicación base-más-desplazamiento contra un símbolo de registro: %s en %s"
+
+#: elf64-mmix.c:1435
+#, c-format
msgid "%s: register relocation against non-register symbol: (unknown) in %s"
-msgstr ""
-"%s: reubicación de registro contra un símbolo que no es registro: %s en %s"
+msgstr "%s: reubicación de registro contra un símbolo que no es registro: (desconocido) en %s"
-#: elf64-mmix.c:1276
+#: elf64-mmix.c:1440
#, c-format
msgid "%s: register relocation against non-register symbol: %s in %s"
-msgstr ""
-"%s: reubicación de registro contra un símbolo que no es registro: %s en %s"
+msgstr "%s: reubicación de registro contra un símbolo que no es registro: %s en %s"
-#: elf64-mmix.c:1312
+#: elf64-mmix.c:1477
#, c-format
msgid "%s: directive LOCAL valid only with a register or absolute value"
-msgstr ""
-"%s: la directiva LOCAL sólo es válida con un registro o un valor absoluto"
+msgstr "%s: la directiva LOCAL sólo es válida con un registro o un valor absoluto"
-#: elf64-mmix.c:1340
+#: elf64-mmix.c:1505
#, c-format
-msgid ""
-"%s: LOCAL directive: Register $%ld is not a local register. First global "
-"register is $%ld."
-msgstr ""
-"%s: directiva LOCAL: El registro $%ld no es un registro local. El primer "
-"registro global es $%ld."
+msgid "%s: LOCAL directive: Register $%ld is not a local register. First global register is $%ld."
+msgstr "%s: directiva LOCAL: El registro $%ld no es un registro local. El primer registro global es $%ld."
-#: elf64-mmix.c:1615
+#: elf64-mmix.c:1965
#, c-format
-msgid ""
-"%s: Error: multiple definition of `%s'; start of %s is set in a earlier "
-"linked file\n"
-msgstr ""
-"%s: Error: definición múltiple de `%s'; el inicio de %s está definido en un "
-"fichero enlazado con anterioridad\n"
+msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
+msgstr "%s: Error: definición múltiple de `%s'; el inicio de %s está definido en un fichero enlazado con anterioridad\n"
-#: elf64-mmix.c:1674
+#: elf64-mmix.c:2024
msgid "Register section has contents\n"
msgstr "La sección de registros no tiene contenido\n"
-#: elf64-ppc.c:1484 libbfd.c:1436
+#: elf64-mmix.c:2186
#, c-format
-msgid "%s: compiled for a big endian system and target is little endian"
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+" Please report this bug."
msgstr ""
-"%s: compilado para un sistema big endian y el objetivo es little endian"
+"Inconsistencia interna: %u restante != %u máximo.\n"
+" Por favor reporte este bicho."
+
+#: elf64-ppc.c:1669 libbfd.c:1435
+#, c-format
+msgid "%s: compiled for a big endian system and target is little endian"
+msgstr "%s: compilado para un sistema big endian y el objetivo es little endian"
-#: elf64-ppc.c:1486 libbfd.c:1438
+#: elf64-ppc.c:1671 libbfd.c:1437
#, c-format
msgid "%s: compiled for a little endian system and target is big endian"
-msgstr ""
-"%s: compilado para un sistema little endian y el objetivo es big endian"
+msgstr "%s: compilado para un sistema little endian y el objetivo es big endian"
+
+#: elf64-ppc.c:3610
+#, c-format
+msgid "%s: unexpected reloc type %u in .opd section"
+msgstr "%s: tipo de reubicación %u inesperado en la sección .opd"
+
+#: elf64-ppc.c:3630
+#, c-format
+msgid "%s: .opd is not a regular array of opd entries"
+msgstr "%s: .opd no es una matriz regular de entradas opd"
+
+#: elf64-ppc.c:3672
+#, c-format
+msgid "%s: undefined sym `%s' in .opd section"
+msgstr "%s: símbolo `%s' indefinido en la sección .opd"
-#: elf64-ppc.c:3350
-#, fuzzy, c-format
+#: elf64-ppc.c:4397
+#, c-format
+msgid "can't find branch stub `%s'"
+msgstr "no se puede encontrar la ramificación de cabo `%s'"
+
+#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#, c-format
msgid "linkage table error against `%s'"
-msgstr "desbordamiento de la tabla de enlazado contra `%s'"
+msgstr "error de la tabla de enlazado contra `%s'"
+
+#: elf64-ppc.c:4573
+#, c-format
+msgid "can't build branch stub `%s'"
+msgstr "no se puede construir la ramificación de cabos `%s'"
-#: elf64-ppc.c:3432
-msgid "stub section size doesn't match calculated size"
-msgstr "el tamaño de la sección de cabos no coincide con el tamaño calculado"
+#: elf64-ppc.c:5179
+msgid "stubs don't match calculated size"
+msgstr "los cabos no coinciden con el tamaño calculado"
-#: elf64-ppc.c:4061
+#: elf64-ppc.c:5828
#, c-format
msgid "%s: Relocation %s is not supported for symbol %s."
msgstr "%s: La reubicación %s no tiene soporte para el símbolo %s."
-#: elf64-ppc.c:4105
+#: elf64-ppc.c:5872
#, c-format
msgid "%s: error: relocation %s not a multiple of 4"
msgstr "%s: error: la reubicación %s no es un múltiplo de 4"
-#: elf64-sparc.c:1277
+#: elf64-sparc.c:1280
#, c-format
msgid "%s: check_relocs: unhandled reloc type %d"
msgstr "%s: check_relocs: tipo de reubicación %d sin manejar"
-#: elf64-sparc.c:1314
+#: elf64-sparc.c:1317
#, c-format
msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
-msgstr ""
-"%s: Solamente los registros %%g[2367] pueden ser declarados utilizando "
-"STT_REGISTER"
+msgstr "%s: Solamente los registros %%g[2367] pueden ser declarados utilizando STT_REGISTER"
-#: elf64-sparc.c:1334
-#, fuzzy, c-format
+#: elf64-sparc.c:1337
+#, c-format
msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
-msgstr "El registro %%g%d se usó de forma incompatible: %s en %s"
+msgstr "El registro %%g%d se usó de forma incompatible: %s en %s, previamente %s en %s"
-#: elf64-sparc.c:1357
-#, fuzzy, c-format
+#: elf64-sparc.c:1360
+#, c-format
msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
-msgstr ""
-"El símbolo `%s' tiene tipos divergentes: previamente %s, REGISTER en %s"
+msgstr "El símbolo `%s' tiene tipos divergentes: REGISTER en %s, previamente %s en %s"
-#: elf64-sparc.c:1404
-#, fuzzy, c-format
+#: elf64-sparc.c:1406
+#, c-format
msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
-msgstr ""
-"El símbolo `%s' tiene tipos divergentes: previamente %s, REGISTER en %s"
+msgstr "El símbolo `%s' tiene tipos divergentes: %s en %s, previamente REGISTER en %s"
-#: elf64-sparc.c:3008
+#: elf64-sparc.c:2970
#, c-format
msgid "%s: linking UltraSPARC specific with HAL specific code"
-msgstr ""
-"%s: enlazando código específico de UltraSPARC con código específico de HAL"
+msgstr "%s: enlazando código específico de UltraSPARC con código específico de HAL"
-#: elfcode.h:1218
+#: elfcode.h:1198
#, c-format
msgid "%s: version count (%ld) does not match symbol count (%ld)"
-msgstr ""
-"%s: la cuenta de versión (%ld) no coincide con la cuenta de símbolos (%ld)"
+msgstr "%s: la cuenta de versión (%ld) no coincide con la cuenta de símbolos (%ld)"
-#: elflink.c:434
+#: elflink.c:440
#, c-format
msgid "%s: Section %s is too large to add hole of %ld bytes"
msgstr "%s: La sección %s es muy grande para agregar un agujero de %ld bytes"
-#: elflink.h:1113
+#: elflink.h:1090
#, c-format
msgid "%s: warning: unexpected redefinition of `%s'"
msgstr "%s: aviso: redefinición inesperada de `%s'"
-#: elflink.h:1784
+#: elflink.h:1727
#, c-format
msgid "%s: %s: invalid version %u (max %d)"
msgstr "%s: %s: versión %u inválida (máximo %d)"
-#: elflink.h:1825
+#: elflink.h:1768
#, c-format
msgid "%s: %s: invalid needed version %d"
msgstr "%s: %s: versión requerida %d inválida"
-#: elflink.h:1945
+#: elflink.h:1890
#, c-format
msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
msgstr "Aviso: el tamaño del símbolo `%s' cambió de %lu a %lu en %s"
-#: elflink.h:4014
+#: elflink.h:3174
+#, c-format
+msgid "%s: .preinit_array section is not allowed in DSO"
+msgstr "%s: no se permite la sección .preinit_array en DSO"
+
+#: elflink.h:4030
#, c-format
msgid "warning: type and size of dynamic symbol `%s' are not defined"
msgstr "aviso: el tipo y tamaño del símbolo dinámico `%s' no están definidos"
-#: elflink.h:4320
+#: elflink.h:4345
#, c-format
msgid "%s: undefined versioned symbol name %s"
msgstr "%s: nombre de símbolo con versión %s sin definir"
-#: elflink.h:4544 elflink.h:4552 elflink.h:6203 elflink.h:7280
+#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
msgid "Error: out of memory"
msgstr "Error: memoria agotada"
-#: elflink.h:4714
+#: elflink.h:4781
msgid "Not enough memory to sort relocations"
msgstr "No hay suficiente memoria para ordenar las reubicaciones"
-#: elflink.h:5980
+#: elflink.h:5682 elflink.h:5725
+#, c-format
+msgid "%s: could not find output section %s"
+msgstr "%s: no se puede encontrar la sección de salida %s"
+
+#: elflink.h:5688
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr "aviso: la sección %s es de tamaño cero"
+
+#: elflink.h:6275
#, c-format
msgid "%s: could not find output section %s for input section %s"
-msgstr ""
-"%s: no se puede encontrar la sección de salida %s para la sección de entrada "
-"%s"
+msgstr "%s: no se puede encontrar la sección de salida %s para la sección de entrada %s"
-#: elflink.h:6553
+#: elflink.h:6486
+#, c-format
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr "%s: tamaño de reubicación no coincidente en %s sección %s"
+
+#: elflink.h:6849
msgid "warning: relocation against removed section; zeroing"
msgstr "aviso: reubicación contra una sección eliminada; cambiando a ceros"
-#: elflink.h:6583
+#: elflink.h:6879
msgid "warning: relocation against removed section"
msgstr "aviso: reubicación contra una sección eliminada"
-#: elflink.h:6596
+#: elflink.h:6892
#, c-format
msgid "local symbols in discarded section %s"
msgstr "símbolos locales en la sección descartada %s"
-#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456
+#: elfxx-mips.c:734
+msgid "static procedure (no name)"
+msgstr "procedimiento estático (sin nombre)"
+
+#: elfxx-mips.c:1601
+msgid "not enough GOT space for local GOT entries"
+msgstr "no hay suficiente espacio GOT para entradas GOT locales"
+
+#: elfxx-mips.c:2750
+#, c-format
+msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgstr "%s: %s+0x%lx: salto a una rutina cabo la cual no es jal"
+
+#: elfxx-mips.c:4270
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr "%s: Se detectó una reubicación malformada para la sección %s"
+
+#: elfxx-mips.c:4348
+#, c-format
+msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgstr "%s: la reubicación CALL16 en 0x%lx no es contra un símbolo global"
+
+#: elfxx-mips.c:7301
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr "%s: nombre de sección `%s' ilegal"
+
+#: elfxx-mips.c:7615
+#, c-format
+msgid "%s: linking PIC files with non-PIC files"
+msgstr "%s: enlazando ficheros PIC con ficheros que no son PIC"
+
+#: elfxx-mips.c:7625
+#, c-format
+msgid "%s: linking abicalls files with non-abicalls files"
+msgstr "%s: enlazando ficheros de llamadas abi con ficheros que no son de llamadas abi"
+
+#: elfxx-mips.c:7654
+#, c-format
+msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+msgstr "%s: no coincide el ISA (-mips%d) con módulos previos (-mips%d)"
+
+#: elfxx-mips.c:7676
+#, c-format
+msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+msgstr "%s: no coincide el ISA (%d) con módulos previos (%d)"
+
+#: elfxx-mips.c:7699
+#, c-format
+msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+msgstr "%s: no coincide el ABI: enlazando el módulo %s con módulos %s previos"
+
+#: elfxx-mips.c:7759
+msgid " [abi=O32]"
+msgstr " [abi=O32]"
+
+#: elfxx-mips.c:7761
+msgid " [abi=O64]"
+msgstr " [abi=O64]"
+
+#: elfxx-mips.c:7763
+msgid " [abi=EABI32]"
+msgstr " [abi=EABI32]"
+
+#: elfxx-mips.c:7765
+msgid " [abi=EABI64]"
+msgstr " [abi=EABI64]"
+
+#: elfxx-mips.c:7767
+msgid " [abi unknown]"
+msgstr " [abi desconocido]"
+
+#: elfxx-mips.c:7769
+msgid " [abi=N32]"
+msgstr " [abi=N32]"
+
+#: elfxx-mips.c:7771
+msgid " [abi=64]"
+msgstr " [abi=64]"
+
+#: elfxx-mips.c:7773
+msgid " [no abi set]"
+msgstr " [no hay conjunto abi]"
+
+#: elfxx-mips.c:7776
+msgid " [mips1]"
+msgstr " [mips1]"
+
+#: elfxx-mips.c:7778
+msgid " [mips2]"
+msgstr " [mips2]"
+
+#: elfxx-mips.c:7780
+msgid " [mips3]"
+msgstr " [mips3]"
+
+#: elfxx-mips.c:7782
+msgid " [mips4]"
+msgstr " [mips4]"
+
+#: elfxx-mips.c:7784
+msgid " [mips5]"
+msgstr " [mips5]"
+
+#: elfxx-mips.c:7786
+msgid " [mips32]"
+msgstr " [mips32]"
+
+#: elfxx-mips.c:7788
+msgid " [mips64]"
+msgstr " [mips64]"
+
+#: elfxx-mips.c:7790
+msgid " [unknown ISA]"
+msgstr " [ISA desconocido]"
+
+#: elfxx-mips.c:7793
+msgid " [mdmx]"
+msgstr " [mdmx]"
+
+#: elfxx-mips.c:7796
+msgid " [mips16]"
+msgstr " [mips16]"
+
+#: elfxx-mips.c:7799
+msgid " [32bitmode]"
+msgstr " [modo 32bit]"
+
+#: elfxx-mips.c:7801
+msgid " [not 32bitmode]"
+msgstr " [no es modo 32bit]"
+
+#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
#, c-format
msgid "Output file requires shared library `%s'\n"
msgstr "El fichero de salida requiere la biblioteca compartida `%s'\n"
-#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464
+#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
#, c-format
msgid "Output file requires shared library `%s.so.%s'\n"
msgstr "El fichero de salida requiere la biblioteca compartida `%s.so.%s'\n"
-#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708
-#: sparclinux.c:655 sparclinux.c:705
+#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
+#: sparclinux.c:657 sparclinux.c:707
#, c-format
msgid "Symbol %s not defined for fixups\n"
msgstr "El símbolo %s no está definido para composturas\n"
-#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729
+#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
msgid "Warning: fixup count mismatch\n"
msgstr "Aviso: no coincide la cuenta de composturas\n"
msgstr "%s: símbolo `%s' no reconocido opciones 0x%x"
#: ieee.c:877
-#, fuzzy, c-format
+#, c-format
msgid "%s: unimplemented ATI record %u for symbol %u"
msgstr "%s: grabación ATI %u sin implementar para el símbolo %u"
msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
msgstr "%s:%d: carácter `%s' inesperado en el fichero Hexadecimal de Intel\n"
-#: ihex.c:368
+#: ihex.c:366
#, c-format
msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
-msgstr ""
-"%s:%u: suma de comprobación errónea en el fichero Hexadecimal de Intel (se "
-"esperaba %u, se obtuvo %u)"
+msgstr "%s:%u: suma de comprobación errónea en el fichero Hexadecimal de Intel (se esperaba %u, se obtuvo %u)"
-#: ihex.c:422
+#: ihex.c:420
#, c-format
msgid "%s:%u: bad extended address record length in Intel Hex file"
-msgstr ""
-"%s:%u: longitud de registro de dirección extendida errónea en el fichero "
-"Hexadecimal de Intel"
+msgstr "%s:%u: longitud de registro de dirección extendida errónea en el fichero Hexadecimal de Intel"
-#: ihex.c:439
+#: ihex.c:437
#, c-format
msgid "%s:%u: bad extended start address length in Intel Hex file"
-msgstr ""
-"%s:%u: longitud de dirección de inicio extendida errónea en el fichero "
-"Hexadecimal de Intel"
+msgstr "%s:%u: longitud de dirección de inicio extendida errónea en el fichero Hexadecimal de Intel"
-#: ihex.c:456
+#: ihex.c:454
#, c-format
msgid "%s:%u: bad extended linear address record length in Intel Hex file"
-msgstr ""
-"%s:%u: longitud de registro de dirección lineal extendida errónea en el "
-"fichero Hexadecimal de Intel"
+msgstr "%s:%u: longitud de registro de dirección lineal extendida errónea en el fichero Hexadecimal de Intel"
-#: ihex.c:473
+#: ihex.c:471
#, c-format
msgid "%s:%u: bad extended linear start address length in Intel Hex file"
-msgstr ""
-"%s:%u: longitud de dirección de inicio lineal extendida errónea en el "
-"fichero Hexadecimal de Intel"
+msgstr "%s:%u: longitud de dirección de inicio lineal extendida errónea en el fichero Hexadecimal de Intel"
-#: ihex.c:490
+#: ihex.c:488
#, c-format
msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
msgstr "%s:%u: tipo ihex %u no reconocido en el fichero Hexadecimal de Intel\n"
-#: ihex.c:610
+#: ihex.c:607
#, c-format
msgid "%s: internal error in ihex_read_section"
msgstr "%s: error interno en ihex_read_section"
-#: ihex.c:645
+#: ihex.c:642
#, c-format
msgid "%s: bad section length in ihex_read_section"
msgstr "%s: longitud de sección errónea en ihex_read_section"
-#: ihex.c:863
-#, fuzzy, c-format
+#: ihex.c:860
+#, c-format
msgid "%s: address 0x%s out of range for Intel Hex file"
-msgstr ""
-"%s: la dirección 0x%s está fuera de rango en el fichero Hexadecimal de Intel"
+msgstr "%s: la dirección 0x%s está fuera de rango en el fichero Hexadecimal de Intel"
#: libbfd.c:492
#, c-format
msgid "not mapping: env var not set\n"
msgstr "no se mapea: no se estableció la variable de ambiente\n"
-#: libbfd.c:1467
-#, fuzzy, c-format
+#: libbfd.c:1466
+#, c-format
msgid "Deprecated %s called at %s line %d in %s\n"
-msgstr " en %s línea %d en %s\n"
+msgstr "Se llamó a %s que está deprecado en %s línea %d en %s\n"
-#: libbfd.c:1470
-#, fuzzy, c-format
+#: libbfd.c:1469
+#, c-format
msgid "Deprecated %s called\n"
-msgstr "Se llamó a %s que está deprecado"
+msgstr "Se llamó a %s que está deprecado\n"
-#: linker.c:1849
+#: linker.c:1873
#, c-format
msgid "%s: indirect symbol `%s' to `%s' is a loop"
msgstr "%s: el símbolo indirecto `%s' para `%s' es un ciclo"
-#: linker.c:2745
+#: linker.c:2776
#, c-format
msgid "Attempt to do relocateable link with %s input and %s output"
msgstr "Se intentó hacer un enlace reubicable con entrada %s y salida %s"
-#: merge.c:897
+#: merge.c:892
#, c-format
msgid "%s: access beyond end of merged section (%ld + %ld)"
msgstr "%s: acceso más allá del final de la sección mezclada (%ld + %ld)"
msgid "%s: No core to allocate section name %s\n"
msgstr "%s: No hay core para asignar el nombre de sección %s\n"
-#: mmo.c:537
+#: mmo.c:536
#, c-format
msgid "%s: No core to allocate a symbol %d bytes long\n"
msgstr "%s: No hay core para asignar un símbolo de %d bytes de longitud\n"
-#: mmo.c:1190
+#: mmo.c:1245
#, c-format
msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
-msgstr ""
-"%s: fichero mmo inválido: el valor de iniciación para $255 no es `Main'\n"
+msgstr "%s: fichero mmo inválido: el valor de iniciación para $255 no es `Main'\n"
-#: mmo.c:1336
+#: mmo.c:1391
#, c-format
-msgid ""
-"%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name "
-"starting with `%s'\n"
-msgstr ""
-"%s: secuencia de caracteres anchos 0x%02X 0x%02X sin soporte después del "
-"nombre de símbolo que inicia con `%s'\n"
+msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
+msgstr "%s: secuencia de caracteres anchos 0x%02X 0x%02X sin soporte después del nombre de símbolo que inicia con `%s'\n"
-#: mmo.c:1571
+#: mmo.c:1633
#, c-format
msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
msgstr "%s: fichero mmo inválido: código de operación-l `%d' sin soporte\n"
-#: mmo.c:1581
+#: mmo.c:1643
#, c-format
msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
-msgstr ""
-"%s: fichero mmo inválido: se esperaba YZ = 1 se obtuvo YZ = %d para "
-"lop_quote\n"
+msgstr "%s: fichero mmo inválido: se esperaba YZ = 1 se obtuvo YZ = %d para lop_quote\n"
-#: mmo.c:1617
+#: mmo.c:1679
#, c-format
msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
-msgstr ""
-"%s: fichero mmo inválido: se esperaba z = 1 ó z = 2, se obtuvo z = %d para "
-"lop_loc\n"
+msgstr "%s: fichero mmo inválido: se esperaba z = 1 ó z = 2, se obtuvo z = %d para lop_loc\n"
-#: mmo.c:1663
+#: mmo.c:1725
#, c-format
-msgid ""
-"%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
-msgstr ""
-"%s: fichero mmo inválido: se esperaba z = 1 ó z = 2, se obtuvo z = %d para "
-"lop_fixo\n"
+msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
+msgstr "%s: fichero mmo inválido: se esperaba z = 1 ó z = 2, se obtuvo z = %d para lop_fixo\n"
-#: mmo.c:1702
+#: mmo.c:1764
#, c-format
msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
-msgstr ""
-"%s: fichero mmo inválido: se esperaba y = 0, se obtuvo y = %d para "
-"lop_fixrx\n"
+msgstr "%s: fichero mmo inválido: se esperaba y = 0, se obtuvo y = %d para lop_fixrx\n"
-#: mmo.c:1711
+#: mmo.c:1773
#, c-format
-msgid ""
-"%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
-msgstr ""
-"%s: fichero mmo inválido: se esperaba z = 16 ó z = 24, se obtuvo z = %d para "
-"lop_fixrx\n"
+msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
+msgstr "%s: fichero mmo inválido: se esperaba z = 16 ó z = 24, se obtuvo z = %d para lop_fixrx\n"
-#: mmo.c:1734
+#: mmo.c:1796
#, c-format
-msgid ""
-"%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d "
-"for lop_fixrx\n"
-msgstr ""
-"%s: fichero mmo inválido: el byte inicial de la palabra operando debe ser 0 "
-"ó 1, se obtuvo %d para lop_fixrx\n"
+msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
+msgstr "%s: fichero mmo inválido: el byte inicial de la palabra operando debe ser 0 ó 1, se obtuvo %d para lop_fixrx\n"
-#: mmo.c:1757
+#: mmo.c:1819
#, c-format
msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
-msgstr ""
-"%s: no se puede asignar el nombre de fichero para el número de fichero %d, %"
-"d bytes\n"
+msgstr "%s: no se puede asignar el nombre de fichero para el número de fichero %d, %d bytes\n"
-#: mmo.c:1777
+#: mmo.c:1839
#, c-format
-msgid ""
-"%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
-msgstr ""
-"%s: fichero mmo inválido: el número de fichero %d `%s' ya se había "
-"introducido como `%s'\n"
+msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
+msgstr "%s: fichero mmo inválido: el número de fichero %d `%s' ya se había introducido como `%s'\n"
-#: mmo.c:1790
+#: mmo.c:1852
#, c-format
-msgid ""
-"%s: invalid mmo file: file name for number %d was not specified before use\n"
-msgstr ""
-"%s: fichero mmo inválido: no se especificó un nombre de fichero para el "
-"número %d antes de utilizarse\n"
+msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
+msgstr "%s: fichero mmo inválido: no se especificó un nombre de fichero para el número %d antes de utilizarse\n"
-#: mmo.c:1896
+#: mmo.c:1958
#, c-format
-msgid ""
-"%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
-msgstr ""
-"%s: fichero mmo inválido: los campos y y z de lop_stab no son cero, y: %d, "
-"z: %d\n"
+msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
+msgstr "%s: fichero mmo inválido: los campos y y z de lop_stab no son cero, y: %d, z: %d\n"
-#: mmo.c:1932
+#: mmo.c:1994
#, c-format
msgid "%s: invalid mmo file: lop_end not last item in file\n"
-msgstr ""
-"%s: fichero mmo inválido: lop_end no es el último elemento en el fichero\n"
+msgstr "%s: fichero mmo inválido: lop_end no es el último elemento en el fichero\n"
-#: mmo.c:1945
+#: mmo.c:2007
#, c-format
-msgid ""
-"%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras "
-"to the preceding lop_stab (%ld)\n"
-msgstr ""
-"%s: fichero mmo inválido: YZ de lop_end (%ld) no es igual al número de "
-"tetras del lop_stab precedente (%ld)\n"
+msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
+msgstr "%s: fichero mmo inválido: YZ de lop_end (%ld) no es igual al número de tetras del lop_stab precedente (%ld)\n"
-#: mmo.c:2610
+#: mmo.c:2670
#, c-format
msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
msgstr "%s: tabla de símbolos inválida: símbolo `%s' duplicado\n"
-#: mmo.c:2898
+#: mmo.c:2921
#, c-format
-msgid ""
-"%s: Bad symbol definition: `Main' set to %s rather than the start address %"
-"s\n"
-msgstr ""
-"%s: Definición de símbolo errónea: `Main' se estableción como %s en lugar de "
-"la dirección de inicio %s\n"
+msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
+msgstr "%s: Definición de símbolo errónea: `Main' se estableción como %s en lugar de la dirección de inicio %s\n"
-#: mmo.c:2932
+#: mmo.c:3011
#, c-format
-msgid ""
-"%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: "
-"%d. Only `Main' will be emitted.\n"
-msgstr ""
-"%s: aviso: la tabla de símbolos es demasiado grande para mmo, es más grande "
-"que 65535 words de 32-bit: %d. Sólo se emitirá `Main'.\n"
+msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d. Only `Main' will be emitted.\n"
+msgstr "%s: aviso: la tabla de símbolos es demasiado grande para mmo, es más grande que 65535 words de 32-bit: %d. Sólo se emitirá `Main'.\n"
-#: mmo.c:2977
+#: mmo.c:3056
#, c-format
msgid "%s: internal error, symbol table changed size from %d to %d words\n"
-msgstr ""
-"%s: error interno, la tabla de símbolos cambió de tamaño de %d a %d words\n"
+msgstr "%s: error interno, la tabla de símbolos cambió de tamaño de %d a %d words\n"
-#: mmo.c:3032
+#: mmo.c:3111
#, c-format
msgid "%s: internal error, internal register section %s had contents\n"
-msgstr ""
-"%s: error interno, la sección interna de registros %s tiene contenido\n"
+msgstr "%s: error interno, la sección interna de registros %s tiene contenido\n"
-#: mmo.c:3084
+#: mmo.c:3163
#, c-format
msgid "%s: no initialized registers; section length 0\n"
msgstr "%s: no hay registros iniciados; longitud de sección 0\n"
-#: mmo.c:3090
+#: mmo.c:3169
#, c-format
msgid "%s: too many initialized registers; section length %ld\n"
msgstr "%s: demasiados registros iniciados: longitud de sección %ld\n"
-#: mmo.c:3095
+#: mmo.c:3174
#, c-format
-msgid ""
-"%s: invalid start address for initialized registers of length %ld: 0x%lx%"
-"08lx\n"
-msgstr ""
-"%s: dirección de inicio inválida para los registros iniciados de longitud %"
-"ld: 0x%lx%08lx\n"
+msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
+msgstr "%s: dirección de inicio inválida para los registros iniciados de longitud %ld: 0x%lx%08lx\n"
-#: oasys.c:1036
+#: oasys.c:1029
#, c-format
msgid "%s: can not represent section `%s' in oasys"
msgstr "%s: no se puede representar la sección `%s' en oasys"
#: peicode.h:1162
#, c-format
msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
-msgstr ""
-"%s: Tipo de máquina (0x%x) no reconocida en el archivo de Formato de "
-"Importación de Bibliotecas"
+msgstr "%s: Tipo de máquina (0x%x) no reconocida en el archivo de Formato de Importación de Bibliotecas"
#: peicode.h:1174
#, c-format
-msgid ""
-"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
-"archive"
-msgstr ""
-"%s: Tipo de máquina (0x%x) reconocida pero sin manejar en el archivo de "
-"Formato de Importación de Bibliotecas"
+msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
+msgstr "%s: Tipo de máquina (0x%x) reconocida pero sin manejar en el archivo de Formato de Importación de Bibliotecas"
#: peicode.h:1191
#, c-format
msgid "%s: size field is zero in Import Library Format header"
-msgstr ""
-"%s: el tamaño del campo es cero en el encabezado del Formato de Importación "
-"de Bibliotecas"
+msgstr "%s: el tamaño del campo es cero en el encabezado del Formato de Importación de Bibliotecas"
#: peicode.h:1219
#, c-format
msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
msgstr "Partición[%d] longitud = 0x%.8lx (%ld)\n"
-#: som.c:5402
+#: som.c:5398
msgid "som_sizeof_headers unimplemented"
msgstr "som_sizeof_headers sin implementar"
msgid "%s:%d: Unexpected character `%s' in S-record file\n"
msgstr "%s:%d: Caractér `%s' inesperado en el fichero S-record\n"
-#: syms.c:998
+#: stabs.c:319
+#, c-format
+msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
+msgstr "%s(%s+0x%lx): La entrada de cabos tiene una cadena índice inválida."
+
+#: syms.c:1044
msgid "Unsupported .stab relocation"
msgstr "Reubicación .stab sin soporte"
msgid "Size mismatch section %s=%lx, %s=%lx"
msgstr "No coincide el tamaño de la sección %s=%lx, %s=%lx"
-#: vms-gsd.c:704
+#: vms-gsd.c:702
#, c-format
msgid "unknown gsd/egsd subtype %d"
msgstr "subtipo de gsd/egsd %d desconocido"
msgstr "¡ No hay Memoria !"
#: vms-tir.c:362
-#, fuzzy, c-format
+#, c-format
msgid "bad section index in %s"
-msgstr "Índice de sección erróneo en ETIR_S_C_STA_PQ"
+msgstr "Índice de sección erróneo en %s"
#: vms-tir.c:375
-#, fuzzy, c-format
+#, c-format
msgid "unsupported STA cmd %s"
-msgstr "Orden STA %d sin soporte"
+msgstr "orden STA %s sin soporte"
#: vms-tir.c:380 vms-tir.c:1240
-#, fuzzy, c-format
+#, c-format
msgid "reserved STA cmd %d"
-msgstr "Orden STA %d reservada"
+msgstr "orden STA %d reservada"
#: vms-tir.c:491 vms-tir.c:514
-#, fuzzy, c-format
+#, c-format
msgid "%s: no symbol \"%s\""
-msgstr "%s: no hay tal símbolo"
+msgstr "%s: no existe el símbolo \"%s\""
#. unsigned shift
#. rotate
#. Define a literal.
#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
#: vms-tir.c:838 vms-tir.c:1563
-#, fuzzy, c-format
+#, c-format
msgid "%s: not supported"
-msgstr "no tiene soporte para"
+msgstr "%s: no tiene soporte"
#: vms-tir.c:586 vms-tir.c:1418
-#, fuzzy, c-format
+#, c-format
msgid "%s: not implemented"
-msgstr "%s: %s sin implementar\n"
+msgstr "%s: sin implementar"
#: vms-tir.c:590 vms-tir.c:1422
-#, fuzzy, c-format
+#, c-format
msgid "reserved STO cmd %d"
-msgstr "Orden STO %d reservada"
+msgstr "orden STO %d reservada"
#: vms-tir.c:708 vms-tir.c:1568
-#, fuzzy, c-format
+#, c-format
msgid "reserved OPR cmd %d"
-msgstr "Orden OPR %d reservada"
+msgstr "orden OPR %d reservada"
#: vms-tir.c:776 vms-tir.c:1632
-#, fuzzy, c-format
+#, c-format
msgid "reserved CTL cmd %d"
-msgstr "Orden CTL %d reservada"
+msgstr "orden CTL %d reservada"
#. stack byte from image
#. arg: none.
#: vms-tir.c:1148
-#, fuzzy
msgid "stack-from-image not implemented"
-msgstr "Pila-desde-imagen sin implementar"
+msgstr "pila-desde-imagen sin implementar"
#: vms-tir.c:1166
-#, fuzzy
msgid "stack-entry-mask not fully implemented"
-msgstr "Pila-máscara-entrada no está completamente implementado"
+msgstr "pila-máscara-entrada no está completamente implementado"
#. compare procedure argument
#. arg: cs symbol name
msgstr "PASSMECH no está completamente implementado"
#: vms-tir.c:1199
-#, fuzzy
msgid "stack-local-symbol not fully implemented"
-msgstr "Pila-símbolo-local no está completamente implementado"
+msgstr "pila-símbolo-local no está completamente implementado"
#: vms-tir.c:1212
-#, fuzzy
msgid "stack-literal not fully implemented"
-msgstr "Pila-literal no está completamente implementado"
+msgstr "pila-literal no está completamente implementado"
#: vms-tir.c:1233
-#, fuzzy
msgid "stack-local-symbol-entry-point-mask not fully implemented"
-msgstr ""
-"Pila-símbolo-local-máscara-punto-entrada no está completamente implementado"
+msgstr "pila-símbolo-local-máscara-punto-entrada no está completamente implementado"
#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
#: vms-tir.c:1619 vms-tir.c:1627
-#, fuzzy, c-format
+#, c-format
msgid "%s: not fully implemented"
-msgstr "PASSMECH no está completamente implementado"
+msgstr "%s: no está completamente implementado"
#: vms-tir.c:1684
-#, fuzzy, c-format
+#, c-format
msgid "obj code %d not found"
-msgstr "No se encontró el código objeto %d"
+msgstr "no se encontró el código objeto %d"
#: vms-tir.c:2019
#, c-format
msgid "Unhandled relocation %s"
msgstr "Reubicación %s sin manejar"
-#: xcofflink.c:1241
+#: xcofflink.c:1243
#, c-format
msgid "%s: `%s' has line numbers but no enclosing section"
msgstr "%s: `%s' tiene números de línea pero no una sección contenedora"
-#: xcofflink.c:1294
+#: xcofflink.c:1296
#, c-format
msgid "%s: class %d symbol `%s' has no aux entries"
msgstr "%s: clase %d símbolo `%s' no tiene entradas auxiliares"
-#: xcofflink.c:1317
+#: xcofflink.c:1319
#, c-format
msgid "%s: symbol `%s' has unrecognized csect type %d"
msgstr "%s: el símbolo `%s' tiene un tipo csect %d no reconocido"
-#: xcofflink.c:1329
+#: xcofflink.c:1331
#, c-format
msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
msgstr "%s: símbolo XTY_ER `%s' erróneo: clase %d scnum %d scnlen %d"
-#: xcofflink.c:1365
+#: xcofflink.c:1367
#, c-format
msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
msgstr "%s: símbolo XMC_TCO `%s' es clase %d scnlen %d"
-#: xcofflink.c:1517
+#: xcofflink.c:1519
#, c-format
msgid "%s: csect `%s' not in enclosing section"
msgstr "%s: csect `%s' no está contenido en una sección"
-#: xcofflink.c:1624
+#: xcofflink.c:1626
#, c-format
msgid "%s: misplaced XTY_LD `%s'"
msgstr "%s: XTY_LD `%s' mal ubicado"
-#: xcofflink.c:1948
+#: xcofflink.c:1957
#, c-format
msgid "%s: reloc %s:%d not in csect"
msgstr "%s: la reubicación %s:%d no está en csect"
-#: xcofflink.c:2083
+#: xcofflink.c:2092
#, c-format
msgid "%s: XCOFF shared object when not producing XCOFF output"
msgstr "%s: objeto compartido XCOFF cuando no se produce salida XCOFF"
-#: xcofflink.c:2104
+#: xcofflink.c:2113
#, c-format
msgid "%s: dynamic object with no .loader section"
msgstr "%s: objeto dinámico sin sección .loader"
-#: xcofflink.c:2749
+#: xcofflink.c:2758
#, c-format
msgid "%s: no such symbol"
msgstr "%s: no hay tal símbolo"
-#: xcofflink.c:2890
+#: xcofflink.c:2891
msgid "error: undefined symbol __rtinit"
msgstr "error: símbolo __rtinit indefinido"
-#: xcofflink.c:3458
+#: xcofflink.c:3453
#, c-format
msgid "warning: attempt to export undefined symbol `%s'"
msgstr "aviso: intento de exportar el símbolo sin definir `%s'"
-#: xcofflink.c:4452
+#: xcofflink.c:4447
#, c-format
msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
-msgstr ""
-"Desbordamiento de TOC: 0x%lx > 0x10000; pruebe -mminimal-toc al compilar"
+msgstr "Desbordamiento de TOC: 0x%lx > 0x10000; pruebe -mminimal-toc al compilar"
-#: xcofflink.c:5292 xcofflink.c:5754 xcofflink.c:5816 xcofflink.c:6117
+#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
#, c-format
msgid "%s: loader reloc in unrecognized section `%s'"
msgstr "%s: reubicación del cargador en la sección `%s' no reconocida"
-#: xcofflink.c:5314 xcofflink.c:6128
+#: xcofflink.c:5309 xcofflink.c:6130
#, c-format
msgid "%s: `%s' in loader reloc but not loader sym"
-msgstr ""
-"%s: `%s' en la reubicación del cargador pero no es un símbolo del cargador"
+msgstr "%s: `%s' en la reubicación del cargador pero no es un símbolo del cargador"
-#: xcofflink.c:5329
+#: xcofflink.c:5324
#, c-format
msgid "%s: loader reloc in read-only section %s"
msgstr "%s: reubicación del cargador en la sección de sólo lectura %s"
-#: elf32-ia64.c:2189 elf64-ia64.c:2189
+#: elf32-ia64.c:2222 elf64-ia64.c:2222
msgid "@pltoff reloc against local symbol"
msgstr "reubicación @pltoff contra un símbolo local"
-#: elf32-ia64.c:3413 elf64-ia64.c:3413
+#: elf32-ia64.c:3562 elf64-ia64.c:3562
#, c-format
msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
msgstr "%s: segmento de datos short desbordado (0x%lx >= 0x400000)"
-#: elf32-ia64.c:3424 elf64-ia64.c:3424
+#: elf32-ia64.c:3573 elf64-ia64.c:3573
#, c-format
msgid "%s: __gp does not cover short data segment"
msgstr "%s: __gp no cubre el segmento de datos short"
-#: elf32-ia64.c:3728 elf64-ia64.c:3728
+#: elf32-ia64.c:3858 elf64-ia64.c:3858
#, c-format
msgid "%s: linking non-pic code in a shared library"
msgstr "%s: enlazando código que no es pic en una biblioteca compartida"
-#: elf32-ia64.c:3761 elf64-ia64.c:3761
+#: elf32-ia64.c:3891 elf64-ia64.c:3891
#, c-format
msgid "%s: @gprel relocation against dynamic symbol %s"
msgstr "%s: reubicación @gprel contra el símbolo dinámico %s"
-#: elf32-ia64.c:3900 elf64-ia64.c:3900
+#: elf32-ia64.c:4030 elf64-ia64.c:4030
#, c-format
msgid "%s: dynamic relocation against speculation fixup"
msgstr "%s: reubicación dinámica contra una compostura de especulación"
-#: elf32-ia64.c:3908 elf64-ia64.c:3908
+#: elf32-ia64.c:4038 elf64-ia64.c:4038
#, c-format
msgid "%s: speculation fixup against undefined weak symbol"
msgstr "%s: compostura de especulación contra un símbolo débil indefinido"
-#: elf32-ia64.c:4092 elf64-ia64.c:4092
+#: elf32-ia64.c:4271 elf64-ia64.c:4271
msgid "unsupported reloc"
msgstr "reubicación sin soporte"
-#: elf32-ia64.c:4372 elf64-ia64.c:4372
+#: elf32-ia64.c:4551 elf64-ia64.c:4551
#, c-format
msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
-msgstr ""
-"%s: enlazando deferencias-captura-en-NULL con ficheros que no son de captura"
+msgstr "%s: enlazando deferencias-captura-en-NULL con ficheros que no son de captura"
-#: elf32-ia64.c:4381 elf64-ia64.c:4381
+#: elf32-ia64.c:4560 elf64-ia64.c:4560
#, c-format
msgid "%s: linking big-endian files with little-endian files"
msgstr "%s: enlazando ficheros big endian con ficheros little endian"
-#: elf32-ia64.c:4390 elf64-ia64.c:4390
+#: elf32-ia64.c:4569 elf64-ia64.c:4569
#, c-format
msgid "%s: linking 64-bit files with 32-bit files"
msgstr "%s: enlazando ficheros de 64-bit con ficheros de 32-bit"
-#: elf32-ia64.c:4399 elf64-ia64.c:4399
+#: elf32-ia64.c:4578 elf64-ia64.c:4578
#, c-format
msgid "%s: linking constant-gp files with non-constant-gp files"
-msgstr ""
-"%s: enlazando ficheros de gp constante con ficheros con gp no constante"
+msgstr "%s: enlazando ficheros de gp constante con ficheros con gp no constante"
-#: elf32-ia64.c:4409 elf64-ia64.c:4409
+#: elf32-ia64.c:4588 elf64-ia64.c:4588
#, c-format
msgid "%s: linking auto-pic files with non-auto-pic files"
-msgstr ""
-"%s: enlazando ficheros de pic automático con ficheros sin pic automático"
+msgstr "%s: enlazando ficheros de pic automático con ficheros sin pic automático"
#: peigen.c:962 pepigen.c:962
#, c-format
"There is an import table, but the section containing it could not be found\n"
msgstr ""
"\n"
-"Hay una tabla de importación, pero la sección que la contiene no se puede "
-"encontrar\n"
+"Hay una tabla de importación, pero la sección que la contiene no se puede encontrar\n"
#: peigen.c:1076 pepigen.c:1076
#, c-format
#: peigen.c:1116 pepigen.c:1116
#, c-format
msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
-msgstr ""
-"\tcódigo-base %08lx tabla-de-contenidos (cargable/actual) %08lx/%08lx\n"
+msgstr "\tcódigo-base %08lx tabla-de-contenidos (cargable/actual) %08lx/%08lx\n"
#: peigen.c:1122 pepigen.c:1122
msgid ""
"The Import Tables (interpreted %s section contents)\n"
msgstr ""
"\n"
-"Las Tablas de Importación (se interpretaron los contenidos de la sección %"
-"s)\n"
+"Las Tablas de Importación (se interpretaron los contenidos de la sección %s)\n"
#: peigen.c:1130 pepigen.c:1130
-#, fuzzy
msgid ""
" vma: Hint Time Forward DLL First\n"
" Table Stamp Chain Name Thunk\n"
-msgstr " Tabla Estampa Cadena Nombre Thunk\n"
+msgstr ""
+" vma: Pista Fecha Adelante DLL Primero\n"
+" Tabla Estampa Cadena Nombre Thunk\n"
-#: peigen.c:1180 pepigen.c:1180
+#: peigen.c:1181 pepigen.c:1181
#, c-format
msgid ""
"\n"
"\n"
"\tNombre de la DLL: %s\n"
-#: peigen.c:1184 peigen.c:1247 pepigen.c:1184 pepigen.c:1247
-msgid "\tvma: Hint/Ord Member-Name\n"
-msgstr "\tvma: Nombre de Miembro de Pista/Ord\n"
+#: peigen.c:1192 pepigen.c:1192
+msgid "\tvma: Hint/Ord Member-Name Bound-To\n"
+msgstr "\tvma: Pista/Ord Nombre-Miembro Unido-A\n"
-#: peigen.c:1246 pepigen.c:1246
-msgid "\tThe Import Address Table (difference found)\n"
+#: peigen.c:1217 pepigen.c:1217
+msgid ""
+"\n"
+"There is a first thunk, but the section containing it could not be found\n"
msgstr ""
-"\tLa Tabla de Importación de Direcciones (se encontró una diferencia)\n"
-
-#: peigen.c:1253 pepigen.c:1253
-msgid "\t>>> Ran out of IAT members!\n"
-msgstr "\t>>> ¡Se terminaron los miembros IAT!\n"
-
-#: peigen.c:1271 pepigen.c:1271
-msgid "\tThe Import Address Table is identical\n"
-msgstr "\tLa Tabla de Importación de Direcciones es idéntica\n"
+"\n"
+"Hay un thunk inicial, pero la sección que lo contiene no se puede encontrar\n"
-#: peigen.c:1343 pepigen.c:1343
+#: peigen.c:1357 pepigen.c:1357
msgid ""
"\n"
"There is an export table, but the section containing it could not be found\n"
msgstr ""
"\n"
-"Hay una tabla de exportación, pero la sección que la contiene no se puede "
-"encontrar\n"
+"Hay una tabla de exportación, pero la sección que la contiene no se puede encontrar\n"
-#: peigen.c:1348 pepigen.c:1348
+#: peigen.c:1362 pepigen.c:1362
#, c-format
msgid ""
"\n"
"\n"
"Hay una tabla de exportación en %s en 0x%lx\n"
-#: peigen.c:1379 pepigen.c:1379
+#: peigen.c:1393 pepigen.c:1393
#, c-format
msgid ""
"\n"
"\n"
msgstr ""
"\n"
-"Las Tablas de Exportación (se interpretaron los contenidos de la sección %"
-"s)\n"
+"Las Tablas de Exportación (se interpretaron los contenidos de la sección %s)\n"
"\n"
-#: peigen.c:1383 pepigen.c:1383
+#: peigen.c:1397 pepigen.c:1397
#, c-format
msgid "Export Flags \t\t\t%lx\n"
msgstr "Opciones de Exportación \t\t\t%lx\n"
-#: peigen.c:1386 pepigen.c:1386
+#: peigen.c:1400 pepigen.c:1400
#, c-format
msgid "Time/Date stamp \t\t%lx\n"
msgstr "marca de Hora/Fecha \t\t%lx\n"
-#: peigen.c:1389 pepigen.c:1389
+#: peigen.c:1403 pepigen.c:1403
#, c-format
msgid "Major/Minor \t\t\t%d/%d\n"
msgstr "Mayor/Menor \t\t\t%d/%d\n"
-#: peigen.c:1392 pepigen.c:1392
+#: peigen.c:1406 pepigen.c:1406
msgid "Name \t\t\t\t"
msgstr "Nombre \t\t\t\t"
-#: peigen.c:1398 pepigen.c:1398
+#: peigen.c:1412 pepigen.c:1412
#, c-format
msgid "Ordinal Base \t\t\t%ld\n"
msgstr "Base Ordinal \t\t\t%ld\n"
-#: peigen.c:1401 pepigen.c:1401
+#: peigen.c:1415 pepigen.c:1415
msgid "Number in:\n"
msgstr "Número en:\n"
-#: peigen.c:1404 pepigen.c:1404
+#: peigen.c:1418 pepigen.c:1418
#, c-format
msgid "\tExport Address Table \t\t%08lx\n"
msgstr "\tTabla de Exportación de Direcciones \t\t%08lx\n"
-#: peigen.c:1408 pepigen.c:1408
+#: peigen.c:1422 pepigen.c:1422
#, c-format
msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
msgstr "\tTabla [Nombre Apuntador/Ordinal]\t%08lx\n"
-#: peigen.c:1411 pepigen.c:1411
+#: peigen.c:1425 pepigen.c:1425
msgid "Table Addresses\n"
msgstr "Direcciones de la Tabla\n"
-#: peigen.c:1414 pepigen.c:1414
+#: peigen.c:1428 pepigen.c:1428
msgid "\tExport Address Table \t\t"
msgstr "\tTabla de Exportación de Direcciones \t\t"
-#: peigen.c:1419 pepigen.c:1419
+#: peigen.c:1433 pepigen.c:1433
msgid "\tName Pointer Table \t\t"
msgstr "\tNombre de la Tabla de Apuntadores \t\t"
# continuar aqui
-#: peigen.c:1424 pepigen.c:1424
+#: peigen.c:1438 pepigen.c:1438
msgid "\tOrdinal Table \t\t\t"
msgstr "\tTabla Ordinal \t\t\t"
-#: peigen.c:1439 pepigen.c:1439
+#: peigen.c:1453 pepigen.c:1453
#, c-format
msgid ""
"\n"
"\n"
"Tabla de Exportación de Direcciones -- Base Ordinal %ld\n"
-#: peigen.c:1458 pepigen.c:1458
+#: peigen.c:1472 pepigen.c:1472
msgid "Forwarder RVA"
msgstr "RVA Adelantador"
-#: peigen.c:1469 pepigen.c:1469
+#: peigen.c:1483 pepigen.c:1483
msgid "Export RVA"
msgstr "RVA Exportador"
-#: peigen.c:1476 pepigen.c:1476
+#: peigen.c:1490 pepigen.c:1490
msgid ""
"\n"
"[Ordinal/Name Pointer] Table\n"
"\n"
"Tabla [Apuntador a Ordinal/Nombre]\n"
-#: peigen.c:1531 pepigen.c:1531
+#: peigen.c:1545 pepigen.c:1545
#, c-format
msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
msgstr "Aviso, el tamaño de la sección .pdata (%ld) no es un múltiplo de %d\n"
-#: peigen.c:1535 pepigen.c:1535
+#: peigen.c:1549 pepigen.c:1549
msgid ""
"\n"
"The Function Table (interpreted .pdata section contents)\n"
msgstr ""
"\n"
-"La Tabla de Funciones (se interpretaron los contenidos de la sección ."
-"pdata)\n"
+"La Tabla de Funciones (se interpretaron los contenidos de la sección .pdata)\n"
-#: peigen.c:1538 pepigen.c:1538
+#: peigen.c:1552 pepigen.c:1552
msgid " vma:\t\t\tBegin Address End Address Unwind Info\n"
msgstr " vma:\t\t\tDirección Inicio Dirección Fin Información Desenvuelta\n"
-#: peigen.c:1540 pepigen.c:1540
-#, fuzzy
+#: peigen.c:1554 pepigen.c:1554
msgid ""
" vma:\t\tBegin End EH EH PrologEnd Exception\n"
" \t\tAddress Address Handler Data Address Mask\n"
-msgstr " vma:\t\tInicio Fin EH EH FinPrólogo Excepción\n"
+msgstr ""
+" vma:\t\tInicio Fin EH EH FinPrólogo Excepción\n"
+" \t\tDirecc Direcc Asa Datos Dirección Máscara\n"
-#: peigen.c:1610 pepigen.c:1610
+#: peigen.c:1624 pepigen.c:1624
msgid " Register save millicode"
msgstr " Registro para guardar milicódigo"
-#: peigen.c:1613 pepigen.c:1613
+#: peigen.c:1627 pepigen.c:1627
msgid " Register restore millicode"
msgstr " Registro para restaurar milicódigo"
-#: peigen.c:1616 pepigen.c:1616
+#: peigen.c:1630 pepigen.c:1630
msgid " Glue code sequence"
msgstr " Secuencia de código pegamento"
-#: peigen.c:1668 pepigen.c:1668
+#: peigen.c:1682 pepigen.c:1682
msgid ""
"\n"
"\n"
msgstr ""
"\n"
"\n"
-"Reubicaciones de Fichero Base PE (se interpretaron los contenidos de la "
-"sección .reloc)\n"
+"Reubicaciones de Fichero Base PE (se interpretaron los contenidos de la sección .reloc)\n"
-#: peigen.c:1698 pepigen.c:1698
+#: peigen.c:1712 pepigen.c:1712
#, c-format
msgid ""
"\n"
"Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
msgstr ""
"\n"
-"Dirección Virtual: %08lx Tamaño del trozo %ld (0x%lx) Número de composturas %"
-"ld\n"
+"Dirección Virtual: %08lx Tamaño del trozo %ld (0x%lx) Número de composturas %ld\n"
-#: peigen.c:1711 pepigen.c:1711
+#: peigen.c:1725 pepigen.c:1725
#, c-format
msgid "\treloc %4d offset %4x [%4lx] %s"
msgstr "\treubicación %4d desplazamiento %4x [%4lx] %s"
#. The MS dumpbin program reportedly ands with 0xff0f before
#. printing the characteristics field. Not sure why. No reason to
#. emulate it here.
-#: peigen.c:1751 pepigen.c:1751
+#: peigen.c:1765 pepigen.c:1765
#, c-format
msgid ""
"\n"
"\n"
"Características 0x%x\n"
+#~ msgid "\tThe Import Address Table (difference found)\n"
+#~ msgstr "\tLa Tabla de Importación de Direcciones (se encontró una diferencia)\n"
+
+#~ msgid "\t>>> Ran out of IAT members!\n"
+#~ msgstr "\t>>> ¡Se terminaron los miembros IAT!\n"
+
+#~ msgid "\tThe Import Address Table is identical\n"
+#~ msgstr "\tLa Tabla de Importación de Direcciones es idéntica\n"
+
#~ msgid "GP relative relocation when GP not defined"
#~ msgstr "reubicación GP relativa cuando GP no estaba definido"
+#~ msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers"
+#~ msgstr "%s: ERROR: pasan números de coma flotante en registros de coma flotante mientras que el objetivo %s usa registros enteros"
+
+#~ msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers"
+#~ msgstr "%s: ERROR: pasan números de coma flotante en registros enteros mientras que el objetivo %s usa registros de coma flotante"
+
#~ msgid "Warning: input file %s supports interworking, whereas %s does not."
-#~ msgstr ""
-#~ "Aviso: el fichero de entrada %s soporta interoperabilidad, mientras que %"
-#~ "s no."
+#~ msgstr "Aviso: el fichero de entrada %s soporta interoperabilidad, mientras que %s no."
-#~ msgid ""
-#~ "Warning: input file %s does not support interworking, whereas %s does."
-#~ msgstr ""
-#~ "Aviso: el fichero de entrada %s no soporta interoperabilidad, mientras "
-#~ "que %s sí."
+#~ msgid "Warning: input file %s does not support interworking, whereas %s does."
+#~ msgstr "Aviso: el fichero de entrada %s no soporta interoperabilidad, mientras que %s sí."
# FIXME: Revisar en el código si son abreviaturas comunes, o corresponden a
# partes fijas dentro del programa. cfuga
#~ msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
#~ msgstr "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
-#~ msgid ""
-#~ "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x"
-#~ "%.8lx%s\n"
-#~ msgstr ""
-#~ "elf_symbol_from_bfd_symbol 0x%.8lx, nombre = %s, núm sim = %d, opciones = "
-#~ "0x%.8lx%s\n"
+#~ msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"
+#~ msgstr "elf_symbol_from_bfd_symbol 0x%.8lx, nombre = %s, núm sim = %d, opciones = 0x%.8lx%s\n"
-#~ msgid ""
-#~ "Warning: Not setting interwork flag of %s since it has already been "
-#~ "specified as non-interworking"
-#~ msgstr ""
-#~ "Aviso: No se activa la opción de interoperación de %s ya que ya había "
-#~ "sido especificada como no interoperable"
+#~ msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"
+#~ msgstr "Aviso: No se activa la opción de interoperación de %s ya que ya había sido especificada como no interoperable"
#~ msgid "Warning: Clearing the interwork flag of %s due to outside request"
-#~ msgstr ""
-#~ "Aviso: Limpiando la opción de interoperación de %s debido a una petición "
-#~ "externa"
+#~ msgstr "Aviso: Limpiando la opción de interoperación de %s debido a una petición externa"
+
+#~ msgid " [APCS-26]"
+#~ msgstr " [APCS-26]"
+
+#~ msgid " [APCS-32]"
+#~ msgstr " [APCS-32]"
#~ msgid "(unknown)"
#~ msgstr "(desconocido)"
#~ msgid " \t\tAddress Address Handler Data Address Mask\n"
#~ msgstr " \t\tDirección Dirección Manejador Datos Dirección Máscara\n"
-#~ msgid "float"
-#~ msgstr "coma flotante"
-
#~ msgid "integer"
#~ msgstr "entero"
#~ msgstr "%s(%s+0x%lx): no se puede encontrar la entrada de cabo %s"
#~ msgid "%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections"
-#~ msgstr ""
-#~ "%s(%s+0x%lx): no se puede reubicar %s, recompile con -ffuncion-sections"
-
-#~ msgid ""
-#~ "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section "
-#~ "= 0x%.8lx\n"
-#~ msgstr ""
-#~ "creando el símbolo de sección, nombre = %s, valor = 0x%.8lx, índice = %d, "
-#~ "sección 0x%.8lx\n"
+#~ msgstr "%s(%s+0x%lx): no se puede reubicar %s, recompile con -ffuncion-sections"
+
+#~ msgid "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n"
+#~ msgstr "creando el símbolo de sección, nombre = %s, valor = 0x%.8lx, índice = %d, sección 0x%.8lx\n"
#~ msgid " whereas segment starts at 0x%x"
#~ msgstr " mientras que el segmento inicia en 0x%x"
# Messages français pour GNU concernant bfd.
-# Copyright (C) 1996 Free Software Foundation, Inc.
-# Michel Robitaille <robitail@IRO.UMontreal.CA>, 1996.
+# Copyright © 1996 Free Software Foundation, Inc.
+# Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996.
#
msgid ""
msgstr ""
-"Project-Id-Version: GNU bfd 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 12:55+0000\n"
-"PO-Revision-Date: 2002-03-17 20:00-0500\n"
+"Project-Id-Version: GNU bfd 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-24 08:00-0500\n"
"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
"Language-Team: French <traduc@traduc.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: aout-adobe.c:196
+#: aout-adobe.c:197
#, c-format
msgid "%s: Unknown section type in a.out.adobe file: %x\n"
msgstr "%s: type de section inconnu dans le fichier a.out.adobe: %x\n"
msgid "*unknown*"
msgstr "*inconnu*"
-#: aoutx.h:3735
+#: aoutx.h:3732
#, c-format
msgid "%s: relocateable link from %s to %s not supported"
msgstr "%s: relocalisation de liens de %s vers %s n'est pas supporté"
msgid "Writing updated armap timestamp"
msgstr "Écriture du cachet date-heure armap mise à jour"
-#: bfd.c:281
+#: bfd.c:274
msgid "No error"
msgstr "Pas d'erreur"
-#: bfd.c:282
+#: bfd.c:275
msgid "System call error"
msgstr "Erreur d'appel système"
-#: bfd.c:283
+#: bfd.c:276
msgid "Invalid bfd target"
msgstr "cible bfd invalide"
-#: bfd.c:284
+#: bfd.c:277
msgid "File in wrong format"
msgstr "Fichier dans un mauvais format"
-#: bfd.c:285
+#: bfd.c:278
msgid "Archive object file in wrong format"
msgstr "Fichier objet d'archive dans un mauvais format"
-#: bfd.c:286
+#: bfd.c:279
msgid "Invalid operation"
msgstr "Opération invalide"
-#: bfd.c:287
+#: bfd.c:280
msgid "Memory exhausted"
msgstr "Mémoire épuisée"
-#: bfd.c:288
+#: bfd.c:281
msgid "No symbols"
msgstr "Aucun symbole"
-#: bfd.c:289
+#: bfd.c:282
msgid "Archive has no index; run ranlib to add one"
msgstr "L'archive n'a pas d'index; exécuter ranlib pour en ajouter un"
-#: bfd.c:290
+#: bfd.c:283
msgid "No more archived files"
msgstr "Aucun autre fichier d'archive"
-#: bfd.c:291
+#: bfd.c:284
msgid "Malformed archive"
msgstr "Archive mal formé"
-#: bfd.c:292
+#: bfd.c:285
msgid "File format not recognized"
msgstr "Format de fichier non reconnu"
-#: bfd.c:293
+#: bfd.c:286
msgid "File format is ambiguous"
msgstr "Format de fichier ambiguë"
-#: bfd.c:294
+#: bfd.c:287
msgid "Section has no contents"
msgstr "Section sans contenu"
-#: bfd.c:295
+#: bfd.c:288
msgid "Nonrepresentable section on output"
msgstr "Section non-représentable pour la sortie"
-#: bfd.c:296
+#: bfd.c:289
msgid "Symbol needs debug section which does not exist"
msgstr "Symboles ont besoin de la section de débug qui est inexistente"
-#: bfd.c:297
+#: bfd.c:290
msgid "Bad value"
msgstr "Mauvaise valeur"
-#: bfd.c:298
+#: bfd.c:291
msgid "File truncated"
msgstr "Fichier tronqué"
-#: bfd.c:299
+#: bfd.c:292
msgid "File too big"
msgstr "Fichier trop gros"
-#: bfd.c:300
+#: bfd.c:293
msgid "#<Invalid error code>"
msgstr "#<Code d'erreur invalide>"
-#: bfd.c:707
+#: bfd.c:700
#, c-format
msgid "BFD %s assertion fail %s:%d"
msgstr "BFD assertion %s a échoué %s:%d"
-#: bfd.c:726
+#: bfd.c:719
#, c-format
msgid "BFD %s internal error, aborting at %s line %d in %s\n"
msgstr "BFD erreur interne %s, abandon à %s, ligne %d dans %s\n"
-#: bfd.c:730
+#: bfd.c:723
#, c-format
-msgid "BFD %sinternal error, aborting at %s line %d\n"
+msgid "BFD %s internal error, aborting at %s line %d\n"
msgstr "BFD erreur interne %s, abandon à %s, ligne %d\n"
-#: bfd.c:732
+#: bfd.c:725
msgid "Please report this bug.\n"
msgstr "SVP rapporter cette anomalie.\n"
msgid "Missing IHIHALF"
msgstr "IHIHALF manquant"
-#: coff-a29k.c:212
+#: coff-a29k.c:212 coff-or32.c:229
msgid "Unrecognized reloc"
msgstr "Relocalisation non reconnue"
msgid "missing IHIHALF reloc"
msgstr "IHIHALF de relocalisation manquant"
-#: coff-alpha.c:881 coff-alpha.c:918
+#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
msgid "GP relative relocation used when GP not defined"
msgstr "Relocalisation relative GP utilisé alors que GP n'est pas défini"
msgid "using multiple gp values"
msgstr "utilisation de valeurs multiples gp"
-#: coff-alpha.c:1989 coff-mips.c:1433
-msgid "GP relative relocation when GP not defined"
-msgstr "GP relocalisation relative alors que GP n'est pas défini"
-
-#: coff-arm.c:1051 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:285
#, c-format
msgid "%s: unable to find THUMB glue '%s' for `%s'"
msgstr "%s: incapable de repérer le REPÈRE de liant « %s » pour « %s »"
-#: coff-arm.c:1080 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:320
#, c-format
msgid "%s: unable to find ARM glue '%s' for `%s'"
msgstr "%s: incapable de repérer le liant ARM « %s » pour « %s »"
-#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990
+#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
#, c-format
msgid "%s(%s): warning: interworking not enabled."
msgstr "%s(%s): AVERTISSEMENT: l'inter-réseautage n'est pas permis."
-#: coff-arm.c:1379 elf32-arm.h:993
+#: coff-arm.c:1395 elf32-arm.h:994
#, c-format
msgid " first occurrence: %s: arm call to thumb"
msgstr " première occurrence: %s: appel arm de repérage"
-#: coff-arm.c:1474 elf32-arm.h:889
+#: coff-arm.c:1490 elf32-arm.h:890
#, c-format
msgid " first occurrence: %s: thumb call to arm"
msgstr " première occurrence: %s: appel de repérage à ARM"
-#: coff-arm.c:1477
+#: coff-arm.c:1493
msgid " consider relinking with --support-old-code enabled"
msgstr " considérer de rafaire les liens avec --support-old-code enabled"
-#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017
+#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
#, c-format
msgid "%s: bad reloc address 0x%lx in section `%s'"
msgstr "%s: mauvaise adresse de relocalisation 0x%lx dans la section « %s »"
-#: coff-arm.c:2107
+#: coff-arm.c:2127
#, c-format
msgid "%s: illegal symbol index in reloc: %d"
msgstr "%s: symbole index illégal dans la relocalisation: %d"
-#: coff-arm.c:2235
+#: coff-arm.c:2255
#, c-format
-msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"
-msgstr "%s: ERREUR: compilé pour APCS-%d alors que la cible %s utilise APCS-%d"
+msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
+msgstr "Erreur: %s compilé pour APCS-%d alors que %s a été compilé pour APCS-%d"
-#: coff-arm.c:2250
+#: coff-arm.c:2270 elf32-arm.h:2297
#, c-format
-msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers"
-msgstr "%s: ERREUR: passage de valeurs en virgule flottante dans des registreen virgule flottance alors que la cible %s utilise des registres de valeursentières"
+msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
+msgstr "Erreur: %s passage de valeurs en virgule flottante dans les registres FP alors que %s les passe dans les registres entiers"
-#: coff-arm.c:2253
+#: coff-arm.c:2273 elf32-arm.h:2302
#, c-format
-msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers"
-msgstr "%s: ERREUR: passage de valeurs en virgule flottante dans des registreen valeur entière alors que la cible %s utilise des registres de valeursen virgule flottante"
+msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
+msgstr "Erreur: %s passage de valeurs en virgule flottante dans les registres entiers alors que %s les passe dans les registres FP"
-#: coff-arm.c:2268
+#: coff-arm.c:2288
#, c-format
-msgid "%s: ERROR: compiled as position independent code, whereas target %s is absolute position"
-msgstr "%s: ERREUR: compilé en code indépendant de la position, alors que la cible %s esten position absolue"
+msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
+msgstr "ERREUR: %s compilé avec du code à position indépendante alors que la cible %s est à position absolue"
-#: coff-arm.c:2271
+#: coff-arm.c:2291
#, c-format
-msgid "%s: ERROR: compiled as absolute position code, whereas target %s is position independent"
-msgstr "%s: ERREUR: compilé en code à position abolsu, alors que la cible %s estindépendant de la position"
+msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
+msgstr "ERREUR: %s compilé avec du code à position absolu alors que la cible %s est à position indépendante"
-#: coff-arm.c:2300
+#: coff-arm.c:2320 elf32-arm.h:2358
#, c-format
-msgid "Warning: input file %s supports interworking, whereas %s does not."
-msgstr "AVERTISSEMENT: file d'entrée %s supporte l'inter-réseautage, contrairement à %s."
+msgid "Warning: %s supports interworking, whereas %s does not"
+msgstr "AVERTISSEMENT: %s supporte l'inter-réseautage, contrairement à %s."
-#: coff-arm.c:2303
+#: coff-arm.c:2323 elf32-arm.h:2365
#, c-format
-msgid "Warning: input file %s does not support interworking, whereas %s does."
-msgstr "AVERTISSEMENT: fichier d'entrée %s ne supporte pas l'inter-réseautage, contrairement à %s."
+msgid "Warning: %s does not support interworking, whereas %s does"
+msgstr "AVERTISSEMENT: %s ne supporte pas l'inter-réseautage, contrairement à %s."
-#: coff-arm.c:2330
+#: coff-arm.c:2350
#, c-format
msgid "private flags = %x:"
msgstr "fanions privés = %x"
-#: coff-arm.c:2338 elf32-arm.h:2408
+#: coff-arm.c:2358 elf32-arm.h:2418
msgid " [floats passed in float registers]"
msgstr " [valeurs en virgule flottante passées dans des registres de valeurs en virgule flottante]"
-#: coff-arm.c:2340
+#: coff-arm.c:2360
msgid " [floats passed in integer registers]"
msgstr " [valeurs en virgule flottante passées dans des registres de valeurs entières]"
-#: coff-arm.c:2343 elf32-arm.h:2411
+#: coff-arm.c:2363 elf32-arm.h:2421
msgid " [position independent]"
msgstr " [position indépendante]"
-#: coff-arm.c:2345
+#: coff-arm.c:2365
msgid " [absolute position]"
msgstr " [position absolue]"
-#: coff-arm.c:2349
+#: coff-arm.c:2369
msgid " [interworking flag not initialised]"
msgstr " [fanion d'inter-réseautage n'a pas été initialisé]"
-#: coff-arm.c:2351
+#: coff-arm.c:2371
msgid " [interworking supported]"
msgstr " [inter-réseautage supporté]"
-#: coff-arm.c:2353
+#: coff-arm.c:2373
msgid " [interworking not supported]"
msgstr " [inter-réseautage non supporté]"
-#: coff-arm.c:2401
+#: coff-arm.c:2421 elf32-arm.h:2124
#, c-format
-msgid "Warning: Not setting interworking flag of %s, since it has already been specified as non-interworking"
-msgstr "AVERTISSEMENT: pas d'initialisation du fanion d'inter-réseautage %s, puisqu'il a déjà été spécifié comme sans inter-réseautage"
+msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
+msgstr "AVERTISSEMENT: pas d'initialisation du fanion d'inter-réseautage %s puisqu'il a déjà été spécifié sans inter-réseautage"
-#: coff-arm.c:2405
+#: coff-arm.c:2425 elf32-arm.h:2128
#, c-format
msgid "Warning: Clearing the interworking flag of %s due to outside request"
msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison d'une requête externe"
msgid "uncertain calling convention for non-COFF symbol"
msgstr "convention d'appel incertaine pour un symbole non COFF"
-#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2212
+#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
msgid "unsupported reloc type"
msgstr "type de relocalisation non supporté"
-#: coff-mips.c:875 elf32-mips.c:1987 elf64-mips.c:1739
+#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
msgid "GP relative relocation when _gp not defined"
msgstr "relocalisation relative GP sans que _gp ne soit défini"
#. No other sections should appear in -membedded-pic
#. code.
-#: coff-mips.c:2468
+#: coff-mips.c:2466
msgid "reloc against unsupported section"
msgstr "relocalisation vers une section non supportée"
-#: coff-mips.c:2476
+#: coff-mips.c:2474
msgid "reloc not properly aligned"
msgstr "relocalisation n'est pas alignée correctement"
-#: coff-rs6000.c:2710 coff64-rs6000.c:1164
+#: coff-rs6000.c:2766
#, c-format
msgid "%s: unsupported relocation type 0x%02x"
msgstr "%s: type de relocalisation non supporté 0x%02x"
-#: coff-rs6000.c:2756 coff64-rs6000.c:1210
+#: coff-rs6000.c:2859
#, c-format
msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
msgstr "%s: table des matières des relocalisation à 0x%x pour les symboles « %s » sans aucune entrée"
-#: coff-rs6000.c:3006 coff64-rs6000.c:2060
+#: coff-rs6000.c:3590 coff64-rs6000.c:2091
#, c-format
msgid "%s: symbol `%s' has unrecognized smclas %d"
msgstr "%s: symbole « %s » a une classe smclas non reconnue %d"
msgid "Unrecognized reloc type 0x%x"
msgstr "Type de relocalisation non reconnu 0x%x"
-#: coff-tic54x.c:390 coffcode.h:4847
+#: coff-tic54x.c:390 coffcode.h:4974
#, c-format
msgid "%s: warning: illegal symbol index %ld in relocs"
msgstr "%s: AVERTISSEMENT: symbole index illégal %ld dans les relocalisations"
msgid "ignoring reloc %s\n"
msgstr "relocalisation de %s ignorée\n"
-#: coffcode.h:1081
+#: coffcode.h:1086
#, c-format
msgid "%s (%s): Section flag %s (0x%x) ignored"
msgstr "%s (%s): fanion de section %s (0x%x) ignoré"
-#: coffcode.h:2125
+#: coffcode.h:2143
#, c-format
msgid "Unrecognized TI COFF target id '0x%x'"
msgstr "cible TI COFF non reconnue identificateur '0x%x'"
-#: coffcode.h:4236
+#: coffcode.h:4365
#, c-format
msgid "%s: warning: illegal symbol index %ld in line numbers"
msgstr "%s: AVERTISSEMENT: symbole d'index illégal %ld dans le numéro de ligne"
-#: coffcode.h:4250
+#: coffcode.h:4379
#, c-format
msgid "%s: warning: duplicate line number information for `%s'"
msgstr "%s: AVERTISSEMENT: information de numéro de ligne dédoublée pour « %s »"
-#: coffcode.h:4609
+#: coffcode.h:4736
#, c-format
msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
msgstr "%s: classe de stockage non reconnue %d pour %s symbole « %s »"
-#: coffcode.h:4740
+#: coffcode.h:4867
#, c-format
msgid "warning: %s: local symbol `%s' has no section"
msgstr "AVERTISSEMENT: %s: symbole local « %s » n'a pas de section"
-#: coffcode.h:4885
+#: coffcode.h:5012
#, c-format
msgid "%s: illegal relocation type %d at address 0x%lx"
msgstr "%s: type de relocalisation illégal %d à l'adresse 0x%lx"
msgid "%s: bad string table size %lu"
msgstr "%s: chaîne erronée de la taille de table %lu"
-#: coffgen.c:2138
-#, c-format
-msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
-msgstr "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld prochain %ld"
-
-#: cofflink.c:536 elflink.h:1967
+#: cofflink.c:534 elflink.h:1912
#, c-format
msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
msgstr "AVERTISSEMENT: type de symbole « %s » a changé de %d à %d dans %s"
-#: cofflink.c:2317
+#: cofflink.c:2321
#, c-format
msgid "%s: relocs in section `%s', but it has no contents"
msgstr "%s: relocalisations dans la section « %s », mais n'a aucun contenu"
-#: cofflink.c:2653 coffswap.h:889
+#: cofflink.c:2664 coffswap.h:877
#, c-format
msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
msgstr "%s: %s: débordement de relocalisation: 0x%lx > 0xffff"
-#: cofflink.c:2662 coffswap.h:876
+#: cofflink.c:2673 coffswap.h:864
#, c-format
msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
msgstr "%s: AVERTISSEMENT: %s: débordement du compteur de numéro de ligne: 0x%lx > 0xffff"
-#: dwarf2.c:381
+#: dwarf2.c:382
msgid "Dwarf Error: Can't find .debug_str section."
msgstr "Erreur DWARF: ne peut repérer la section .debug_str"
-#: dwarf2.c:398
+#: dwarf2.c:399
#, c-format
-msgid "Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str size (%u)."
-msgstr "Erreur DWARF: décalage DW_FORM_strp (%u) est > ou = à la taille de .debug_str (%u)."
+msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
+msgstr "Erreur DWARF: décalage DW_FORM_strp (%lu) est >= à la taille de .debug_str (%lu)."
-#: dwarf2.c:542
+#: dwarf2.c:543
msgid "Dwarf Error: Can't find .debug_abbrev section."
msgstr "Erreur DWARF: ne peut repérer la section .debug_abbrev"
-#: dwarf2.c:559
+#: dwarf2.c:560
#, c-format
-msgid "Dwarf Error: Abbrev offset (%u) greater than or equal to abbrev size (%u)."
-msgstr "Erreur DWARF: décalage Abbrev (%u) est > ou = à la taille abbrev (%u)."
+msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
+msgstr "Erreur DWARF: décalage Abbrev (%lu) est >= à la taille .debug_abbrev (%lu)."
-#: dwarf2.c:756
+#: dwarf2.c:757
#, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %d."
-msgstr "Erreur DWARF: valeur de FORME invalide ou mal traitée: %d"
+msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
+msgstr "Erreur DWARF: valeur de FORME invalide ou mal traitée: %u"
-#: dwarf2.c:843
+#: dwarf2.c:852
msgid "Dwarf Error: mangled line number section (bad file number)."
msgstr "Erreur DWARF: numéro mutilé de ligne de section (mauvais no. de fichier)"
-#: dwarf2.c:929
+#: dwarf2.c:938
msgid "Dwarf Error: Can't find .debug_line section."
msgstr "Erreur DWARF: ne peut repérer la section .debug_line"
-#: dwarf2.c:952
+#: dwarf2.c:961
#, c-format
-msgid "Dwarf Error: Line offset (%u) greater than or equal to line size (%u)."
-msgstr "Erreur DWARF: décalage de ligne (%u) est > ou = à la taille de ligne (%u)"
+msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
+msgstr "Erreur DWARF: décalage de ligne (%lu) est >= à la taille de .debug_line (%lu)"
-#: dwarf2.c:1143
+#: dwarf2.c:1159
msgid "Dwarf Error: mangled line number section."
msgstr "Erreur DWARF: numéro mutilé de ligne de section"
-#: dwarf2.c:1318 dwarf2.c:1532
+#: dwarf2.c:1355 dwarf2.c:1566
#, c-format
-msgid "Dwarf Error: Could not find abbrev number %d."
-msgstr "Erreur DWARF: ne peut repérer le numéro abrégé %d"
+msgid "Dwarf Error: Could not find abbrev number %u."
+msgstr "Erreur DWARF: ne peut repérer le numéro abrégé %u"
-#: dwarf2.c:1493
+#: dwarf2.c:1527
#, c-format
-msgid "Dwarf Error: found dwarf version '%hu', this reader only handles version 2 information."
-msgstr "Erreur DWARF: version DWARF retrouvée « %hu », ce lecteur ne supporte que les informations de la version 2."
+msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
+msgstr "Erreur DWARF: version DWARF retrouvée « %u », ce lecteur ne supporte que les informations de la version 2."
-#: dwarf2.c:1500
+#: dwarf2.c:1534
#, c-format
msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
msgstr "Erreur DWARF: taille d'adresse obtenue « %u », ce lecteur ne peut traiter des tailles plus grandes que « %u »."
-#: dwarf2.c:1523
+#: dwarf2.c:1557
#, c-format
-msgid "Dwarf Error: Bad abbrev number: %d."
-msgstr "Erreur DWARF: mauvais numéro abrégé: %d"
+msgid "Dwarf Error: Bad abbrev number: %u."
+msgstr "Erreur DWARF: mauvais numéro abrégé: %u"
-#: ecoff.c:1328
+#: ecoff.c:1318
#, c-format
msgid "Unknown basic type %d"
msgstr "type de base inconnu %d"
-#: ecoff.c:1597
+#: ecoff.c:1578
#, c-format
msgid ""
"\n"
"\n"
" Dernier+1 symbole: %ld"
-#: ecoff.c:1604 ecoff.c:1607
+#: ecoff.c:1585 ecoff.c:1588
#, c-format
msgid ""
"\n"
"\n"
" Premier symbole: %ld"
-#: ecoff.c:1619
+#: ecoff.c:1600
#, c-format
msgid ""
"\n"
"\n"
" Dernier+1 symbole: %-7ld Type: %s"
-#: ecoff.c:1626
+#: ecoff.c:1607
#, c-format
msgid ""
"\n"
"\n"
" Symbole local: %ld"
-#: ecoff.c:1634
+#: ecoff.c:1615
#, c-format
msgid ""
"\n"
"\n"
" struct; Symbole Fin+1: %ld"
-#: ecoff.c:1639
+#: ecoff.c:1620
#, c-format
msgid ""
"\n"
"\n"
" union; Dernier+1 symbole: %ld"
-#: ecoff.c:1644
+#: ecoff.c:1625
#, c-format
msgid ""
"\n"
"\n"
" enum; Dernier+1 symbol: %ld"
-#: ecoff.c:1650
+#: ecoff.c:1631
#, c-format
msgid ""
"\n"
"\n"
" Type: %s"
-#: elf-hppa.h:1366 elf-hppa.h:1399 elf32-ppc.c:3062 elf32-sh.c:3201 elf64-x86-64.c:1275
+#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
+#: elf64-sh64.c:1659
#, c-format
msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
msgstr "%s: AVERTISSEMENT: relocalisation sans solution vers le symbole « %s » de la section %s"
-#: elf-m10200.c:463 elf-m10300.c:673 elf32-arm.h:2074 elf32-avr.c:835 elf32-cris.c:1392 elf32-d10v.c:482 elf32-fr30.c:653 elf32-h8300.c:547 elf32-i860.c:1048 elf32-m32r.c:1281 elf32-openrisc.c:455 elf32-v850.c:1691 elf64-mmix.c:1164
+#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
+#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
+#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
+#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
msgid "internal error: out of range error"
msgstr "erreur interne: hors gamme"
-#: elf-m10200.c:467 elf-m10300.c:677 elf32-arm.h:2078 elf32-avr.c:839 elf32-cris.c:1396 elf32-d10v.c:486 elf32-fr30.c:657 elf32-h8300.c:551 elf32-i860.c:1052 elf32-m32r.c:1285 elf32-mips.c:7565 elf32-openrisc.c:459 elf32-v850.c:1695 elf64-mips.c:4464 elf64-mmix.c:1168
+#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
+#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
+#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
+#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
msgid "internal error: unsupported relocation error"
msgstr "erreur interne: erreur de relocalisation non supportée"
-#: elf-m10200.c:471 elf-m10300.c:681 elf32-arm.h:2082 elf32-d10v.c:490 elf32-h8300.c:555 elf32-m32r.c:1289
+#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
+#: elf32-h8300.c:556 elf32-m32r.c:1286
msgid "internal error: dangerous error"
msgstr "erreur interne: erreur dangereuse"
-#: elf-m10200.c:475 elf-m10300.c:685 elf32-arm.h:2086 elf32-avr.c:847 elf32-cris.c:1404 elf32-d10v.c:494 elf32-fr30.c:665 elf32-h8300.c:559 elf32-i860.c:1060 elf32-m32r.c:1293 elf32-openrisc.c:467 elf32-v850.c:1715 elf64-mmix.c:1176
+#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
+#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
+#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
+#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
msgid "internal error: unknown error"
msgstr "erreur interne: erreur inconnue"
-#: elf.c:345
+#: elf.c:343
#, c-format
msgid "%s: invalid string offset %u >= %lu for section `%s'"
msgstr "%s: chaîne de décalage invalide %u >= %lu pour la section « %s »"
-#: elf.c:450
+#: elf.c:589
#, c-format
msgid "%s: invalid SHT_GROUP entry"
msgstr "%s: entrée SHT_GROUP invalide"
-#: elf.c:531
+#: elf.c:660
#, c-format
msgid "%s: no group info for section %s"
msgstr "%s: aucune info de groupe pour la section %s"
-#: elf.c:842
+#: elf.c:1023
msgid ""
"\n"
"Program Header:\n"
"\n"
"En-tête de programme:\n"
-#: elf.c:891
+#: elf.c:1073
msgid ""
"\n"
"Dynamic Section:\n"
"\n"
"Section dynamique:\n"
-#: elf.c:1020
+#: elf.c:1202
msgid ""
"\n"
"Version definitions:\n"
"\n"
"Définitions des versions:\n"
-#: elf.c:1043
+#: elf.c:1225
msgid ""
"\n"
"Version References:\n"
"\n"
"Références de version:\n"
-#: elf.c:1048
+#: elf.c:1230
#, c-format
msgid " required from %s:\n"
msgstr " requis par %s:\n"
-#: elf.c:1675
+#: elf.c:1902
#, c-format
msgid "%s: invalid link %lu for reloc section %s (index %u)"
msgstr "%s: lien invalide %lu pour la section de relocalisation %s (index %u)"
-#: elf.c:3289
+#: elf.c:3603
#, c-format
msgid "%s: Not enough room for program headers (allocated %u, need %u)"
msgstr "%s: pas suffisamment d'espace pour les en-têtes du programme (alloué %u, besoin de %u)"
-#: elf.c:3393
+#: elf.c:3708
#, c-format
msgid "%s: Not enough room for program headers, try linking with -N"
msgstr "%s: pas suffisamment d'espace pour les en-têtes du programme, essayer l'option -N"
-#: elf.c:3518
+#: elf.c:3833
#, c-format
msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
msgstr "Erreur: première section dans le segment (%s) débute à 0x%x alors que le segment débute à 0x%x"
-#: elf.c:3804
+#: elf.c:4148
#, c-format
msgid "%s: warning: allocated section `%s' not in segment"
msgstr "%s: AVERTISSEMENT: section allouée « %s » n'est pas dans le segment"
-#: elf.c:4138
+#: elf.c:4472
#, c-format
msgid "%s: symbol `%s' required but not present"
msgstr "%s: symbole « %s » requis mais absent"
-#: elf.c:4147
-#, c-format
-msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"
-msgstr "elf_symbol_from_bfd_symbol 0x%.8lx, nom = %s, no. de symbole = %d, fanions = 0x%.8lx%s\n"
-
-#: elf.c:4391
+#: elf.c:4749
#, c-format
-msgid "%s: warning: Empty loadable segment detected\n"
-msgstr "%s: AVERTISSEMENT: segment chargeable vide détecté\n"
+msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr "%s: AVERTISSEMENT: segment chargeable vide détecté, est-ce intentionnel ?\n"
-#: elf.c:5804
+#: elf.c:6193
#, c-format
msgid "%s: unsupported relocation type %s"
msgstr "%s: type de relocalisation non supporté %s"
-#: elf32-arm.h:1224
+#: elf32-arm.h:1221
#, c-format
msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
msgstr "%s: AVERTISSEMENT: instruction Arm BLX vise la fonction Arm « %s »."
-#: elf32-arm.h:1420
+#: elf32-arm.h:1417
#, c-format
msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
msgstr "%s: AVERTISSEMENT: instruction de repérage BLX vise la function de repérage « %s »."
-#: elf32-arm.h:1904 elf32-i386.c:1776 elf32-sh.c:3133
+#: elf32-arm.h:1914 elf32-sh.c:4125
#, c-format
msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
msgstr "%s(%s+0x%lx): %s relocation vers une section SEC_MERGE"
-#: elf32-arm.h:1998
+#: elf32-arm.h:2008
#, c-format
msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
msgstr "%s: AVERTISSEMENT: relocalisation sans solution %d vers le symbole « %s » de la section %s"
-#: elf32-arm.h:2114
-#, c-format
-msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"
-msgstr "AVERTISSEMENT: pas d'initialisation du fanion d'inter-réseautage %s alors qu'il a déjè été spécifié sans inter-réseautage"
-
-#: elf32-arm.h:2118
-#, c-format
-msgid "Warning: Clearing the interwork flag of %s due to outside request"
-msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison d'une requête externe"
-
-#: elf32-arm.h:2166
-#, c-format
-msgid "Warning: Clearing the interwork flag in %s because non-interworking code in %s has been linked with it"
-msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison du code sans inter-réseautage dans %s qui a été lié avec lui"
-
-#: elf32-arm.h:2261
-#, c-format
-msgid "Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"
-msgstr "Erreur: %s compilé pour une version EABI %d, alors que %s a été compilé pour la version %d"
-
-#: elf32-arm.h:2275
-#, c-format
-msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"
-msgstr "Erreur: %s compilé pour APCS-%d, alors que %s a été compilé pour APCS-%d"
-
-#: elf32-arm.h:2287
+#: elf32-arm.h:2176
#, c-format
-msgid "Error: %s passes floats in FP registers, whereas %s passes them in integer registers"
-msgstr "Erreur: %s passage de valeurs en virgule flottante dans les registres FP, alors que %s les passe dans les registres entiers"
+msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
+msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison du code sans inter-réseautage dans %s lié avec lui"
-#: elf32-arm.h:2292
+#: elf32-arm.h:2271
#, c-format
-msgid "Error: %s passes floats in integer registers, whereas %s passes them in FP registers"
-msgstr "Erreur: %s passage de valeurs en virgule flottante dans les registres entiers, alors que %s les passe dans les registres FP"
+msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
+msgstr "ERREUR: %s compilé pour une version EABI %d alors que %s a été compilé pour la version %d"
-#: elf32-arm.h:2303
+#: elf32-arm.h:2285
#, c-format
-msgid "Error: %s uses VFP instructions, whereas %s FPA instructions"
-msgstr "Erreur: %s utilise les instructions VFP, alors que %s utilise les instructions FPA"
+msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
+msgstr "ERREUR: %s compilé pour APCS-%d alors que la cible %s utilise APCS-%d"
-#: elf32-arm.h:2308
+#: elf32-arm.h:2313
#, c-format
-msgid "Error: %s uses FPA instructions, whereas %s VFP instructions"
-msgstr "Erreur: %s utilise les instructions FPA, alors que %s utilise les instructions VFP"
+msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
+msgstr "ERREUR: %s utilise les instructions VFP alors que %s utilise les instructions FPA"
-#: elf32-arm.h:2328
+#: elf32-arm.h:2318
#, c-format
-msgid "Error: %s uses software FP, whereas %s uses hardware FP"
-msgstr "Erreur: %s utilise le logiciel pour virgule flottante, alors que %s utilise le matériel pour virgule flottante"
+msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
+msgstr "ERREUR: %s utilise les instructions FPA alors que %s utilise les instructions VFP"
-#: elf32-arm.h:2333
+#: elf32-arm.h:2338
#, c-format
-msgid "Error: %s uses hardware FP, whereas %s uses software FP"
-msgstr "Erreur: %s utilise le matériel pour virgule flottante, alors que %s utilise le logiciel pour virgule flottante"
+msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
+msgstr "ERREUR: %s utilise le logiciel pour virgule flottante alors que %s utilise le matériel pour virgule flottante"
-#: elf32-arm.h:2348
+#: elf32-arm.h:2343
#, c-format
-msgid "Warning: %s supports interworking, whereas %s does not"
-msgstr "AVERTISSEMENT: %s supporte l'inter-réseautage, contrairement à %s."
-
-#: elf32-arm.h:2355
-#, c-format
-msgid "Warning: %s does not support interworking, whereas %s does"
-msgstr "AVERTISSEMENT: %s ne supporte pas l'inter-réseautage, contrairement à %s."
+msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
+msgstr "ERREUR: %s utilise le matériel pour virgule flottante alors que %s utilise le logiciel pour virgule flottante"
#. Ignore init flag - it may not be set, despite the flags field
#. containing valid data.
-#: elf32-arm.h:2386 elf32-cris.c:2970 elf32-m68k.c:410 elf32-mips.c:3232
+#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
+#: elfxx-mips.c:7756
#, c-format
msgid "private flags = %lx:"
msgstr "fanions privés = %lx"
-#: elf32-arm.h:2395
+#: elf32-arm.h:2405
msgid " [interworking enabled]"
msgstr " [inter-réseautage autorisé]"
-#: elf32-arm.h:2398
-msgid " [APCS-26]"
-msgstr " [APCS-26]"
-
-#: elf32-arm.h:2400
-msgid " [APCS-32]"
-msgstr " [APCS-32]"
-
-#: elf32-arm.h:2403
+#: elf32-arm.h:2413
msgid " [VFP float format]"
msgstr " [format flottant VFP]"
-#: elf32-arm.h:2405
+#: elf32-arm.h:2415
msgid " [FPA float format]"
msgstr " [format flottant FPA]"
-#: elf32-arm.h:2414
+#: elf32-arm.h:2424
msgid " [new ABI]"
msgstr " [nouvel ABI]"
-#: elf32-arm.h:2417
+#: elf32-arm.h:2427
msgid " [old ABI]"
msgstr " [ancien ABI]"
-#: elf32-arm.h:2420
+#: elf32-arm.h:2430
msgid " [software FP]"
msgstr " [virgule flottante logiciel]"
-#: elf32-arm.h:2428
+#: elf32-arm.h:2438
msgid " [Version1 EABI]"
msgstr " [Version 1 EABI]"
-#: elf32-arm.h:2431 elf32-arm.h:2442
+#: elf32-arm.h:2441 elf32-arm.h:2452
msgid " [sorted symbol table]"
msgstr " [table des symboles triés]"
-#: elf32-arm.h:2433 elf32-arm.h:2444
+#: elf32-arm.h:2443 elf32-arm.h:2454
msgid " [unsorted symbol table]"
msgstr " [table des symboles non triés]"
-#: elf32-arm.h:2439
+#: elf32-arm.h:2449
msgid " [Version2 EABI]"
msgstr " [Version2 EABI]"
-#: elf32-arm.h:2447
+#: elf32-arm.h:2457
msgid " [dynamic symbols use segment index]"
msgstr " [symboles dynamiques utilisent un index de segment]"
-#: elf32-arm.h:2450
+#: elf32-arm.h:2460
msgid " [mapping symbols precede others]"
msgstr " [mapping de symboles précèdes les autres]"
-#: elf32-arm.h:2457
+#: elf32-arm.h:2467
msgid " <EABI version unrecognised>"
msgstr " <Version EABI non reconnue>"
-#: elf32-arm.h:2464
+#: elf32-arm.h:2474
msgid " [relocatable executable]"
msgstr " [exécutables relocalisés]"
-#: elf32-arm.h:2467
+#: elf32-arm.h:2477
msgid " [has entry point]"
msgstr " [a des points d'entrées]"
-#: elf32-arm.h:2472
+#: elf32-arm.h:2482
msgid "<Unrecognised flag bits set>"
msgstr "<Bits de fanions non reconnus>"
-#: elf32-avr.c:843 elf32-cris.c:1400 elf32-fr30.c:661 elf32-i860.c:1056 elf32-openrisc.c:463 elf32-v850.c:1699 elf64-mmix.c:1172
+#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
+#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
+#: elf32-xstormy16.c:941 elf64-mmix.c:1310
msgid "internal error: dangerous relocation"
msgstr "erreur interne: relocalisation dangereuse"
msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
msgstr "%s: pas de relocalisation %s PLT ni GOT vers le symbole « %s » à partir de la section %s"
-#: elf32-cris.c:1015 elf32-cris.c:1142
+#: elf32-cris.c:1015 elf32-cris.c:1141
msgid "[whose name is lost]"
msgstr "[où le nom est perdu]"
-#: elf32-cris.c:1131
+#: elf32-cris.c:1130
#, c-format
msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
msgstr "%s: relocalisation %s sans zéro ajoute %d vers le symbole local à partir de la section %s"
-#: elf32-cris.c:1138
+#: elf32-cris.c:1137
#, c-format
msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
msgstr "%s: relocalisation %s sans zéro ajoute %d vers le symbole « %s » à partir de la section %s"
-#: elf32-cris.c:1156
+#: elf32-cris.c:1155
#, c-format
msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
msgstr "%s: relocalisation %s n'est pas permise pour le symbole global: « %s » de la section %s."
-#: elf32-cris.c:1275
+#: elf32-cris.c:1170
+#, c-format
+msgid "%s: relocation %s in section %s with no GOT created"
+msgstr "%s: relocalisation %s dans la section %s mais aucun GOT créé"
+
+#: elf32-cris.c:1288
#, c-format
msgid "%s: Internal inconsistency; no relocation section %s"
msgstr "%s: inconsistence interne; pas de section de relocalisation %s"
-#: elf32-cris.c:2508
+#: elf32-cris.c:2514
#, c-format
msgid ""
"%s, section %s:\n"
"%s, section %s:\n"
" relocalisation %s devrait être utilisée dans un objet partagé; recompiler avec -fPIC"
-#: elf32-cris.c:2973
+#: elf32-cris.c:2991
msgid " [symbols have a _ prefix]"
msgstr " [symboles sont préfixés par « _ »]"
-#: elf32-cris.c:3012
+#: elf32-cris.c:3030
#, c-format
msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
msgstr "%s: utilise _-prefixed symbols, mais avec écriture au fichier avec des symboles sans préfixes"
-#: elf32-cris.c:3013
+#: elf32-cris.c:3031
#, c-format
msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
msgstr "%s: utilise des symboles sans préfixes, mais avec écriture au fichier avec des symboles ayant des préfixes_-prefixed"
+#: elf32-frv.c:1217
+#, c-format
+msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr "%s: compilé avec %s et lié avec les modules qui utilisent de la relocalisation non PIC"
+
+#: elf32-frv.c:1267
+#, c-format
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr "%s: compilé avec %s et lié avec les modules compilés avec %s"
+
+#: elf32-frv.c:1279
+#, c-format
+msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: utilise différents champs e_flags (0x%lx) que les modules précédents (0x%lx)"
+
+#: elf32-frv.c:1315
+#, c-format
+msgid "private flags = 0x%lx:"
+msgstr "fanions privés = 0x%lx:"
+
#: elf32-gen.c:82 elf64-gen.c:82
#, c-format
msgid "%s: Relocations in generic ELF (EM: %d)"
msgstr "%s: relocalisation en format ELF générique (EM: %d)"
-#: elf32-hppa.c:646
+#: elf32-hppa.c:671 elf64-ppc.c:2323
#, c-format
msgid "%s: cannot create stub entry %s"
msgstr "%s: ne peut créer l'entrée du talon %s"
-#: elf32-hppa.c:937 elf32-hppa.c:3540
+#: elf32-hppa.c:956 elf32-hppa.c:3555
#, c-format
msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
msgstr "%s(%s+0x%lx): ne peut atteindre %s, recompiler avec -ffunction-sections"
-#: elf32-hppa.c:1312
+#: elf32-hppa.c:1338 elf64-x86-64.c:673
#, c-format
msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
msgstr "%s: relocalisation de %s ne peut être utilisée lors de la création d'un objet partagé; recompiler avec -fPIC"
-#: elf32-hppa.c:1332
+#: elf32-hppa.c:1358
#, c-format
msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
msgstr "%s: relocalisation %s ne doit pas être utilisée lors de la création d'un objet partagé; recompiler avec -fPIC"
-#: elf32-hppa.c:1525
+#: elf32-hppa.c:1551
#, c-format
msgid "Could not find relocation section for %s"
msgstr "Ne peut repérer la section de relocalisation pour %s"
-#: elf32-hppa.c:2862
+#: elf32-hppa.c:2855
#, c-format
msgid "%s: duplicate export stub %s"
msgstr "%s: talon d'exportation en double %s"
-#: elf32-hppa.c:3424
+#: elf32-hppa.c:3433
#, c-format
msgid "%s(%s+0x%lx): fixing %s"
msgstr "%s(%s+0x%lx): corrigeant %s"
-#: elf32-hppa.c:4064
+#: elf32-hppa.c:4080
#, c-format
msgid "%s(%s+0x%lx): cannot handle %s for %s"
msgstr "%s(%s+0x%lx): ne traiter %s pour %s"
-#: elf32-hppa.c:4403
+#: elf32-hppa.c:4393
msgid ".got section not immediately after .plt section"
msgstr "section .got pas immédiatement après la section .plt"
-#: elf32-i386.c:298
+#: elf32-i386.c:379
#, c-format
msgid "%s: invalid relocation type %d"
msgstr "%s: type de relocalisation invalide %d"
-#: elf32-i386.c:718 elf32-s390.c:636 elf64-s390.c:595
+#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
#, c-format
msgid "%s: bad symbol index: %d"
msgstr "%s: symbole index erroné: %d"
-#: elf32-i386.c:863 elf32-s390.c:790 elf64-ppc.c:2085 elf64-s390.c:759
+#: elf32-i386.c:948
+#, c-format
+msgid "%s: `%s' accessed both as normal and thread local symbol"
+msgstr "%s: « %s » symbole local accéder à la fois comme normal et avec thread"
+
+#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
+#: elf64-x86-64.c:761
#, c-format
msgid "%s: bad relocation section name `%s'"
msgstr "%s: nom de section de relocalisation erroné « %s »"
-#: elf32-i386.c:2067 elf32-s390.c:1949 elf64-ppc.c:3908 elf64-s390.c:1953
+#: elf32-i386.c:1159 elf64-alpha.c:4768
+#, c-format
+msgid "%s: TLS local exec code cannot be linked into shared objects"
+msgstr "%s: code exécutable local TLS ne peut être lié en objets partagés"
+
+#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
+#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
#, c-format
msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
msgstr "%s(%s+0x%lx): relocalisation sans solution vers le symbole « %s »"
-#: elf32-i386.c:2105 elf32-s390.c:1987 elf64-s390.c:1991
+#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
+#: elf64-x86-64.c:1986
#, c-format
msgid "%s(%s+0x%lx): reloc against `%s': error %d"
msgstr "%s(%s+0x%lx): relocalisation vers « %s »: erreur %d"
msgid "SDA relocation when _SDA_BASE_ not defined"
msgstr "relocalisation SDA alors que _SDA_BASE_ n'est pas définie"
-#: elf32-ia64.c:3538 elf32-m32r.c:1008 elf32-ppc.c:2930 elf64-ia64.c:3538
+#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
+#: elf64-alpha.c:4313 elf64-ia64.c:3687
#, c-format
msgid "%s: unknown relocation type %d"
msgstr "%s: type de relocalisation inconnu %d"
-#: elf32-m32r.c:1224
+#: elf32-m32r.c:1221
#, c-format
msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
msgstr "%s: la cible (%s) de la relocalisation %s est dans la mauvaise section (%s)"
-#: elf32-m32r.c:2001
+#: elf32-m32r.c:1947
#, c-format
msgid "%s: Instruction set mismatch with previous modules"
msgstr "%s: jeu d'instructions ne concorde par avec les modules précédents"
-#: elf32-m32r.c:2024
+#: elf32-m32r.c:1970
#, c-format
msgid "private flags = %lx"
msgstr "fanions privés = %lx"
-#: elf32-m32r.c:2029
+#: elf32-m32r.c:1975
msgid ": m32r instructions"
msgstr ": instructions m32r"
-#: elf32-m32r.c:2030
+#: elf32-m32r.c:1976
msgid ": m32rx instructions"
msgstr ": instruction m32rx"
msgid " [cpu32]"
msgstr " [cpu32]"
-#: elf32-mcore.c:353 elf32-mcore.c:479
+#: elf32-m68k.c:416
+msgid " [m68000]"
+msgstr " [m68000]"
+
+#: elf32-mcore.c:354 elf32-mcore.c:457
#, c-format
msgid "%s: Relocation %s (%d) is not currently supported.\n"
msgstr "%s: relocalisation %s (%d) n'est pas couramment supportée.\n"
-#: elf32-mcore.c:438
+#: elf32-mcore.c:442
#, c-format
msgid "%s: Unknown relocation type %d\n"
msgstr "%s: type de relocalisation inconnue %d\n"
-#: elf32-mips.c:2146 elf64-mips.c:1972
+#: elf32-mips.c:1152 elf64-mips.c:1783
msgid "32bits gp relative relocation occurs for an external symbol"
msgstr "relocalisation relative gp 32bits est survenue pour un symbole externe"
-#: elf32-mips.c:2295
+#: elf32-mips.c:1301
#, c-format
msgid "Linking mips16 objects into %s format is not supported"
msgstr "Édition de liens d'objets mips16 dans le format %s n'est pas supporté"
-#: elf32-mips.c:3119
-#, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s: édition de liens des fichiers PIC avec des fichiers non PIC"
-
-#: elf32-mips.c:3129
-#, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
-msgstr "%s: édition de liens des fichier abicalls avec des fichiers non abicalls"
-
-#: elf32-mips.c:3158
-#, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%s: ISA ne concorde pas (-mips%d) avec les modules précédents (-mips%d)"
-
-#: elf32-mips.c:3167
-#, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%s: ISA ne concorde pas (%d) avec les modules précédents (%d)"
-
-#: elf32-mips.c:3190
-#, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
-msgstr "%s: ABI ne concorde pas: édition de lien du module %s avec les modules précédents %s"
-
-#: elf32-mips.c:3204 elf32-ppc.c:1470 elf64-ppc.c:1538 elf64-sparc.c:3033
-#, c-format
-msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
-msgstr "%s: utilise differents champs e_flags (0x%lx) que les modules précédents (0x%lx)"
-
-#: elf32-mips.c:3235
-msgid " [abi=O32]"
-msgstr " [abi=O32]"
-
-#: elf32-mips.c:3237
-msgid " [abi=O64]"
-msgstr " [abi=O64]"
-
-#: elf32-mips.c:3239
-msgid " [abi=EABI32]"
-msgstr " [abi=EABI32]"
-
-#: elf32-mips.c:3241
-msgid " [abi=EABI64]"
-msgstr " [abi=EABI64]"
-
-#: elf32-mips.c:3243
-msgid " [abi unknown]"
-msgstr " [abi inconnu]"
-
-#: elf32-mips.c:3245
-msgid " [abi=N32]"
-msgstr " [abi=N32]"
-
-#: elf32-mips.c:3247
-msgid " [abi=64]"
-msgstr " [abi=64]"
-
-#: elf32-mips.c:3249
-msgid " [no abi set]"
-msgstr " [aucun jeu abi]"
-
-#: elf32-mips.c:3252
-msgid " [mips1]"
-msgstr " [mips1]"
-
-#: elf32-mips.c:3254
-msgid " [mips2]"
-msgstr " [mips2]"
-
-#: elf32-mips.c:3256
-msgid " [mips3]"
-msgstr " [mips3]"
-
-#: elf32-mips.c:3258
-msgid " [mips4]"
-msgstr " [mips4]"
-
-#: elf32-mips.c:3260
-msgid " [mips5]"
-msgstr " [mips5]"
-
-#: elf32-mips.c:3262
-msgid " [mips32]"
-msgstr " [mips32]"
-
-#: elf32-mips.c:3264
-msgid " [mips64]"
-msgstr " [mips64]"
-
-#: elf32-mips.c:3266
-msgid " [unknown ISA]"
-msgstr " [ISA inconnu]"
-
-#: elf32-mips.c:3269
-msgid " [32bitmode]"
-msgstr " [mode 32 bits]"
-
-#: elf32-mips.c:3271
-msgid " [not 32bitmode]"
-msgstr " [aucun mode 32 bits]"
-
-#: elf32-mips.c:4947
-msgid "static procedure (no name)"
-msgstr "procédure statique (sans name)"
-
-#: elf32-mips.c:5565 elf64-mips.c:6694
-#, c-format
-msgid "%s: illegal section name `%s'"
-msgstr "%s: nom illégal de section « %s »"
-
-#: elf32-mips.c:6132 elf64-mips.c:3150
-msgid "not enough GOT space for local GOT entries"
-msgstr "pas suffisamment d'espace GOT pour les entrées locales GOT"
-
-#: elf32-mips.c:7238 elf64-mips.c:4203
-#, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
-msgstr "%s: %s+0x%lx: saut vers la routine dans la partie du talon (stub) qui n'est pas jal"
-
-#: elf32-mips.c:8237 elf64-mips.c:5891
-#, c-format
-msgid "%s: Malformed reloc detected for section %s"
-msgstr "%s: relocalisation mal composée détectée dans la section %s"
-
-#: elf32-mips.c:8315 elf64-mips.c:5969
-#, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
-msgstr "%s: appel CALL16 de relocalisation à 0x%lx qui n'est pas pourun symbole global"
-
-#: elf32-ppc.c:1436 elf64-ppc.c:1503
+#: elf32-ppc.c:1460
#, c-format
msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
msgstr "%s: compilé avec -mrelocatable et fait l'édition de lien avec les modules compilés normalement"
-#: elf32-ppc.c:1444 elf64-ppc.c:1511
+#: elf32-ppc.c:1468
#, c-format
msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
msgstr "%s: compilé normalement et fait l'édition de lien avec les modules compilés avec -mrelocatable"
-#: elf32-ppc.c:1568
+#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
+#, c-format
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: utilise differents champs e_flags (0x%lx) que les modules précédents (0x%lx)"
+
+#: elf32-ppc.c:1592
#, c-format
msgid "%s: Unknown special linker type %d"
msgstr "%s: type d'édition spécial de lien inconnu %d"
-#: elf32-ppc.c:2218 elf32-ppc.c:2252 elf32-ppc.c:2287
+#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
#, c-format
msgid "%s: relocation %s cannot be used when making a shared object"
msgstr "%s: relocalisation %s ne peut être utilisée lors de la création d'un objet partagé"
-#: elf32-ppc.c:3097 elf64-ppc.c:3500
+#: elf32-ppc.c:3126 elf64-ppc.c:5473
#, c-format
msgid "%s: unknown relocation type %d for symbol %s"
msgstr "%s: type de relocalisation inconnue %d pour le symbole %s"
-#: elf32-ppc.c:3452 elf32-ppc.c:3473 elf32-ppc.c:3523
+#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
#, c-format
msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
msgstr "%s: la cible (%s) d'une relocalisation %s est dans la mauvaise section de sortie (%s)"
-#: elf32-ppc.c:3589
+#: elf32-ppc.c:3619
#, c-format
msgid "%s: Relocation %s is not yet supported for symbol %s."
msgstr "%s: relocalisation %s n'est pas encore supporté pour le symbole %s."
-#: elf32-sh.c:1101
+#: elf32-sh.c:1964
#, c-format
msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décalage pour R_SH_USES"
-#: elf32-sh.c:1113
+#: elf32-sh.c:1976
#, c-format
msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
msgstr "%s: 0x%lx: AVERTISSEMENT: R_SH_USES pointe vers un insn inconnu 0x%x "
-#: elf32-sh.c:1130
+#: elf32-sh.c:1993
#, c-format
msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décalage de chargement R_SH_USES"
-#: elf32-sh.c:1145
+#: elf32-sh.c:2008
#, c-format
msgid "%s: 0x%lx: warning: could not find expected reloc"
msgstr "%s: 0x%lx: AVERTISSEMENT: ne peut repérer la relocalisation attendue"
-#: elf32-sh.c:1202
+#: elf32-sh.c:2036
#, c-format
msgid "%s: 0x%lx: warning: symbol in unexpected section"
msgstr "%s: 0x%lx: AVERTISSEMENT: symbole dans une section inattendue"
-#: elf32-sh.c:1323
+#: elf32-sh.c:2153
#, c-format
msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
msgstr "%s: 0x%lx: AVERTISSEMENT: ne peut repérer le compteur de relocalisation attendu"
-#: elf32-sh.c:1332
+#: elf32-sh.c:2162
#, c-format
msgid "%s: 0x%lx: warning: bad count"
msgstr "%s: 0x%lx: AVERTISSEMENT: mauvais décompte"
-#: elf32-sh.c:1741 elf32-sh.c:2132
+#: elf32-sh.c:2550 elf32-sh.c:2926
#, c-format
msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
msgstr "%s: 0x%lx: erreur fatale: débordement de relocalisation lors de relâches"
-#: elf32-sh.c:3267
+#: elf32-sh.c:4073 elf64-sh64.c:1576
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+msgstr "STO_SH5_ISA32 inattendu sur le symbole local n'est pas traité"
+
+#: elf32-sh.c:4284
#, c-format
msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
msgstr "%s: 0x%lx: fatal: cible de branchement non aligné pour une relocalisatin de type relax-support"
-#: elf32-sparc.c:1554 elf64-sparc.c:2286
+#: elf32-sh64.c:203 elf64-sh64.c:2364
+#, c-format
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgstr "%s: compilé comme un objet de 32 bits et %s est de 64 bits"
+
+#: elf32-sh64.c:206 elf64-sh64.c:2367
+#, c-format
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgstr "%s: compilé comme un objet de 64 bits et %s est de 32 bits"
+
+#: elf32-sh64.c:208 elf64-sh64.c:2369
+#, c-format
+msgid "%s: object size does not match that of target %s"
+msgstr "%s: taille de l'objet ne concorde pas avec la taille de la cible %s"
+
+#: elf32-sh64.c:440 elf64-sh64.c:2941
+#, c-format
+msgid "%s: encountered datalabel symbol in input"
+msgstr "%s: rencontre du symbole d'une étiquette de donnée dans l'entrée"
+
+#: elf32-sh64.c:523
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr "Non concordance PTB: adresse SHmedia (bit 0 == 1)"
+
+#: elf32-sh64.c:526
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr "Non concordance PTA: adresse SHcompact (bit 0 == 0)"
+
+#: elf32-sh64.c:544
+#, c-format
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgstr "%s: ERREUR GAS: insn PTB inattendue avec R_SH_PT_16"
+
+#: elf32-sh64.c:593 elf64-sh64.c:1703
+#, c-format
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgstr "%s: ERREUR: relocalisation non alignée type %d à %08x relocalisé`%08x\n"
+
+#: elf32-sh64.c:677
+#, c-format
+msgid "%s: could not write out added .cranges entries"
+msgstr "%s: ne peut écrire en sortie des entrées .cranges"
+
+#: elf32-sh64.c:739
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
+msgstr "%s: ne peut écrire en sortie des entrées .cranges"
+
+#: elf32-sparc.c:1535 elf64-sparc.c:2224
#, c-format
msgid "%s: probably compiled without -fPIC?"
msgstr "%s: probablement compilé sans -fPIC?"
-#: elf32-sparc.c:2007
+#: elf32-sparc.c:2002
#, c-format
msgid "%s: compiled for a 64 bit system and target is 32 bit"
msgstr "%s: compilé pour un système à 64 bits et la cible est de 32 bits"
-#: elf32-sparc.c:2021
+#: elf32-sparc.c:2016
#, c-format
msgid "%s: linking little endian files with big endian files"
msgstr ""
msgid "could not locate special linker symbol __ctbp"
msgstr "ne peut repérer le symbole spécial d'édition de lien __ctbp"
-#: elf32-v850.c:1877
+#: elf32-v850.c:1875
#, c-format
msgid "%s: Architecture mismatch with previous modules"
msgstr "%s: l'architecture ne concorde pas avec les modules précédents"
-#: elf32-v850.c:1897
+#: elf32-v850.c:1895
#, c-format
msgid "private flags = %lx: "
msgstr "fanions privés = %lx"
-#: elf32-v850.c:1902
+#: elf32-v850.c:1900
msgid "v850 architecture"
msgstr "architecture v850"
-#: elf32-v850.c:1903
+#: elf32-v850.c:1901
msgid "v850e architecture"
msgstr "architecture v850e"
-#: elf32-v850.c:1904
+#: elf32-v850.c:1902
msgid "v850ea architecture"
msgstr "architecture v850ea"
-#: elf64-alpha.c:858
+#: elf32-vax.c:546
+msgid " [nonpic]"
+msgstr " [nonpic]"
+
+#: elf32-vax.c:549
+msgid " [d-float]"
+msgstr " [d-float]"
+
+#: elf32-vax.c:552
+msgid " [g-float]"
+msgstr " [g-float]"
+
+#: elf32-vax.c:674
+#, c-format
+msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
+msgstr "%s: AVERTISSEMENT: GOT ajouté de %ld vers « %s » ne concorde par avec le GOT ajouté de %ld"
+
+#: elf32-vax.c:1679
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr "%s: AVERTISSEMENT: PLT ajouté de %d vers « %s » de la section %s ignoré"
+
+#: elf32-vax.c:1814
+#, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr "%s: AVERTISSEMENT: relocalisation %s vers le symbole « %s » de la section %s"
+
+#: elf32-vax.c:1820
+#, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
+msgstr "%s: AVERTISSEMENT: relocalisation %s vers 0x%x de la section %s"
+
+#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
+msgid "non-zero addend in @fptr reloc"
+msgstr "ajout non null dans la relocalisation @fptr"
+
+#: elf64-alpha.c:1097
msgid "GPDISP relocation did not find ldah and lda instructions"
msgstr "la relocalisation GPDISP n'a pas repéré les instructions ldah et lda"
-#: elf64-alpha.c:2934
+#: elf64-alpha.c:3675
#, c-format
msgid "%s: .got subsegment exceeds 64K (size %d)"
msgstr "%s: le sous-segment .got excède 64K (taille %d)"
-#: elf64-alpha.c:3518 elf64-alpha.c:3530
+#: elf64-alpha.c:4498 elf64-alpha.c:4510
#, c-format
msgid "%s: gp-relative relocation against dynamic symbol %s"
msgstr "%s: relocalisation relative gp vers le symbole dynamique %s"
-#: elf64-hppa.c:2070
+#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#, c-format
+msgid "%s: pc-relative relocation against dynamic symbol %s"
+msgstr "%s: relocalisation relative au PC vers le symbole dynamique %s"
+
+#: elf64-alpha.c:4564
+#, c-format
+msgid "%s: change in gp: BRSGP %s"
+msgstr "%s: changé dans le GP: BRSGP %s"
+
+#: elf64-alpha.c:4589
+msgid "<unknown>"
+msgstr "<inconnu>"
+
+#: elf64-alpha.c:4594
+#, c-format
+msgid "%s: !samegp reloc against symbol without .prologue: %s"
+msgstr "%s: relocalisation !samegp vers le symbole sans .prologue: %s"
+
+#: elf64-alpha.c:4639
+#, c-format
+msgid "%s: unhandled dynamic relocation against %s"
+msgstr "%s: relocalisation dynamique non traitée vers %s"
+
+#: elf64-alpha.c:4752
+#, c-format
+msgid "%s: dtp-relative relocation against dynamic symbol %s"
+msgstr "%s: relocalisation relative dtp vers le symbole dynamique %s"
+
+#: elf64-alpha.c:4775
+#, c-format
+msgid "%s: tp-relative relocation against dynamic symbol %s"
+msgstr "%s: relocalisation relative tp vers le symbole dynamique %s"
+
+#: elf64-hppa.c:2080
#, c-format
msgid "stub entry for %s cannot load .plt, dp offset = %ld"
msgstr "entrée du talon pour %s ne peut charger .plt, décalage dp = %ld"
-#: elf64-mmix.c:1268
+#: elf64-mmix.c:1002
+#, c-format
+msgid ""
+"%s: Internal inconsistency error for value for\n"
+" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
+msgstr ""
+"%s: erreur d'inconsistence interne pour la valeur du registre global\n"
+" alloué à l'édition de lien: lié: 0x%lx%08lx != relâché: 0x%lx%08lx\n"
+
+#: elf64-mmix.c:1386
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
+msgstr "%s: relocalisation base plus décalage vers le symbole registre: (inconnu) dans %s"
+
+#: elf64-mmix.c:1391
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
+msgstr "%s: relocalisation base plus décalage vers le symbole registre: %s dans %s"
+
+#: elf64-mmix.c:1435
+#, c-format
+msgid "%s: register relocation against non-register symbol: (unknown) in %s"
+msgstr "%s: relocalisation de registre vers le symbole non-registre: (inconnu) dans %s"
+
+#: elf64-mmix.c:1440
#, c-format
msgid "%s: register relocation against non-register symbol: %s in %s"
msgstr "%s: relocalisation de registre vers le symbole non-registre: %s dans %s"
-#: elf64-mmix.c:1270
-msgid "(unknown)"
-msgstr "(inconnu)"
-
-#: elf64-mmix.c:1305
+#: elf64-mmix.c:1477
#, c-format
msgid "%s: directive LOCAL valid only with a register or absolute value"
msgstr "%s: directive LOCAL valide seulement avec un registre ou une valeur absolue"
-#: elf64-mmix.c:1333
+#: elf64-mmix.c:1505
#, c-format
msgid "%s: LOCAL directive: Register $%ld is not a local register. First global register is $%ld."
msgstr "%s: directive LOCAL: registre $%ld n'est pas un registre local. Premier registre global est $%ld."
-#: elf64-mmix.c:1609
+#: elf64-mmix.c:1965
#, c-format
msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
msgstr "%s: erreur: multiple définitions de « %s »; début de %s est initialisé dans un précédent fichier lié\n"
-#: elf64-mmix.c:1668
+#: elf64-mmix.c:2024
msgid "Register section has contents\n"
msgstr "Registre de section contient\n"
-#: elf64-ppc.c:1466 libbfd.c:1436
+#: elf64-mmix.c:2186
+#, c-format
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+" Please report this bug."
+msgstr ""
+"Inconsistence interne: reste %u != max %u.\n"
+" SVP rapporter cette anomalie."
+
+#: elf64-ppc.c:1669 libbfd.c:1435
#, c-format
msgid "%s: compiled for a big endian system and target is little endian"
msgstr ""
"%s: compilé pour un système à octets de poids fort alors que la cible\n"
"est un système à octets de poids faible"
-#: elf64-ppc.c:1468 libbfd.c:1438
+#: elf64-ppc.c:1671 libbfd.c:1437
#, c-format
msgid "%s: compiled for a little endian system and target is big endian"
msgstr ""
"%s: compilé pour un système à octets de poids faible alors que la cible\n"
"est un système à octets de poids fort"
-#: elf64-ppc.c:3166
+#: elf64-ppc.c:3610
+#, c-format
+msgid "%s: unexpected reloc type %u in .opd section"
+msgstr "%s: type inattendu de relocalisation %u dans la section .opd"
+
+#: elf64-ppc.c:3630
+#, c-format
+msgid "%s: .opd is not a regular array of opd entries"
+msgstr "%s: .opd n'est pas un tableau régulier d'entrées opd"
+
+#: elf64-ppc.c:3672
+#, c-format
+msgid "%s: undefined sym `%s' in .opd section"
+msgstr "%s: symbole « %s » indéfini dans la section .opd"
+
+#: elf64-ppc.c:4397
+#, c-format
+msgid "can't find branch stub `%s'"
+msgstr "ne peut repérer le talon de branchement « %s »"
+
+#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#, c-format
+msgid "linkage table error against `%s'"
+msgstr "erreur de liaison de la table de liaison vers « %s »"
+
+#: elf64-ppc.c:4573
#, c-format
-msgid "linkage table overflow against `%s'"
-msgstr "débordement de la table de liaison vers « %s »"
+msgid "can't build branch stub `%s'"
+msgstr "ne peut construire un talon de branchement « %s »"
-#: elf64-ppc.c:3244
-msgid "stub section size doesn't match calculated size"
-msgstr "taille de la section du talon ne concorde pas avec la taille calculée"
+#: elf64-ppc.c:5179
+msgid "stubs don't match calculated size"
+msgstr "taille des talons ne concorde pas avec la taille calculée"
-#: elf64-ppc.c:3845
+#: elf64-ppc.c:5828
#, c-format
msgid "%s: Relocation %s is not supported for symbol %s."
msgstr "%s: relocalisation %s n'est pas supportée pour le symbole %s."
-#: elf64-ppc.c:3889
+#: elf64-ppc.c:5872
#, c-format
msgid "%s: error: relocation %s not a multiple of 4"
msgstr "%s: erreur: relocalisation %s n'est pas un multiple de 4"
-#: elf64-sparc.c:1277
+#: elf64-sparc.c:1280
#, c-format
msgid "%s: check_relocs: unhandled reloc type %d"
msgstr "%s: check_relocs: type de relocalisation non traitée %d"
-#: elf64-sparc.c:1314
+#: elf64-sparc.c:1317
#, c-format
msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
msgstr "%s: seuls les registres %%g[2367] peuvent être déclarés en utilisant les registres STT_REGISTER"
-#: elf64-sparc.c:1334
+#: elf64-sparc.c:1337
#, c-format
-msgid "Register %%g%d used incompatibly: %s in %s"
-msgstr "Registre %%g%d utilisé de manière incompatible: %s dans %s"
+msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
+msgstr "Registre %%g%d utilisé de manière incompatible: %s dans %s précédemment %s dans %s"
-#: elf64-sparc.c:1338 elf64-sparc.c:1362 elf64-sparc.c:1411
+#: elf64-sparc.c:1360
#, c-format
-msgid " previously %s in %s"
-msgstr " précédemment %s dans %s"
+msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
+msgstr "Symbole « %s » a des types qui diffèrent: REGISTRE dans %s, précédemment %s dans %s"
-#: elf64-sparc.c:1359 elf64-sparc.c:1408
+#: elf64-sparc.c:1406
#, c-format
-msgid "Symbol `%s' has differing types: %s in %s"
-msgstr "Symbole « %s » a des types qui diffèrent: %s dans %s"
+msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
+msgstr "Symbole « %s » a des types qui diffèrent: %s dans %s, précédemment REGISTRE dans %s"
-#: elf64-sparc.c:3014
+#: elf64-sparc.c:2970
#, c-format
msgid "%s: linking UltraSPARC specific with HAL specific code"
msgstr "%s: édition de liens spécifiques pour UltraSPARC avec du code spécifique HAL"
-#: elfcode.h:1218
+#: elfcode.h:1198
#, c-format
msgid "%s: version count (%ld) does not match symbol count (%ld)"
msgstr "%s: compteur de version (%ld) ne concorde pas avec le symbole du compteur (%ld)"
-#: elflink.c:434
+#: elflink.c:440
#, c-format
msgid "%s: Section %s is too large to add hole of %ld bytes"
msgstr "%s: section %s est trop grande pour ajouter un trou de %ld octets"
-#: elflink.h:1113
+#: elflink.h:1090
#, c-format
msgid "%s: warning: unexpected redefinition of `%s'"
msgstr "%s: AVERTISSEMENT: redéfinition inattendue de « %s »"
-#: elflink.h:1784
+#: elflink.h:1727
#, c-format
msgid "%s: %s: invalid version %u (max %d)"
msgstr "%s: %s: version invalide %u (max %d)"
-#: elflink.h:1825
+#: elflink.h:1768
#, c-format
msgid "%s: %s: invalid needed version %d"
msgstr "%s: %s: version requise invalide %d"
-#: elflink.h:1945
+#: elflink.h:1890
#, c-format
msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
msgstr "AVERTISSEMENT: taille du symbole « %s » a changé de %lu à %lu dans %s"
-#: elflink.h:4020
+#: elflink.h:3174
+#, c-format
+msgid "%s: .preinit_array section is not allowed in DSO"
+msgstr "%s: section .preinit_array n'est pas permise dans DSO"
+
+#: elflink.h:4030
#, c-format
msgid "warning: type and size of dynamic symbol `%s' are not defined"
msgstr "AVERTISSEMENT: type et taille du symbole dynamique « %s » ne sont pas définis"
-#: elflink.h:4329
+#: elflink.h:4345
#, c-format
msgid "%s: undefined versioned symbol name %s"
msgstr "%s: nom symbole avec version indéfinie %s"
-#: elflink.h:4559 elflink.h:4567 elflink.h:6218 elflink.h:7295
+#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
msgid "Error: out of memory"
msgstr "Erreur: mémoire épuisée"
-#: elflink.h:4729
+#: elflink.h:4781
msgid "Not enough memory to sort relocations"
msgstr "Pas assez de mémoire pour effectuer le trie des relocalisations"
-#: elflink.h:5995
+#: elflink.h:5682 elflink.h:5725
+#, c-format
+msgid "%s: could not find output section %s"
+msgstr "%s: ne peut repérer la section de sortie %s"
+
+#: elflink.h:5688
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr "AVERTISSEMENT: section %s a une taille nulle"
+
+#: elflink.h:6275
#, c-format
msgid "%s: could not find output section %s for input section %s"
msgstr "%s: ne peut repérer la section de sortie %s pour la section d'entrée %s"
-#: elflink.h:6568
+#: elflink.h:6486
+#, c-format
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr "%s: taille de la relocalisation ne concorde pas dans %s section %s"
+
+#: elflink.h:6849
msgid "warning: relocation against removed section; zeroing"
msgstr "AVERTISSEMENT: relocalisation vers une section qui a été enlevée; mise à zéro"
-#: elflink.h:6598
+#: elflink.h:6879
msgid "warning: relocation against removed section"
msgstr "AVERTISSEMENT: relocalisation vers une section enlevée"
-#: elflink.h:6611
+#: elflink.h:6892
#, c-format
msgid "local symbols in discarded section %s"
msgstr "symboles locaux de la section mise à l'écart %s"
-#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456
+#: elfxx-mips.c:734
+msgid "static procedure (no name)"
+msgstr "procédure statique (sans name)"
+
+#: elfxx-mips.c:1601
+msgid "not enough GOT space for local GOT entries"
+msgstr "pas suffisamment d'espace GOT pour les entrées locales GOT"
+
+#: elfxx-mips.c:2750
+#, c-format
+msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgstr "%s: %s+0x%lx: saut vers la routine dans la partie du talon (stub) qui n'est pas jal"
+
+#: elfxx-mips.c:4270
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr "%s: relocalisation mal composée détectée dans la section %s"
+
+#: elfxx-mips.c:4348
+#, c-format
+msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgstr "%s: appel CALL16 de relocalisation à 0x%lx qui n'est pas pourun symbole global"
+
+#: elfxx-mips.c:7301
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr "%s: nom illégal de section « %s »"
+
+#: elfxx-mips.c:7615
+#, c-format
+msgid "%s: linking PIC files with non-PIC files"
+msgstr "%s: édition de liens des fichiers PIC avec des fichiers non PIC"
+
+#: elfxx-mips.c:7625
+#, c-format
+msgid "%s: linking abicalls files with non-abicalls files"
+msgstr "%s: édition de liens des fichier abicalls avec des fichiers non abicalls"
+
+#: elfxx-mips.c:7654
+#, c-format
+msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+msgstr "%s: ISA ne concorde pas (-mips%d) avec les modules précédents (-mips%d)"
+
+#: elfxx-mips.c:7676
+#, c-format
+msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+msgstr "%s: ISA ne concorde pas (%d) avec les modules précédents (%d)"
+
+#: elfxx-mips.c:7699
+#, c-format
+msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+msgstr "%s: ABI ne concorde pas: édition de lien du module %s avec les modules précédents %s"
+
+#: elfxx-mips.c:7759
+msgid " [abi=O32]"
+msgstr " [abi=O32]"
+
+#: elfxx-mips.c:7761
+msgid " [abi=O64]"
+msgstr " [abi=O64]"
+
+#: elfxx-mips.c:7763
+msgid " [abi=EABI32]"
+msgstr " [abi=EABI32]"
+
+#: elfxx-mips.c:7765
+msgid " [abi=EABI64]"
+msgstr " [abi=EABI64]"
+
+#: elfxx-mips.c:7767
+msgid " [abi unknown]"
+msgstr " [abi inconnu]"
+
+#: elfxx-mips.c:7769
+msgid " [abi=N32]"
+msgstr " [abi=N32]"
+
+#: elfxx-mips.c:7771
+msgid " [abi=64]"
+msgstr " [abi=64]"
+
+#: elfxx-mips.c:7773
+msgid " [no abi set]"
+msgstr " [aucun jeu abi]"
+
+#: elfxx-mips.c:7776
+msgid " [mips1]"
+msgstr " [mips1]"
+
+#: elfxx-mips.c:7778
+msgid " [mips2]"
+msgstr " [mips2]"
+
+#: elfxx-mips.c:7780
+msgid " [mips3]"
+msgstr " [mips3]"
+
+#: elfxx-mips.c:7782
+msgid " [mips4]"
+msgstr " [mips4]"
+
+#: elfxx-mips.c:7784
+msgid " [mips5]"
+msgstr " [mips5]"
+
+#: elfxx-mips.c:7786
+msgid " [mips32]"
+msgstr " [mips32]"
+
+#: elfxx-mips.c:7788
+msgid " [mips64]"
+msgstr " [mips64]"
+
+#: elfxx-mips.c:7790
+msgid " [unknown ISA]"
+msgstr " [ISA inconnu]"
+
+#: elfxx-mips.c:7793
+msgid " [mdmx]"
+msgstr " [mdmx]"
+
+#: elfxx-mips.c:7796
+msgid " [mips16]"
+msgstr " [mips16]"
+
+#: elfxx-mips.c:7799
+msgid " [32bitmode]"
+msgstr " [mode 32 bits]"
+
+#: elfxx-mips.c:7801
+msgid " [not 32bitmode]"
+msgstr " [aucun mode 32 bits]"
+
+#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
#, c-format
msgid "Output file requires shared library `%s'\n"
msgstr "La sortie requiert une ilbrairie partagée « %s »\n"
-#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464
+#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
#, c-format
msgid "Output file requires shared library `%s.so.%s'\n"
msgstr "Le fichier de sortie requiert une librairie partagée « %s.so.%s »\n"
-#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708 sparclinux.c:655 sparclinux.c:705
+#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
+#: sparclinux.c:657 sparclinux.c:707
#, c-format
msgid "Symbol %s not defined for fixups\n"
msgstr "Symbole %s n'est pas défini pour les corrections\n"
-#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729
+#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
msgid "Warning: fixup count mismatch\n"
msgstr "AVERTISSEMENT: correction du compteur qui ne concordait pas\n"
#: ieee.c:877
#, c-format
-msgid "%s: unimplemented ATI record %u for symbol %u"
+msgid "%s: unimplemented ATI record %u for symbol %u"
msgstr "%s: enregistrement ATI non implanté %u pour le symbole %u"
#: ieee.c:902
msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
msgstr "%s:%d: caractères inattendue « %s » dans le fichier Intel hexadécimal\n"
-#: ihex.c:368
+#: ihex.c:366
#, c-format
msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
msgstr "%s:%u: somme de contrôle erronée dans le fichier Intel hexadécimal (attendu %u, obtenu %u)"
-#: ihex.c:422
+#: ihex.c:420
#, c-format
msgid "%s:%u: bad extended address record length in Intel Hex file"
msgstr "%s:%u: longueur erronée de l'enregistrement d'adresse étendue dans le fichier Intel hexadécimal"
-#: ihex.c:439
+#: ihex.c:437
#, c-format
msgid "%s:%u: bad extended start address length in Intel Hex file"
msgstr "%s:%u: longueur erronée d'adresse étendue de début dans le fichier Intel hexadécimal"
-#: ihex.c:456
+#: ihex.c:454
#, c-format
msgid "%s:%u: bad extended linear address record length in Intel Hex file"
msgstr "%s:%u: longueur erronée de l'enregistrement d'adresse étendue linéaire dans le fichier Intel hexadécimal"
-#: ihex.c:473
+#: ihex.c:471
#, c-format
msgid "%s:%u: bad extended linear start address length in Intel Hex file"
msgstr "%s:%u: longueur erronée d'adresse étendue linéraire de début dans le fichier Intel hexadécimal"
-#: ihex.c:490
+#: ihex.c:488
#, c-format
msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
msgstr "%s:%u: type ihex non reconnu %u dans le fichier Intel hexadécimal\n"
-#: ihex.c:610
+#: ihex.c:607
#, c-format
msgid "%s: internal error in ihex_read_section"
msgstr "%s: erreur interne dans ihex_read_section"
-#: ihex.c:645
+#: ihex.c:642
#, c-format
msgid "%s: bad section length in ihex_read_section"
msgstr "%s: longuer erronée de section dans ihex_read_section"
-#: ihex.c:863
+#: ihex.c:860
#, c-format
-msgid "%s: address 0x%s out of range for Intex Hex file"
+msgid "%s: address 0x%s out of range for Intel Hex file"
msgstr "%s: adresse 0x%s hors gamme pour le fichier Intel hexadécimal"
#: libbfd.c:492
msgid "not mapping: env var not set\n"
msgstr "pas de table de projection: variable d'environnement pas initialisée\n"
-#: libbfd.c:1463
+#: libbfd.c:1466
#, c-format
-msgid "Deprecated %s called"
-msgstr "%s appel déprécié"
+msgid "Deprecated %s called at %s line %d in %s\n"
+msgstr "%s déprécié appelé à %s dans la ligne %d dans %s\n"
-#: libbfd.c:1465
+#: libbfd.c:1469
#, c-format
-msgid " at %s line %d in %s\n"
-msgstr " à %s ligne %d dans %s\n"
+msgid "Deprecated %s called\n"
+msgstr "%s appel déprécié\n"
-#: linker.c:1849
+#: linker.c:1873
#, c-format
msgid "%s: indirect symbol `%s' to `%s' is a loop"
msgstr "%s: symbole indirect « %s » vers « %s » est une boucle"
-#: linker.c:2745
+#: linker.c:2776
#, c-format
msgid "Attempt to do relocateable link with %s input and %s output"
msgstr "Tentative de relocalisation d'un lien avec %s à l'entrée et %s à la sortie"
-#: merge.c:897
+#: merge.c:892
#, c-format
msgid "%s: access beyond end of merged section (%ld + %ld)"
msgstr "%s: accès au-delà de la fin de la section fusionnée (%ld + %ld)"
msgid "%s: No core to allocate section name %s\n"
msgstr "%s: pas de corps pour allouer un nom de section %s\n"
-#: mmo.c:537
+#: mmo.c:536
#, c-format
msgid "%s: No core to allocate a symbol %d bytes long\n"
msgstr "%s: pas de corps pour allouer un symbole %d octets de longueur\n"
-#: mmo.c:1190
+#: mmo.c:1245
#, c-format
msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
msgstr "%s: fichier mmo invalide: valeur d'initialisation pour $255 n'est pas « Main »\n"
-#: mmo.c:1336
+#: mmo.c:1391
#, c-format
msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
msgstr "%s: séquence de caractères large 0x%02X 0x%02X non supportée après le nom de symbole débutant avec « %s »\n"
-#: mmo.c:1571
+#: mmo.c:1633
#, c-format
msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
msgstr "%s: fichier mmo invalide: lopcode non supporté « %d »\n"
-#: mmo.c:1581
+#: mmo.c:1643
#, c-format
msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
msgstr "%s: fichier mmo invalide: attendu YZ = 1 obtenu YZ = %d pour lop_quote\n"
-#: mmo.c:1617
+#: mmo.c:1679
#, c-format
msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
msgstr "%s: fichier mmo invalide: attendu z = 1 ou z = 2, obtenu z = %d pour lop_loc\n"
-#: mmo.c:1663
+#: mmo.c:1725
#, c-format
msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
msgstr "%s: fichier mmo invalide: attendu z = 1 ou z = 2, obtenu z = %d pour lop_fixo\n"
-#: mmo.c:1702
+#: mmo.c:1764
#, c-format
msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
msgstr "%s: fichier mmo invalide: attendu y = 0, obtenu y = %d pour lop_fixrx\n"
-#: mmo.c:1711
+#: mmo.c:1773
#, c-format
msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
msgstr "%s: fichier mmo invalide: attendu z = 16 ou z = 24, obtenu z = %d pour lop_fixrx\n"
-#: mmo.c:1734
+#: mmo.c:1796
#, c-format
msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
msgstr "%s: fichier mmo invalide: octet de tête du mot de l'opérande doit être 0 ou 1, obtenu %d pour lop_fixrx\n"
-#: mmo.c:1757
+#: mmo.c:1819
#, c-format
msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
msgstr "%s: ne allouer un nom de ficheir pour le no. de fichier %d, %d octets\n"
-#: mmo.c:1777
+#: mmo.c:1839
#, c-format
msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
msgstr "%s: fichier mmo invalide: no. de fichier %d « %s », a déjà été entré comme « %s »\n"
-#: mmo.c:1790
+#: mmo.c:1852
#, c-format
msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
msgstr "%s: fichier mmo invalide: nom de fichier %d n'a pas été spécifié avant son utilisation\n"
-#: mmo.c:1896
+#: mmo.c:1958
#, c-format
msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
msgstr "%s: fichier mmo invalide: champs y et z de lop_stab non null, y: %d, z: %d\n"
-#: mmo.c:1932
+#: mmo.c:1994
#, c-format
msgid "%s: invalid mmo file: lop_end not last item in file\n"
msgstr "%s: fichier mmo invalide: lop_end N,est pas le dernier item dans le fichier\n"
-#: mmo.c:1945
+#: mmo.c:2007
#, c-format
msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
msgstr "%s: fichier mmo invalide: YZ de lop_end (%ld) n'est pas égal au nombre de teras du lop_stab précédent (%ld)\n"
-#: mmo.c:2610
+#: mmo.c:2670
#, c-format
msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
msgstr "%s: table de symboles invalides: duplication du symbole « %s »\n"
-#: mmo.c:2898
+#: mmo.c:2921
#, c-format
msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
msgstr "%s: définition de symbole erronée: « Main » initialisé à %s au lieu de l'adresse de départ %s\n"
-#: mmo.c:2932
+#: mmo.c:3011
#, c-format
msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d. Only `Main' will be emitted.\n"
msgstr "%s: avertissement: table de symboles trop grande pour mmo, plus grande que 65535 mots de 32 bits: %d. Seul « Main » sera produit.\n"
-#: mmo.c:2977
+#: mmo.c:3056
#, c-format
msgid "%s: internal error, symbol table changed size from %d to %d words\n"
msgstr "%s: erreur interne, table de symbole a changé de taille de %d à %d mots\n"
-#: mmo.c:3032
+#: mmo.c:3111
#, c-format
msgid "%s: internal error, internal register section %s had contents\n"
msgstr "%s: erreur interne, registre interne de section %s a du contenu\n"
-#: mmo.c:3084
+#: mmo.c:3163
#, c-format
msgid "%s: no initialized registers; section length 0\n"
msgstr "%s: pas de registres initialisés; section de longeur 0\n"
-#: mmo.c:3090
+#: mmo.c:3169
#, c-format
msgid "%s: too many initialized registers; section length %ld\n"
msgstr "%s: trop de resigstres initialisés; longueur de section %ld\n"
-#: mmo.c:3095
+#: mmo.c:3174
#, c-format
msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
msgstr "%s: adresse de départ invalide pour des registres initialisés de longueur %ld: 0x%lx%08lx\n"
-#: oasys.c:1036
+#: oasys.c:1029
#, c-format
msgid "%s: can not represent section `%s' in oasys"
msgstr "%s: ne peut représenter la section « %s » dans oasis"
msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
msgstr "Longueur de la partition[%d] = 0x%.8lx (%ld)\n"
-#: som.c:5402
+#: som.c:5398
msgid "som_sizeof_headers unimplemented"
msgstr "som_sizeof_headers non implanté"
msgid "%s:%d: Unexpected character `%s' in S-record file\n"
msgstr "%s:%d: caractère inattendue « %s » dans le fichier S-record\n"
-#: syms.c:996
+#: stabs.c:319
+#, c-format
+msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
+msgstr "%s(%s+0x%lx): entrée des talons a une chaîne index invalide"
+
+#: syms.c:1044
msgid "Unsupported .stab relocation"
msgstr "Relocalisation du .stab non supporté"
msgid "Size mismatch section %s=%lx, %s=%lx"
msgstr "Taille de section ne concorde pas %s=%lx, %s=%lx"
-#: vms-gsd.c:704
+#: vms-gsd.c:702
#, c-format
msgid "unknown gsd/egsd subtype %d"
msgstr "sous type gsd/egsd inconnu %d"
msgid "failed to enter %s"
msgstr "échec d'insertion de %s"
-#: vms-tir.c:78
+#: vms-tir.c:81
msgid "No Mem !"
msgstr "Mémoire épuisée!"
-#: vms-tir.c:313
-msgid "Bad section index in ETIR_S_C_STA_PQ"
-msgstr "Index de section erronée dans ETIR_S_C_STA_PQ"
-
-#: vms-tir.c:328
+#: vms-tir.c:362
#, c-format
-msgid "Unsupported STA cmd %d"
-msgstr "Commande STA non supportée %d"
+msgid "bad section index in %s"
+msgstr "index de section erronée dans %s"
-#: vms-tir.c:333 vms-tir.c:1301
+#: vms-tir.c:375
#, c-format
-msgid "Reserved STA cmd %d"
-msgstr "Commande STA réservée %d"
+msgid "unsupported STA cmd %s"
+msgstr "commande STA non supportée %s"
-#: vms-tir.c:443
+#: vms-tir.c:380 vms-tir.c:1240
#, c-format
-msgid "ETIR_S_C_STO_GBL: no symbol \"%s\""
-msgstr "ETIR_S_C_STO_GBL: pas de symbole « %s »"
+msgid "reserved STA cmd %d"
+msgstr "commande STA réservée %d"
-#: vms-tir.c:465
+#: vms-tir.c:491 vms-tir.c:514
#, c-format
-msgid "ETIR_S_C_STO_CA: no symbol \"%s\""
-msgstr "ETIR_S_C_STO_CA: pas de symbole « %s »"
-
-#: vms-tir.c:478
-msgid "ETIR_S_C_STO_RB/AB: Not supported"
-msgstr "ETIR_S_C_STO_RB/AB: non supporté"
+msgid "%s: no symbol \"%s\""
+msgstr "%s: pas de symbole \"%s\""
-#: vms-tir.c:538
-msgid "ETIR_S_C_STO_LP_PSB: Not supported"
-msgstr "ETIR_S_C_STO_LP_PSB: non supporté"
-
-#: vms-tir.c:544
-msgid "ETIR_S_C_STO_HINT_GBL: not implemented"
-msgstr "ETIR_S_C_STO_HINT_GBL: pas implanté"
-
-#: vms-tir.c:550
-msgid "ETIR_S_C_STO_HINT_PS: not implemented"
-msgstr "ETIR_S_C_STO_HINT_PS: pas implanté"
-
-#: vms-tir.c:554 vms-tir.c:1473
+#. unsigned shift
+#. rotate
+#. Redefine symbol to current location.
+#. Define a literal.
+#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
+#: vms-tir.c:838 vms-tir.c:1563
#, c-format
-msgid "Reserved STO cmd %d"
-msgstr "Commande STO réservée %d"
-
-#: vms-tir.c:667
-msgid "ETIR_S_C_OPR_INSV: Not supported"
-msgstr "ETIR_S_C_OPR_INSV: non supporté"
-
-#: vms-tir.c:685
-msgid "ETIR_S_C_OPR_USH: Not supported"
-msgstr "ETIR_S_C_OPR_USH: non supporté"
-
-#: vms-tir.c:691
-msgid "ETIR_S_C_OPR_ROT: Not supported"
-msgstr "ETIR_S_C_OPR_ROT: non supporté"
-
-#: vms-tir.c:710
-msgid "ETIR_S_C_OPR_REDEF: Not supported"
-msgstr "ETIR_S_C_OPR_REDEF: non supporté"
-
-#: vms-tir.c:716
-msgid "ETIR_S_C_OPR_DFLIT: Not supported"
-msgstr "ETIR_S_C_OPR_DFLIT: non supporté"
+msgid "%s: not supported"
+msgstr "%s: pas supporté"
-#: vms-tir.c:720 vms-tir.c:1668
+#: vms-tir.c:586 vms-tir.c:1418
#, c-format
-msgid "Reserved OPR cmd %d"
-msgstr "Commande OPR réservée %d"
+msgid "%s: not implemented"
+msgstr "%s: non implanté"
-#: vms-tir.c:788 vms-tir.c:1737
+#: vms-tir.c:590 vms-tir.c:1422
#, c-format
-msgid "Reserved CTL cmd %d"
-msgstr "Commande CTL réservée %d"
+msgid "reserved STO cmd %d"
+msgstr "commande STO réservée %d"
-#: vms-tir.c:816
-msgid "ETIR_S_C_STC_LP: not supported"
-msgstr "ETIR_S_C_STC_LP: non supporté"
-
-#: vms-tir.c:834
-msgid "ETIR_S_C_STC_GBL: not supported"
-msgstr "ETIR_S_C_STC_GBL: non supporté"
-
-#: vms-tir.c:842
-msgid "ETIR_S_C_STC_GCA: not supported"
-msgstr "ETIR_S_C_STC_GCA: non supporté"
+#: vms-tir.c:708 vms-tir.c:1568
+#, c-format
+msgid "reserved OPR cmd %d"
+msgstr "commande OPR réservée %d"
-#: vms-tir.c:851
-msgid "ETIR_S_C_STC_PS: not supported"
-msgstr "ETIR_S_C_STC_PS: non supporté"
+#: vms-tir.c:776 vms-tir.c:1632
+#, c-format
+msgid "reserved CTL cmd %d"
+msgstr "commande CTL réservée %d"
-#.
-#. * stack byte from image
-#. * arg: -
-#. *
-#.
-#: vms-tir.c:1199
-msgid "Stack-from-image not implemented"
-msgstr "Stack-from-image non implanté"
+#. stack byte from image
+#. arg: none.
+#: vms-tir.c:1148
+msgid "stack-from-image not implemented"
+msgstr "pile depuis l'image non implanté"
-#: vms-tir.c:1219
-msgid "Stack-entry-mask not fully implemented"
-msgstr "Stack-entry-mask pas complètement implanté"
+#: vms-tir.c:1166
+msgid "stack-entry-mask not fully implemented"
+msgstr "masque de pile d'entrée pas complètement implanté"
+#. compare procedure argument
+#. arg: cs symbol name
+#. by argument index
+#. da argument descriptor
#.
-#. * compare procedure argument
-#. * arg: cs symbol name
-#. * by argument index
-#. * da argument descriptor
-#. *
-#. * compare argument descriptor with symbol argument (ARG$V_PASSMECH)
-#. * and stack TRUE (args match) or FALSE (args dont match) value
-#.
-#: vms-tir.c:1235
+#. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
+#. and stack TRUE (args match) or FALSE (args dont match) value.
+#: vms-tir.c:1180
msgid "PASSMECH not fully implemented"
msgstr "PASSMECH pas complètement implanté"
-#: vms-tir.c:1256
-msgid "Stack-local-symbol not fully implemented"
-msgstr "Stack-local-symbol pas complètement implanté"
+#: vms-tir.c:1199
+msgid "stack-local-symbol not fully implemented"
+msgstr "symbole local de pile pas complètement implanté"
-#: vms-tir.c:1271
-msgid "Stack-literal not fully implemented"
-msgstr "Stack-literal pas complètement implanté"
+#: vms-tir.c:1212
+msgid "stack-literal not fully implemented"
+msgstr "litéral de pile pas complètement implanté"
-#: vms-tir.c:1294
-msgid "Stack-local-symbol-entry-point-mask not fully implemented"
-msgstr "Stack-local-symbol-entry-point-mask pas complètement implanté"
+#: vms-tir.c:1233
+msgid "stack-local-symbol-entry-point-mask not fully implemented"
+msgstr "masque du symbole local de point d'entrée de pile pas complètement implanté"
-#: vms-tir.c:1469
+#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
+#: vms-tir.c:1619 vms-tir.c:1627
#, c-format
-msgid "Unimplemented STO cmd %d"
-msgstr "Commande STO non implantée %d"
-
-#: vms-tir.c:1608
-msgid "TIR_S_C_OPR_ASH incomplete"
-msgstr "TIR_S_C_OPR_ASH incomplète"
-
-#: vms-tir.c:1622
-msgid "TIR_S_C_OPR_USH incomplete"
-msgstr "TIR_S_C_OPR_USH incomplète"
-
-#: vms-tir.c:1636
-msgid "TIR_S_C_OPR_ROT incomplete"
-msgstr "TIR_S_C_OPR_ROT incomplète"
-
-#.
-#. * redefine symbol to current location
-#.
-#: vms-tir.c:1657
-msgid "TIR_S_C_OPR_REDEF not supported"
-msgstr "TIR_S_C_OPR_REDEF non supporté"
+msgid "%s: not fully implemented"
+msgstr "%s: pas complètement implanté"
-#.
-#. * define a literal
-#.
-#: vms-tir.c:1664
-msgid "TIR_S_C_OPR_DFLIT not supported"
-msgstr "TIR_S_C_OPR_DFLIT non supporté"
-
-#: vms-tir.c:1718
-msgid "TIR_S_C_CTL_DFLOC not fully implemented"
-msgstr "TIR_S_C_CTL_DFLOC pas complètement implanté"
-
-#: vms-tir.c:1726
-msgid "TIR_S_C_CTL_STLOC not fully implemented"
-msgstr "TIR_S_C_CTL_STLOC pas complètement implanté"
-
-#: vms-tir.c:1734
-msgid "TIR_S_C_CTL_STKDL not fully implemented"
-msgstr "TIR_S_C_CTL_STKDL n'est pas complètement implanté"
-
-#: vms-tir.c:1791
+#: vms-tir.c:1684
#, c-format
-msgid "Obj code %d not found"
-msgstr "Code objet %d non repéré"
+msgid "obj code %d not found"
+msgstr "code objet %d non repéré"
-#: vms-tir.c:2137
+#: vms-tir.c:2019
#, c-format
msgid "SEC_RELOC with no relocs in section %s"
msgstr "SEC_RELOC sans relocalisation dans la section %s"
-#: vms-tir.c:2424
+#: vms-tir.c:2307
#, c-format
msgid "Unhandled relocation %s"
msgstr "Relocalisation non traitée: %s"
-#: xcofflink.c:1241
+#: xcofflink.c:1243
#, c-format
msgid "%s: `%s' has line numbers but no enclosing section"
msgstr "%s: « %s » contient des numéros de lignes mais de section de fermeture"
-#: xcofflink.c:1294
+#: xcofflink.c:1296
#, c-format
msgid "%s: class %d symbol `%s' has no aux entries"
msgstr "%s: classe %d symbole « %s » n'a pas d'entrée auxiliaire"
-#: xcofflink.c:1317
+#: xcofflink.c:1319
#, c-format
msgid "%s: symbol `%s' has unrecognized csect type %d"
msgstr "%s: symbole « %s » a un type csect non reconnu %d"
-#: xcofflink.c:1329
+#: xcofflink.c:1331
#, c-format
msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
msgstr "%s: symbole XTY_ER erroné « %s »: classe %d scnum %d scnlen %d"
-#: xcofflink.c:1365
+#: xcofflink.c:1367
#, c-format
msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
msgstr "%s: XMC_TC0 symbol « %s » est la classe %d scnlen %d"
-#: xcofflink.c:1517
+#: xcofflink.c:1519
#, c-format
msgid "%s: csect `%s' not in enclosing section"
msgstr "%s: csect « %s » n'est pas dans un section fermée"
-#: xcofflink.c:1624
+#: xcofflink.c:1626
#, c-format
msgid "%s: misplaced XTY_LD `%s'"
msgstr "%s: XTY_LD mal placé « %s »"
-#: xcofflink.c:1948
+#: xcofflink.c:1957
#, c-format
msgid "%s: reloc %s:%d not in csect"
msgstr "%s: relocalisation %s:%d n'est pas dans csect"
-#: xcofflink.c:2083
+#: xcofflink.c:2092
#, c-format
msgid "%s: XCOFF shared object when not producing XCOFF output"
msgstr "%s: objet XCOFF partagé sans être en production de sortie XCOFF"
-#: xcofflink.c:2104
+#: xcofflink.c:2113
#, c-format
msgid "%s: dynamic object with no .loader section"
msgstr "%s: objet dynamique sans section .loader"
-#: xcofflink.c:2749
+#: xcofflink.c:2758
#, c-format
msgid "%s: no such symbol"
msgstr "%s: pas de tel symbole"
-#: xcofflink.c:2890
+#: xcofflink.c:2891
msgid "error: undefined symbol __rtinit"
msgstr "erreur: symbole __rtinit indéfini"
-#: xcofflink.c:3458
+#: xcofflink.c:3453
#, c-format
msgid "warning: attempt to export undefined symbol `%s'"
msgstr "AVERTISSEMENT: tentative d'exportation d'un symbole indéfini « %s »"
-#: xcofflink.c:4452
+#: xcofflink.c:4447
#, c-format
msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
msgstr "Débordement de la table des entrées: 0x%lx > 0x10000; essayer l'option -mminimal-toc"
-#: xcofflink.c:5292 xcofflink.c:5754 xcofflink.c:5816 xcofflink.c:6117
+#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
#, c-format
msgid "%s: loader reloc in unrecognized section `%s'"
msgstr "%s: chargeur de relocalisation dans une section non reconnnue « %s »"
-#: xcofflink.c:5314 xcofflink.c:6128
+#: xcofflink.c:5309 xcofflink.c:6130
#, c-format
msgid "%s: `%s' in loader reloc but not loader sym"
msgstr "%s: « %s » est dans le chargeur de relocalisation mais pas dans celui des symboles"
-#: xcofflink.c:5329
+#: xcofflink.c:5324
#, c-format
msgid "%s: loader reloc in read-only section %s"
msgstr "%s: chargeur de relocalisation dans un section en lecture seulement %s"
-#: elf32-ia64.c:2190 elf64-ia64.c:2190
+#: elf32-ia64.c:2222 elf64-ia64.c:2222
msgid "@pltoff reloc against local symbol"
msgstr "relocalisation @pltoff vers un symbole local"
-#: elf32-ia64.c:2248 elf64-ia64.c:2248
-msgid "non-zero addend in @fptr reloc"
-msgstr "ajout non null dans la relocalisation @fptr"
-
-#: elf32-ia64.c:3414 elf64-ia64.c:3414
+#: elf32-ia64.c:3562 elf64-ia64.c:3562
#, c-format
msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
msgstr "%s: débordement du segment de données court (0x%lx >= 0x400000)"
-#: elf32-ia64.c:3425 elf64-ia64.c:3425
+#: elf32-ia64.c:3573 elf64-ia64.c:3573
#, c-format
msgid "%s: __gp does not cover short data segment"
msgstr "%s: __gp ne couvre pas ce segment de données court"
-#: elf32-ia64.c:3729 elf64-ia64.c:3729
+#: elf32-ia64.c:3858 elf64-ia64.c:3858
#, c-format
msgid "%s: linking non-pic code in a shared library"
msgstr "%s: liaison de code non-pic dans une librairie partagée"
-#: elf32-ia64.c:3762 elf64-ia64.c:3762
+#: elf32-ia64.c:3891 elf64-ia64.c:3891
#, c-format
msgid "%s: @gprel relocation against dynamic symbol %s"
msgstr "%s: relocalisation @gprel vers le symbole dynamique %s"
-#: elf32-ia64.c:3901 elf64-ia64.c:3901
+#: elf32-ia64.c:4030 elf64-ia64.c:4030
#, c-format
msgid "%s: dynamic relocation against speculation fixup"
msgstr "%s: relocalisation dynamique vers un correctif spéculé"
-#: elf32-ia64.c:3909 elf64-ia64.c:3909
+#: elf32-ia64.c:4038 elf64-ia64.c:4038
#, c-format
msgid "%s: speculation fixup against undefined weak symbol"
msgstr "%s: correctif spéculé vers un symbole faible indéfini"
-#: elf32-ia64.c:4093 elf64-ia64.c:4093
+#: elf32-ia64.c:4271 elf64-ia64.c:4271
msgid "unsupported reloc"
msgstr "relocalisation non supporté"
-#: elf32-ia64.c:4373 elf64-ia64.c:4373
+#: elf32-ia64.c:4551 elf64-ia64.c:4551
#, c-format
msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
msgstr "%s: édition de liens trap-on-NULL-dereference avec des fichiers non-trapping"
-#: elf32-ia64.c:4382 elf64-ia64.c:4382
+#: elf32-ia64.c:4560 elf64-ia64.c:4560
#, c-format
msgid "%s: linking big-endian files with little-endian files"
msgstr ""
"%s: édition de liens pour des fichiers en système à octets de poids fort\n"
"avec des fichiers pour des systèmes à octets de poids faible"
-#: elf32-ia64.c:4391 elf64-ia64.c:4391
+#: elf32-ia64.c:4569 elf64-ia64.c:4569
#, c-format
msgid "%s: linking 64-bit files with 32-bit files"
msgstr "%s: édition de liens de fichiers de 64 bits avec des fichiers de 32 bits"
-#: elf32-ia64.c:4400 elf64-ia64.c:4400
+#: elf32-ia64.c:4578 elf64-ia64.c:4578
#, c-format
msgid "%s: linking constant-gp files with non-constant-gp files"
msgstr "%s: édition de liens de fichiers constant-gp avec des fichier non-constant-gp"
-#: elf32-ia64.c:4410 elf64-ia64.c:4410
+#: elf32-ia64.c:4588 elf64-ia64.c:4588
#, c-format
msgid "%s: linking auto-pic files with non-auto-pic files"
msgstr "%s: édition de liens de fichiers auto-pic avec des fichiers non-auto-pic"
-#: peigen.c:964 pepigen.c:964
+#: peigen.c:962 pepigen.c:962
#, c-format
msgid "%s: line number overflow: 0x%lx > 0xffff"
msgstr "%s: débordement du nombre de lignes: 0x%lx > 0xffff"
-#: peigen.c:981 pepigen.c:981
+#: peigen.c:979 pepigen.c:979
#, c-format
msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
msgstr "%s: débordement de la relocalisation 1: 0x%lx > 0xffff"
-#: peigen.c:995 pepigen.c:995
+#: peigen.c:993 pepigen.c:993
msgid "Export Directory [.edata (or where ever we found it)]"
msgstr "Répertoire d'exportation [.edata (ou là où il a été repéré)]"
-#: peigen.c:996 pepigen.c:996
+#: peigen.c:994 pepigen.c:994
msgid "Import Directory [parts of .idata]"
msgstr "Répertoire d'importation [faisant partie de .idata]"
-#: peigen.c:997 pepigen.c:997
+#: peigen.c:995 pepigen.c:995
msgid "Resource Directory [.rsrc]"
msgstr "Répertoire des resources [.rsrc]"
-#: peigen.c:998 pepigen.c:998
+#: peigen.c:996 pepigen.c:996
msgid "Exception Directory [.pdata]"
msgstr "Répertoire des exceptions [.pdata]"
-#: peigen.c:999 pepigen.c:999
+#: peigen.c:997 pepigen.c:997
msgid "Security Directory"
msgstr "Répertoire de la sécurité"
-#: peigen.c:1000 pepigen.c:1000
+#: peigen.c:998 pepigen.c:998
msgid "Base Relocation Directory [.reloc]"
msgstr "Répertoire de base de relocalisation [.reloc]"
-#: peigen.c:1001 pepigen.c:1001
+#: peigen.c:999 pepigen.c:999
msgid "Debug Directory"
msgstr "Répertoire de débug"
-#: peigen.c:1002 pepigen.c:1002
+#: peigen.c:1000 pepigen.c:1000
msgid "Description Directory"
msgstr "Répertoire de description"
-#: peigen.c:1003 pepigen.c:1003
+#: peigen.c:1001 pepigen.c:1001
msgid "Special Directory"
msgstr "Répertoire spécial"
-#: peigen.c:1004 pepigen.c:1004
+#: peigen.c:1002 pepigen.c:1002
msgid "Thread Storage Directory [.tls]"
msgstr "Répertoire des files de stockage [.tls]"
-#: peigen.c:1005 pepigen.c:1005
+#: peigen.c:1003 pepigen.c:1003
msgid "Load Configuration Directory"
msgstr "Répertoire de chargement de configuration"
-#: peigen.c:1006 pepigen.c:1006
+#: peigen.c:1004 pepigen.c:1004
msgid "Bound Import Directory"
msgstr "Répertoire des importations limitées"
-#: peigen.c:1007 pepigen.c:1007
+#: peigen.c:1005 pepigen.c:1005
msgid "Import Address Table Directory"
msgstr "Répertoire de la table d'adresse d'importation"
-#: peigen.c:1008 pepigen.c:1008
+#: peigen.c:1006 pepigen.c:1006
msgid "Delay Import Directory"
msgstr "Répertoire des délais d'importation"
-#: peigen.c:1009 peigen.c:1010 pepigen.c:1009 pepigen.c:1010
+#: peigen.c:1007 peigen.c:1008 pepigen.c:1007 pepigen.c:1008
msgid "Reserved"
msgstr "Réservé"
-#: peigen.c:1073 pepigen.c:1073
+#: peigen.c:1071 pepigen.c:1071
msgid ""
"\n"
"There is an import table, but the section containing it could not be found\n"
"\n"
"Il y a une table d'importation, mais la section la contenant ne peut être repérée\n"
-#: peigen.c:1078 pepigen.c:1078
+#: peigen.c:1076 pepigen.c:1076
#, c-format
msgid ""
"\n"
"\n"
"Il y a une table d'importation dans %s à 0x%lx\n"
-#: peigen.c:1115 pepigen.c:1115
+#: peigen.c:1113 pepigen.c:1113
#, c-format
msgid ""
"\n"
"\n"
"Descripteur de fonction localisé à l'adresse de départ: %04lx\n"
-#: peigen.c:1118 pepigen.c:1118
+#: peigen.c:1116 pepigen.c:1116
#, c-format
msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
msgstr "\tcode-base %08lx tab. des entrées (chargeable/actuel) %08lx/%08lx\n"
-#: peigen.c:1124 pepigen.c:1124
+#: peigen.c:1122 pepigen.c:1122
msgid ""
"\n"
"No reldata section! Function descriptor not decoded.\n"
"\n"
"Pas de section reldata! Descripteur de fonction n'a pas été décodé.\n"
-#: peigen.c:1129 pepigen.c:1129
+#: peigen.c:1127 pepigen.c:1127
#, c-format
msgid ""
"\n"
"\n"
"Les tables d'importation (contenus interprétés de la section %s)\n"
-#: peigen.c:1132 pepigen.c:1132
-msgid " vma: Hint Time Forward DLL First\n"
-msgstr " vma: Hint Heure Forward DLL Premier\n"
-
-#: peigen.c:1134 pepigen.c:1134
-msgid " Table Stamp Chain Name Thunk\n"
-msgstr " Table Tampon Chaîne Nom Thunk\n"
+#: peigen.c:1130 pepigen.c:1130
+msgid ""
+" vma: Hint Time Forward DLL First\n"
+" Table Stamp Chain Name Thunk\n"
+msgstr ""
+" vma: Hint Temps Avant DLL Premier\n"
+" Table Estampil. Chaîne Nom Thunk\n"
-#: peigen.c:1182 pepigen.c:1182
+#: peigen.c:1181 pepigen.c:1181
#, c-format
msgid ""
"\n"
"\n"
"\tNom DLL: %s\n"
-#: peigen.c:1186 peigen.c:1249 pepigen.c:1186 pepigen.c:1249
-msgid "\tvma: Hint/Ord Member-Name\n"
-msgstr "\tvma: Hint/Nom-de-membre nombre ordinal\n"
-
-#: peigen.c:1248 pepigen.c:1248
-msgid "\tThe Import Address Table (difference found)\n"
-msgstr "\tL'adresse de la table d'importation (différence détectée)\n"
+#: peigen.c:1192 pepigen.c:1192
+msgid "\tvma: Hint/Ord Member-Name Bound-To\n"
+msgstr "\tvma: Hint/Ord Membre Lien\n"
-#: peigen.c:1255 pepigen.c:1255
-msgid "\t>>> Ran out of IAT members!\n"
-msgstr "\t>>> membres IAT tous utilisés!\n"
-
-#: peigen.c:1273 pepigen.c:1273
-msgid "\tThe Import Address Table is identical\n"
-msgstr "\tL'adresse de la table d'importation est identique\n"
+#: peigen.c:1217 pepigen.c:1217
+msgid ""
+"\n"
+"There is a first thunk, but the section containing it could not be found\n"
+msgstr ""
+"\n"
+"Il y a un premier « thunk », mais la section le contenant ne peut être repérée\n"
-#: peigen.c:1345 pepigen.c:1345
+#: peigen.c:1357 pepigen.c:1357
msgid ""
"\n"
"There is an export table, but the section containing it could not be found\n"
"\n"
"Il y a une table d'exportation, mais la section la contenant n'a pu être repérée\n"
-#: peigen.c:1350 pepigen.c:1350
+#: peigen.c:1362 pepigen.c:1362
#, c-format
msgid ""
"\n"
"\n"
"Il y a une table d'exportation dans %s à 0x%lx\n"
-#: peigen.c:1381 pepigen.c:1381
+#: peigen.c:1393 pepigen.c:1393
#, c-format
msgid ""
"\n"
"Les tables d'exportation (contenus interprétés de la section %s)\n"
"\n"
-#: peigen.c:1385 pepigen.c:1385
+#: peigen.c:1397 pepigen.c:1397
#, c-format
msgid "Export Flags \t\t\t%lx\n"
msgstr "Fanion d'exportation \t\t\t%lx\n"
-#: peigen.c:1388 pepigen.c:1388
+#: peigen.c:1400 pepigen.c:1400
#, c-format
msgid "Time/Date stamp \t\t%lx\n"
msgstr "Tampon Heure/Date \t\t%lx\n"
-#: peigen.c:1391 pepigen.c:1391
+#: peigen.c:1403 pepigen.c:1403
#, c-format
msgid "Major/Minor \t\t\t%d/%d\n"
msgstr "Majeur/Mineur \t\t\t%d/%d\n"
-#: peigen.c:1394 pepigen.c:1394
+#: peigen.c:1406 pepigen.c:1406
msgid "Name \t\t\t\t"
msgstr "Nom \t\t\t\t"
-#: peigen.c:1400 pepigen.c:1400
+#: peigen.c:1412 pepigen.c:1412
#, c-format
msgid "Ordinal Base \t\t\t%ld\n"
msgstr "base de nombre ordinal \t\t\t%ld\n"
-#: peigen.c:1403 pepigen.c:1403
+#: peigen.c:1415 pepigen.c:1415
msgid "Number in:\n"
msgstr "Numéro dans:\n"
-#: peigen.c:1406 pepigen.c:1406
+#: peigen.c:1418 pepigen.c:1418
#, c-format
msgid "\tExport Address Table \t\t%08lx\n"
msgstr "\tTable d'adresses d'exportation \t\t%08lx\n"
-#: peigen.c:1410 pepigen.c:1410
+#: peigen.c:1422 pepigen.c:1422
#, c-format
msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
msgstr "\tTable de noms [Pointeur/Nombre ordinal]\t%08lx\n"
-#: peigen.c:1413 pepigen.c:1413
+#: peigen.c:1425 pepigen.c:1425
msgid "Table Addresses\n"
msgstr "Table d'adresses\n"
-#: peigen.c:1416 pepigen.c:1416
+#: peigen.c:1428 pepigen.c:1428
msgid "\tExport Address Table \t\t"
msgstr "\tTable d'adresse d'exportation \t\t"
-#: peigen.c:1421 pepigen.c:1421
+#: peigen.c:1433 pepigen.c:1433
msgid "\tName Pointer Table \t\t"
msgstr "\tTable des noms de pointeurs \t\t"
-#: peigen.c:1426 pepigen.c:1426
+#: peigen.c:1438 pepigen.c:1438
msgid "\tOrdinal Table \t\t\t"
msgstr "\tTable des ordinals \t\t\t"
-#: peigen.c:1441 pepigen.c:1441
+#: peigen.c:1453 pepigen.c:1453
#, c-format
msgid ""
"\n"
"\n"
"Table d'adresses d'exportation -- base de nombre ordinal %ld\n"
-#: peigen.c:1460 pepigen.c:1460
+#: peigen.c:1472 pepigen.c:1472
msgid "Forwarder RVA"
msgstr "Adresseur RVA"
-#: peigen.c:1471 pepigen.c:1471
+#: peigen.c:1483 pepigen.c:1483
msgid "Export RVA"
msgstr "Exportation RVA"
-#: peigen.c:1478 pepigen.c:1478
+#: peigen.c:1490 pepigen.c:1490
msgid ""
"\n"
"[Ordinal/Name Pointer] Table\n"
"\n"
"Table [Ordinal/Nom de pointeurs]\n"
-#: peigen.c:1533 pepigen.c:1533
+#: peigen.c:1545 pepigen.c:1545
#, c-format
msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
msgstr "AVERTISSEMENT, taille de la section .pdata (%ld) n'est pas un multiple de %d\n"
-#: peigen.c:1537 pepigen.c:1537
+#: peigen.c:1549 pepigen.c:1549
msgid ""
"\n"
"The Function Table (interpreted .pdata section contents)\n"
"\n"
"La table de fonctions (interprétation du contenu de la section .pdata)\n"
-#: peigen.c:1540 pepigen.c:1540
+#: peigen.c:1552 pepigen.c:1552
msgid " vma:\t\t\tBegin Address End Address Unwind Info\n"
msgstr " vma:\t\t\tDébut Adresse Fin Adresse Unwind Info\n"
-#: peigen.c:1543 pepigen.c:1543
-msgid " vma:\t\tBegin End EH EH PrologEnd Exception\n"
-msgstr " vma:\t\tDébut Fin EH EH FinProlog Exception\n"
-
-#: peigen.c:1545 pepigen.c:1545
-msgid " \t\tAddress Address Handler Data Address Mask\n"
-msgstr " \t\tAdresse Adresse Routine Données Adresse Masque\n"
+#: peigen.c:1554 pepigen.c:1554
+msgid ""
+" vma:\t\tBegin End EH EH PrologEnd Exception\n"
+" \t\tAddress Address Handler Data Address Mask\n"
+msgstr ""
+" vma:\t\tDébut Fin EH EH FinProlog Exception\n"
+" \t\tAdresse Adresse Handler Données Adresse Masque\n"
-#: peigen.c:1613 pepigen.c:1613
+#: peigen.c:1624 pepigen.c:1624
msgid " Register save millicode"
msgstr " Registre a préservé le millicode"
-#: peigen.c:1616 pepigen.c:1616
+#: peigen.c:1627 pepigen.c:1627
msgid " Register restore millicode"
msgstr " Registre a restauré le millicode"
-#: peigen.c:1619 pepigen.c:1619
+#: peigen.c:1630 pepigen.c:1630
msgid " Glue code sequence"
msgstr " Séquence du code de liants"
-#: peigen.c:1671 pepigen.c:1671
+#: peigen.c:1682 pepigen.c:1682
msgid ""
"\n"
"\n"
"\n"
"Fichier de base des relocalisation PE (contenus interprétés de la section .reloc)\n"
-#: peigen.c:1701 pepigen.c:1701
+#: peigen.c:1712 pepigen.c:1712
#, c-format
msgid ""
"\n"
"\n"
"Adresse virtuelle: %08lx taille des morceaux %ld (0x%lx) nombre de correctifs %ld\n"
-#: peigen.c:1714 pepigen.c:1714
+#: peigen.c:1725 pepigen.c:1725
#, c-format
msgid "\treloc %4d offset %4x [%4lx] %s"
msgstr "\trelocalisation %4d décalage %4x [%4lx] %s"
#. The MS dumpbin program reportedly ands with 0xff0f before
#. printing the characteristics field. Not sure why. No reason to
#. emulate it here.
-#: peigen.c:1754 pepigen.c:1754
+#: peigen.c:1765 pepigen.c:1765
#, c-format
msgid ""
"\n"
"\n"
"Caractéristiques 0x%x\n"
-#~ msgid "float"
-#~ msgstr "flottant"
+#~ msgid "\tThe Import Address Table (difference found)\n"
+#~ msgstr "\tL'adresse de la table d'importation (différence détectée)\n"
+
+#~ msgid "\t>>> Ran out of IAT members!\n"
+#~ msgstr "\t>>> membres IAT tous utilisés!\n"
+
+#~ msgid "\tThe Import Address Table is identical\n"
+#~ msgstr "\tL'adresse de la table d'importation est identique\n"
+
+#~ msgid "GP relative relocation when GP not defined"
+#~ msgstr "GP relocalisation relative alors que GP n'est pas défini"
+
+#~ msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers"
+#~ msgstr "%s: ERREUR: passage de valeurs en virgule flottante dans des registreen virgule flottance alors que la cible %s utilise des registres de valeursentières"
+
+#~ msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers"
+#~ msgstr "%s: ERREUR: passage de valeurs en virgule flottante dans des registreen valeur entière alors que la cible %s utilise des registres de valeursen virgule flottante"
+
+#~ msgid "Warning: input file %s supports interworking, whereas %s does not."
+#~ msgstr "AVERTISSEMENT: file d'entrée %s supporte l'inter-réseautage, contrairement à %s."
+
+#~ msgid "Warning: input file %s does not support interworking, whereas %s does."
+#~ msgstr "AVERTISSEMENT: fichier d'entrée %s ne supporte pas l'inter-réseautage, contrairement à %s."
+
+#~ msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
+#~ msgstr "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld prochain %ld"
+
+#~ msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"
+#~ msgstr "elf_symbol_from_bfd_symbol 0x%.8lx, nom = %s, no. de symbole = %d, fanions = 0x%.8lx%s\n"
+
+#~ msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"
+#~ msgstr "AVERTISSEMENT: pas d'initialisation du fanion d'inter-réseautage %s alors qu'il a déjè été spécifié sans inter-réseautage"
+
+#~ msgid "Warning: Clearing the interwork flag of %s due to outside request"
+#~ msgstr "AVERTISSEMENT: mise à zéro du fanion d'inter-réseautage %s en raison d'une requête externe"
+
+#~ msgid " [APCS-26]"
+#~ msgstr " [APCS-26]"
+
+#~ msgid " [APCS-32]"
+#~ msgstr " [APCS-32]"
+
+#~ msgid "(unknown)"
+#~ msgstr "(inconnu)"
+
+#~ msgid " previously %s in %s"
+#~ msgstr " précédemment %s dans %s"
+
+#~ msgid "Symbol `%s' has differing types: %s in %s"
+#~ msgstr "Symbole « %s » a des types qui diffèrent: %s dans %s"
+
+#~ msgid "ETIR_S_C_STO_GBL: no symbol \"%s\""
+#~ msgstr "ETIR_S_C_STO_GBL: pas de symbole « %s »"
+
+#~ msgid "ETIR_S_C_STO_CA: no symbol \"%s\""
+#~ msgstr "ETIR_S_C_STO_CA: pas de symbole « %s »"
+
+#~ msgid "ETIR_S_C_STO_RB/AB: Not supported"
+#~ msgstr "ETIR_S_C_STO_RB/AB: non supporté"
+
+#~ msgid "ETIR_S_C_STO_LP_PSB: Not supported"
+#~ msgstr "ETIR_S_C_STO_LP_PSB: non supporté"
+
+#~ msgid "ETIR_S_C_STO_HINT_GBL: not implemented"
+#~ msgstr "ETIR_S_C_STO_HINT_GBL: pas implanté"
+
+#~ msgid "ETIR_S_C_STO_HINT_PS: not implemented"
+#~ msgstr "ETIR_S_C_STO_HINT_PS: pas implanté"
+
+#~ msgid "ETIR_S_C_OPR_INSV: Not supported"
+#~ msgstr "ETIR_S_C_OPR_INSV: non supporté"
+
+#~ msgid "ETIR_S_C_OPR_USH: Not supported"
+#~ msgstr "ETIR_S_C_OPR_USH: non supporté"
+
+#~ msgid "ETIR_S_C_OPR_ROT: Not supported"
+#~ msgstr "ETIR_S_C_OPR_ROT: non supporté"
+
+#~ msgid "ETIR_S_C_OPR_REDEF: Not supported"
+#~ msgstr "ETIR_S_C_OPR_REDEF: non supporté"
+
+#~ msgid "ETIR_S_C_OPR_DFLIT: Not supported"
+#~ msgstr "ETIR_S_C_OPR_DFLIT: non supporté"
+
+#~ msgid "ETIR_S_C_STC_LP: not supported"
+#~ msgstr "ETIR_S_C_STC_LP: non supporté"
+
+#~ msgid "ETIR_S_C_STC_GBL: not supported"
+#~ msgstr "ETIR_S_C_STC_GBL: non supporté"
+
+#~ msgid "ETIR_S_C_STC_GCA: not supported"
+#~ msgstr "ETIR_S_C_STC_GCA: non supporté"
+
+#~ msgid "ETIR_S_C_STC_PS: not supported"
+#~ msgstr "ETIR_S_C_STC_PS: non supporté"
+
+#~ msgid "Unimplemented STO cmd %d"
+#~ msgstr "Commande STO non implantée %d"
+
+#~ msgid "TIR_S_C_OPR_ASH incomplete"
+#~ msgstr "TIR_S_C_OPR_ASH incomplète"
+
+#~ msgid "TIR_S_C_OPR_USH incomplete"
+#~ msgstr "TIR_S_C_OPR_USH incomplète"
+
+#~ msgid "TIR_S_C_OPR_ROT incomplete"
+#~ msgstr "TIR_S_C_OPR_ROT incomplète"
+
+#~ msgid "TIR_S_C_OPR_REDEF not supported"
+#~ msgstr "TIR_S_C_OPR_REDEF non supporté"
+
+#~ msgid "TIR_S_C_OPR_DFLIT not supported"
+#~ msgstr "TIR_S_C_OPR_DFLIT non supporté"
+
+#~ msgid "TIR_S_C_CTL_DFLOC not fully implemented"
+#~ msgstr "TIR_S_C_CTL_DFLOC pas complètement implanté"
+
+#~ msgid "TIR_S_C_CTL_STLOC not fully implemented"
+#~ msgstr "TIR_S_C_CTL_STLOC pas complètement implanté"
+
+#~ msgid "TIR_S_C_CTL_STKDL not fully implemented"
+#~ msgstr "TIR_S_C_CTL_STKDL n'est pas complètement implanté"
+
+#~ msgid " vma: Hint Time Forward DLL First\n"
+#~ msgstr " vma: Hint Heure Forward DLL Premier\n"
+
+#~ msgid " \t\tAddress Address Handler Data Address Mask\n"
+#~ msgstr " \t\tAdresse Adresse Routine Données Adresse Masque\n"
#~ msgid "integer"
#~ msgstr "entier"
#~ msgid "supports"
#~ msgstr "supporte"
-#~ msgid "does not support"
-#~ msgstr "n'est pas supportée"
-
#~ msgid "does not"
#~ msgstr "n'est pas"
#~ msgid "%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections"
#~ msgstr "%s(%s+0x%lx): ne peut relocaliser %s, recompiler avec -ffunction-sections"
-#~ msgid "Symbol `%s' has differing types: previously %s, REGISTER in %s"
-#~ msgstr "Symbole `%s' a des types qui diffèrent: précédemment %s, ENREGISTRÉ dans %s"
-
#~ msgid "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n"
#~ msgstr "création de la section des symboles, nom = %s, valeur = 0x%.8lx, index = %d, section = 0x%.8lx\n"
#
msgid ""
msgstr ""
-"Project-Id-Version: bfd 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-31 17:07+0000\n"
-"PO-Revision-Date: 2002-01-30 02:35+0100\n"
+"Project-Id-Version: bfd 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-30 21:55+0200\n"
"Last-Translator: Christian Rose <menthos@menthos.com>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: aout-adobe.c:196
+#: aout-adobe.c:197
#, c-format
msgid "%s: Unknown section type in a.out.adobe file: %x\n"
msgstr "%s: Okänd sektionstyp i a.out.adobe-fil: %x\n"
#: aoutx.h:1669
#, c-format
-msgid ""
-"%s: can not represent section for symbol `%s' in a.out object file format"
-msgstr ""
-"%s: kan inte representera sektion för symbolen \"%s\" i a.out-objektfilformat"
+msgid "%s: can not represent section for symbol `%s' in a.out object file format"
+msgstr "%s: kan inte representera sektion för symbolen \"%s\" i a.out-objektfilformat"
#: aoutx.h:1671
msgid "*unknown*"
msgstr "*okänd*"
-#: aoutx.h:3735
+#: aoutx.h:3732
#, c-format
msgid "%s: relocateable link from %s to %s not supported"
msgstr "%s: omlokaliseringsbar länk från %s till %s stöds inte"
#: binary.c:306
#, c-format
msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
-msgstr ""
-"Varning: Skrivning av sektionen \"%s\" till enormt (dvs negativt) avlägsen "
-"byte 0x%lx."
+msgstr "Varning: Skrivning av sektionen \"%s\" till enormt (dvs negativt) avlägsen byte 0x%lx."
# src/menus.c:341
#: coff-a29k.c:119
msgid "Missing IHIHALF"
msgstr "IHIHALF saknas"
-#: coff-a29k.c:212 coff-or32.c:228
+#: coff-a29k.c:212 coff-or32.c:229
msgid "Unrecognized reloc"
msgstr "Okänd omlokalisering"
msgid "missing IHIHALF reloc"
msgstr "IHIHALF-omlokalisering saknas"
-#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1433
+#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1432
msgid "GP relative relocation used when GP not defined"
msgstr "GP-relativ omlokalisering användes då GP inte är definierad"
msgid "using multiple gp values"
msgstr "använder flera gp-värden"
-#: coff-arm.c:1051 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:285
#, c-format
msgid "%s: unable to find THUMB glue '%s' for `%s'"
msgstr "%s: kunde inte hitta THUMB-klistret \"%s\" till \"%s\""
-#: coff-arm.c:1080 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:320
#, c-format
msgid "%s: unable to find ARM glue '%s' for `%s'"
msgstr "%s: kunde inte hitta ARM-klistret \"%s\" till \"%s\""
-#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990
+#: coff-arm.c:1391 coff-arm.c:1486 elf32-arm.h:887 elf32-arm.h:991
#, c-format
msgid "%s(%s): warning: interworking not enabled."
msgstr "%s(%s): varning: samverkande är inte aktiverat."
-#: coff-arm.c:1379 elf32-arm.h:993
+#: coff-arm.c:1395 elf32-arm.h:994
#, c-format
msgid " first occurrence: %s: arm call to thumb"
msgstr " första förekomst: %s: arm-anrop till thumb"
-#: coff-arm.c:1474 elf32-arm.h:889
+#: coff-arm.c:1490 elf32-arm.h:890
#, c-format
msgid " first occurrence: %s: thumb call to arm"
msgstr " första förekomst: %s: thumb-anrop till arm"
-#: coff-arm.c:1477
+#: coff-arm.c:1493
msgid " consider relinking with --support-old-code enabled"
msgstr " överväg omlänkning med --support-old-code aktiverat"
-#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017
+#: coff-arm.c:1785 coff-tic80.c:686 cofflink.c:3031
#, c-format
msgid "%s: bad reloc address 0x%lx in section `%s'"
msgstr "%s: felaktig omlokaliseringsadress 0x%lx i sektionen \"%s\""
-#: coff-arm.c:2107
+#: coff-arm.c:2127
#, c-format
msgid "%s: illegal symbol index in reloc: %d"
msgstr "%s: otillåtet symbolindex i omlokalisering: %d"
-#: coff-arm.c:2235
+#: coff-arm.c:2255
#, c-format
-msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"
-msgstr "%s: FEL: kompilerad för APCS-%d där målet %s använder APCS-%d"
+msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
+msgstr "FEL: %s kompilerad för APCS-%d, medan %s är kompilerad för APCS-%d"
-#: coff-arm.c:2250
+#: coff-arm.c:2270 elf32-arm.h:2297
#, c-format
-msgid ""
-"%s: ERROR: passes floats in float registers whereas target %s uses integer "
-"registers"
-msgstr ""
-"%s: FEL: skickar flyttal i flyttalsregister där målet %s istället använder "
-"heltalsregister"
+msgid "ERROR: %s passes floats in float registers, whereas %s passes them in integer registers"
+msgstr "FEL: %s skickar flyttal i flyttalsregister, medan %s skickar dem i heltalsregister"
-#: coff-arm.c:2253
+#: coff-arm.c:2273 elf32-arm.h:2302
#, c-format
-msgid ""
-"%s: ERROR: passes floats in integer registers whereas target %s uses float "
-"registers"
-msgstr ""
-"%s: FEL: skickar flyttal i heltalsregister där målet %s istället använder "
-"flyttalsregister"
+msgid "ERROR: %s passes floats in integer registers, whereas %s passes them in float registers"
+msgstr "FEL: %s skickar flyttal i heltalsregister, medan %s skickar dem i flyttalsregister"
-#: coff-arm.c:2268
+#: coff-arm.c:2288
#, c-format
-msgid ""
-"%s: ERROR: compiled as position independent code, whereas target %s is "
-"absolute position"
-msgstr ""
-"%s: FEL: kompilerad som positionsoberoende kod, där målet %s istället har "
-"absolut position"
+msgid "ERROR: %s is compiled as position independent code, whereas target %s is absolute position"
+msgstr "FEL: %s är kompilerad som positionsoberoende kod, medan målet %s har absolut position"
-#: coff-arm.c:2271
+#: coff-arm.c:2291
#, c-format
-msgid ""
-"%s: ERROR: compiled as absolute position code, whereas target %s is position "
-"independent"
-msgstr ""
-"%s: FEL: kompilerad som kod med absolut position, där målet %s istället är "
-"positionsoberoende"
+msgid "ERROR: %s is compiled as absolute position code, whereas target %s is position independent"
+msgstr "FEL: %s är kompilerad som kod med absolut position, medan målet %s är positionsoberoende"
-#: coff-arm.c:2300
-#, fuzzy, c-format
-msgid "Warning: %s supports interworking, whereas %s does not."
+#: coff-arm.c:2320 elf32-arm.h:2358
+#, c-format
+msgid "Warning: %s supports interworking, whereas %s does not"
msgstr "Varning: %s stöder samverkande, medan %s däremot inte gör det"
-#: coff-arm.c:2303
-#, fuzzy, c-format
-msgid "Warning: %s does not support interworking, whereas %s does."
+#: coff-arm.c:2323 elf32-arm.h:2365
+#, c-format
+msgid "Warning: %s does not support interworking, whereas %s does"
msgstr "Varning: %s stöder inte samverkande, medan %s däremot gör det"
-#: coff-arm.c:2330
+#: coff-arm.c:2350
#, c-format
msgid "private flags = %x:"
msgstr "privata flaggor = %x:"
-#: coff-arm.c:2338 elf32-arm.h:2408
+#: coff-arm.c:2358 elf32-arm.h:2418
msgid " [floats passed in float registers]"
msgstr " [flyttal skickade i flyttalsregister]"
-#: coff-arm.c:2340
+#: coff-arm.c:2360
msgid " [floats passed in integer registers]"
msgstr " [flyttal skickade i heltalsregister]"
-#: coff-arm.c:2343 elf32-arm.h:2411
+#: coff-arm.c:2363 elf32-arm.h:2421
msgid " [position independent]"
msgstr " [positionsoberoende]"
-#: coff-arm.c:2345
+#: coff-arm.c:2365
msgid " [absolute position]"
msgstr " [absolut position]"
-#: coff-arm.c:2349
+#: coff-arm.c:2369
msgid " [interworking flag not initialised]"
msgstr " [samverkandeflagga är inte initierad]"
-#: coff-arm.c:2351
+#: coff-arm.c:2371
msgid " [interworking supported]"
msgstr " [samverkan stöds]"
-#: coff-arm.c:2353
+#: coff-arm.c:2373
msgid " [interworking not supported]"
msgstr " [samverkan stöds inte]"
-#: coff-arm.c:2401 elf32-arm.h:2114
-#, fuzzy, c-format
-msgid ""
-"Warning: Not setting interworking flag of %s since it has already been "
-"specified as non-interworking"
-msgstr ""
-"Varning: Ställer inte in samverkansflaggan för %s, eftersom den redan har "
-"angivits som inte samverkande"
+#: coff-arm.c:2421 elf32-arm.h:2124
+#, c-format
+msgid "Warning: Not setting interworking flag of %s since it has already been specified as non-interworking"
+msgstr "Varning: Ställer inte in samverkansflaggan för %s eftersom den redan har angivits som inte samverkande"
-#: coff-arm.c:2405 elf32-arm.h:2118
+#: coff-arm.c:2425 elf32-arm.h:2128
#, c-format
msgid "Warning: Clearing the interworking flag of %s due to outside request"
-msgstr ""
-"Varning: Stänger av samverkansflaggan för %s på grund av begäran utifrån"
+msgstr "Varning: Stänger av samverkansflaggan för %s på grund av begäran utifrån"
#: coff-i960.c:136 coff-i960.c:485
msgid "uncertain calling convention for non-COFF symbol"
msgstr "osäker anropskonvention för icke-COFF-symbol"
-#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2212 elf32-mips.c:9954
+#: coff-m68k.c:481 coff-mips.c:2429 elf32-m68k.c:2157 elf32-mips.c:1844
msgid "unsupported reloc type"
msgstr "omlokaliseringstypen stöds inte"
-#: coff-mips.c:875 elf32-mips.c:1997 elf64-mips.c:1739
+#: coff-mips.c:874 elf32-mips.c:1062 elf64-mips.c:1609
msgid "GP relative relocation when _gp not defined"
msgstr "GP-relativ omlokalisering då _gp inte var definierat"
#. No other sections should appear in -membedded-pic
#. code.
-#: coff-mips.c:2468
+#: coff-mips.c:2466
msgid "reloc against unsupported section"
msgstr "omlokalisering mot sektion som inte stöds"
-#: coff-mips.c:2476
+#: coff-mips.c:2474
msgid "reloc not properly aligned"
msgstr "omlokalisering inte på jämn gräns"
-#: coff-rs6000.c:2710 coff64-rs6000.c:1164
+#: coff-rs6000.c:2766
#, c-format
msgid "%s: unsupported relocation type 0x%02x"
msgstr "%s: omlokaliseringstypen 0x%02x stöds inte"
-#: coff-rs6000.c:2756 coff64-rs6000.c:1210
+#: coff-rs6000.c:2859
#, c-format
msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
-msgstr ""
-"%s: TOC-omlokalisering vid 0x%x till symbolen \"%s\" utan någon TOC-post"
+msgstr "%s: TOC-omlokalisering vid 0x%x till symbolen \"%s\" utan någon TOC-post"
-#: coff-rs6000.c:3006 coff64-rs6000.c:2060
+#: coff-rs6000.c:3590 coff64-rs6000.c:2091
#, c-format
msgid "%s: symbol `%s' has unrecognized smclas %d"
msgstr "%s: symbolen \"%s\" har okänd smclas %d"
msgid "Unrecognized reloc type 0x%x"
msgstr "Okänd omlokaliseringstyp 0x%x"
-#: coff-tic54x.c:390 coffcode.h:4868
+#: coff-tic54x.c:390 coffcode.h:4974
#, c-format
msgid "%s: warning: illegal symbol index %ld in relocs"
msgstr "%s: varning: otillåtet symbolindex %ld i omlokaliseringarna"
msgid "ignoring reloc %s\n"
msgstr "ignorerar omlokalisering %s\n"
-#: coffcode.h:1081
+#: coffcode.h:1086
#, c-format
msgid "%s (%s): Section flag %s (0x%x) ignored"
msgstr "%s (%s): Sektionsflaggan %s (0x%x) ignorerades"
-#: coffcode.h:2132
+#: coffcode.h:2143
#, c-format
msgid "Unrecognized TI COFF target id '0x%x'"
msgstr "Okänt TI COFF-målid \"0x%x\""
-#: coffcode.h:4257
+#: coffcode.h:4365
#, c-format
msgid "%s: warning: illegal symbol index %ld in line numbers"
msgstr "%s: varning: otillåtet symbolindex %ld i radnummer"
-#: coffcode.h:4271
+#: coffcode.h:4379
#, c-format
msgid "%s: warning: duplicate line number information for `%s'"
msgstr "%s: varning: dubbel radnummersinformation för \"%s\""
-#: coffcode.h:4630
+#: coffcode.h:4736
#, c-format
msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
msgstr "%s: Okänd lagringsklass %d för %s-symbolen \"%s\""
-#: coffcode.h:4761
+#: coffcode.h:4867
#, c-format
msgid "warning: %s: local symbol `%s' has no section"
msgstr "varning: %s: lokala symbolen \"%s\" har ingen sektion"
-#: coffcode.h:4906
+#: coffcode.h:5012
#, c-format
msgid "%s: illegal relocation type %d at address 0x%lx"
msgstr "%s: otillåten omlokaliseringstyp %d på adress 0x%lx"
msgid "%s: bad string table size %lu"
msgstr "%s: felaktig strängtabellstorlek %lu"
-#: cofflink.c:536 elflink.h:1967
+#: cofflink.c:534 elflink.h:1912
#, c-format
msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
msgstr "Varning: typen på symbolen \"%s\" ändrades från %d till %d i %s"
-#: cofflink.c:2317
+#: cofflink.c:2321
#, c-format
msgid "%s: relocs in section `%s', but it has no contents"
msgstr "%s: omlokaliseringar i sektionen \"%s\", men den har inget innehåll"
-#: cofflink.c:2653 coffswap.h:889
+#: cofflink.c:2664 coffswap.h:877
#, c-format
msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
msgstr "%s: %s: omlokalisering ger överspill: 0x%lx > 0xffff"
-#: cofflink.c:2662 coffswap.h:876
+#: cofflink.c:2673 coffswap.h:864
#, c-format
msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
msgstr "%s: varning: %s: radnummer ger överspill: 0x%lx > 0xffff"
-#: dwarf2.c:381
+#: dwarf2.c:382
msgid "Dwarf Error: Can't find .debug_str section."
msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_str."
-#: dwarf2.c:398
+#: dwarf2.c:399
#, c-format
-msgid ""
-"Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str "
-"size (%u)."
-msgstr ""
-"Dwarf-fel: DW_FORM_strp-avståndet (%u) större än eller lika med storleken "
-"på .debug_str (%u)."
+msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)."
+msgstr "Dwarf-fel: DW_FORM_strp-avståndet (%lu) större än eller lika med storleken på .debug_str (%lu)."
-#: dwarf2.c:542
+#: dwarf2.c:543
msgid "Dwarf Error: Can't find .debug_abbrev section."
msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_abbrev."
-#: dwarf2.c:559
-#, fuzzy, c-format
-msgid ""
-"Dwarf Error: Abbrev offset (%u) greater than or equal to .debug_abbrev size "
-"(%u)."
-msgstr ""
-"Dwarf-fel: Förkortningsavståndet (%u) större än eller lika med "
-"förkortningsstorleken (%u)."
+#: dwarf2.c:560
+#, c-format
+msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)."
+msgstr "Dwarf-fel: Förkortningsavståndet (%lu) större än eller lika med storleken .debug_abbrev (%lu)."
-#: dwarf2.c:756
+#: dwarf2.c:757
#, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %d."
-msgstr "Dwarf-fel: Ogiltig eller ohanterat FORM-värde: %d."
+msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
+msgstr "Dwarf-fel: Ogiltig eller ohanterat FORM-värde: %u."
-#: dwarf2.c:843
+#: dwarf2.c:852
msgid "Dwarf Error: mangled line number section (bad file number)."
msgstr "Dwarf-fel: trasig radnummerssektion (felaktigt filnummer)."
-#: dwarf2.c:929
+#: dwarf2.c:938
msgid "Dwarf Error: Can't find .debug_line section."
msgstr "Dwarf-fel: Kan inte hitta sektionen .debug_line."
-#: dwarf2.c:952
-#, fuzzy, c-format
-msgid ""
-"Dwarf Error: Line offset (%u) greater than or equal to .debug_line size (%u)."
-msgstr ""
-"Dwarf-fel: Radavståndet (%u) större än eller lika med radstorleken (%u)."
+#: dwarf2.c:961
+#, c-format
+msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)."
+msgstr "Dwarf-fel: Radavståndet (%lu) större än eller lika med storleken .debug_line (%lu)."
-#: dwarf2.c:1143
+#: dwarf2.c:1159
msgid "Dwarf Error: mangled line number section."
msgstr "Dwarf-fel: trasig radnummerssektion."
-#: dwarf2.c:1318 dwarf2.c:1529
+#: dwarf2.c:1355 dwarf2.c:1566
#, c-format
-msgid "Dwarf Error: Could not find abbrev number %d."
-msgstr "Dwarf-fel: Kunde inte hitta förkortningsnumret %d."
+msgid "Dwarf Error: Could not find abbrev number %u."
+msgstr "Dwarf-fel: Kunde inte hitta förkortningsnumret %u."
-#: dwarf2.c:1490
+#: dwarf2.c:1527
#, c-format
-msgid ""
-"Dwarf Error: found dwarf version '%hu', this reader only handles version 2 "
-"information."
-msgstr ""
-"Dwarf-fel: hittade dwarf version \"%hu\", denna läsare hanterar endast "
-"information från version 2."
+msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information."
+msgstr "Dwarf-fel: hittade dwarf version \"%u\", denna läsare hanterar endast information från version 2."
-#: dwarf2.c:1497
+#: dwarf2.c:1534
#, c-format
-msgid ""
-"Dwarf Error: found address size '%u', this reader can not handle sizes "
-"greater than '%u'."
-msgstr ""
-"Dwarf-fel: hittade adresstorleken \"%u\", denna läsare kan inte hantera "
-"storlekar större än \"%u\"."
+msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'."
+msgstr "Dwarf-fel: hittade adresstorleken \"%u\", denna läsare kan inte hantera storlekar större än \"%u\"."
-#: dwarf2.c:1520
+#: dwarf2.c:1557
#, c-format
-msgid "Dwarf Error: Bad abbrev number: %d."
-msgstr "Dwarf-fel: Felaktigt förkortningsnummer: %d."
+msgid "Dwarf Error: Bad abbrev number: %u."
+msgstr "Dwarf-fel: Felaktigt förkortningsnummer: %u."
-#: ecoff.c:1328
+#: ecoff.c:1318
#, c-format
msgid "Unknown basic type %d"
msgstr "Okänd grundtyp %d"
-#: ecoff.c:1597
+#: ecoff.c:1578
#, c-format
msgid ""
"\n"
"\n"
" Symbol slut+1: %ld"
-#: ecoff.c:1604 ecoff.c:1607
+#: ecoff.c:1585 ecoff.c:1588
#, c-format
msgid ""
"\n"
"\n"
" Första symbolen: %ld"
-#: ecoff.c:1619
+#: ecoff.c:1600
#, c-format
msgid ""
"\n"
"\n"
" Symbol slut+1: %-7ld Typ: %s"
-#: ecoff.c:1626
+#: ecoff.c:1607
#, c-format
msgid ""
"\n"
"\n"
" Lokal symbol: %ld"
-#: ecoff.c:1634
+#: ecoff.c:1615
#, c-format
msgid ""
"\n"
"\n"
" struct; symbol slut+1: %ld"
-#: ecoff.c:1639
+#: ecoff.c:1620
#, c-format
msgid ""
"\n"
"\n"
" union; symbol slut+1: %ld"
-#: ecoff.c:1644
+#: ecoff.c:1625
#, c-format
msgid ""
"\n"
"\n"
" enum; symbol slut+1: %ld"
-#: ecoff.c:1650
+#: ecoff.c:1631
#, c-format
msgid ""
"\n"
"\n"
" Typ: %s"
-#: elf-hppa.h:1366 elf-hppa.h:1399 elf32-ppc.c:3062 elf32-sh.c:3201
-#: elf64-x86-64.c:1275
+#: elf-hppa.h:1476 elf-hppa.h:1509 elf32-ppc.c:3091 elf32-sh.c:4213
+#: elf64-sh64.c:1659
#, c-format
-msgid ""
-"%s: warning: unresolvable relocation against symbol `%s' from %s section"
-msgstr ""
-"%s: varning: olöslig omlokalisering mot symbolen \"%s\" från sektionen %s"
+msgid "%s: warning: unresolvable relocation against symbol `%s' from %s section"
+msgstr "%s: varning: olöslig omlokalisering mot symbolen \"%s\" från sektionen %s"
-#: elf-m10200.c:463 elf-m10300.c:673 elf32-arm.h:2074 elf32-avr.c:835
-#: elf32-cris.c:1406 elf32-d10v.c:482 elf32-fr30.c:653 elf32-h8300.c:547
-#: elf32-i860.c:1048 elf32-m32r.c:1280 elf32-openrisc.c:455 elf32-v850.c:1691
-#: elf32-xstormy16.c:976 elf64-mmix.c:1164
+#: elf-m10200.c:446 elf-m10300.c:656 elf32-arm.h:2084 elf32-avr.c:833
+#: elf32-cris.c:1403 elf32-d10v.c:481 elf32-fr30.c:635 elf32-frv.c:809
+#: elf32-h8300.c:548 elf32-i860.c:1031 elf32-m32r.c:1278 elf32-openrisc.c:439
+#: elf32-v850.c:1691 elf32-xstormy16.c:933 elf64-mmix.c:1302
msgid "internal error: out of range error"
msgstr "internt fel: utanför intervallet"
-#: elf-m10200.c:467 elf-m10300.c:677 elf32-arm.h:2078 elf32-avr.c:839
-#: elf32-cris.c:1410 elf32-d10v.c:486 elf32-fr30.c:657 elf32-h8300.c:551
-#: elf32-i860.c:1052 elf32-m32r.c:1284 elf32-mips.c:7587 elf32-openrisc.c:459
-#: elf32-v850.c:1695 elf32-xstormy16.c:980 elf64-mips.c:4464 elf64-mmix.c:1168
+#: elf-m10200.c:450 elf-m10300.c:660 elf32-arm.h:2088 elf32-avr.c:837
+#: elf32-cris.c:1407 elf32-d10v.c:485 elf32-fr30.c:639 elf32-frv.c:813
+#: elf32-h8300.c:552 elf32-i860.c:1035 elf32-m32r.c:1282 elf32-openrisc.c:443
+#: elf32-v850.c:1695 elf32-xstormy16.c:937 elf64-mmix.c:1306 elfxx-mips.c:5264
msgid "internal error: unsupported relocation error"
msgstr "internt fel: omlokaliseringen stöds inte"
-#: elf-m10200.c:471 elf-m10300.c:681 elf32-arm.h:2082 elf32-d10v.c:490
-#: elf32-h8300.c:555 elf32-m32r.c:1288
+#: elf-m10200.c:454 elf-m10300.c:664 elf32-arm.h:2092 elf32-d10v.c:489
+#: elf32-h8300.c:556 elf32-m32r.c:1286
msgid "internal error: dangerous error"
msgstr "internt fel: farligt fel"
-#: elf-m10200.c:475 elf-m10300.c:685 elf32-arm.h:2086 elf32-avr.c:847
-#: elf32-cris.c:1418 elf32-d10v.c:494 elf32-fr30.c:665 elf32-h8300.c:559
-#: elf32-i860.c:1060 elf32-m32r.c:1292 elf32-openrisc.c:467 elf32-v850.c:1715
-#: elf32-xstormy16.c:988 elf64-mmix.c:1176
+#: elf-m10200.c:458 elf-m10300.c:668 elf32-arm.h:2096 elf32-avr.c:845
+#: elf32-cris.c:1415 elf32-d10v.c:493 elf32-fr30.c:647 elf32-frv.c:821
+#: elf32-h8300.c:560 elf32-i860.c:1043 elf32-m32r.c:1290 elf32-openrisc.c:451
+#: elf32-v850.c:1715 elf32-xstormy16.c:945 elf64-mmix.c:1314
msgid "internal error: unknown error"
msgstr "internt fel: okänt fel"
msgid "%s: invalid string offset %u >= %lu for section `%s'"
msgstr "%s: ogiltigt strängavstånd %u >= %lu för sektionen \"%s\""
-#: elf.c:448
+#: elf.c:589
#, c-format
msgid "%s: invalid SHT_GROUP entry"
msgstr "%s: ogiltig SHT_GROUP-post"
-#: elf.c:529
+#: elf.c:660
#, c-format
msgid "%s: no group info for section %s"
msgstr "%s: ingen gruppinformation för sektionen %s"
-#: elf.c:840
+#: elf.c:1023
msgid ""
"\n"
"Program Header:\n"
"\n"
"Programhuvud:\n"
-#: elf.c:889
+#: elf.c:1073
msgid ""
"\n"
"Dynamic Section:\n"
"\n"
"Dynamisk sektion:\n"
-#: elf.c:1018
+#: elf.c:1202
msgid ""
"\n"
"Version definitions:\n"
"\n"
"Versionsdefinitioner:\n"
-#: elf.c:1041
+#: elf.c:1225
msgid ""
"\n"
"Version References:\n"
"\n"
"Versionsreferenser:\n"
-#: elf.c:1046
+#: elf.c:1230
#, c-format
msgid " required from %s:\n"
msgstr " krävs från %s:\n"
-#: elf.c:1682
+#: elf.c:1902
#, c-format
msgid "%s: invalid link %lu for reloc section %s (index %u)"
msgstr "%s: ogiltig länk %lu för omlokaliseringssektion %s (index %u)"
-#: elf.c:3296
+#: elf.c:3603
#, c-format
msgid "%s: Not enough room for program headers (allocated %u, need %u)"
-msgstr ""
-"%s: Inte tillräckligt med utrymme för programhuvuden (allokerade %u, behöver "
-"%u)"
+msgstr "%s: Inte tillräckligt med utrymme för programhuvuden (allokerade %u, behöver %u)"
-#: elf.c:3400
+#: elf.c:3708
#, c-format
msgid "%s: Not enough room for program headers, try linking with -N"
-msgstr ""
-"%s: Inte tillräckligt med utrymme för programhuvuden, försök att länka med -N"
+msgstr "%s: Inte tillräckligt med utrymme för programhuvuden, försök att länka med -N"
-#: elf.c:3525
+#: elf.c:3833
#, c-format
-msgid ""
-"Error: First section in segment (%s) starts at 0x%x whereas the segment "
-"starts at 0x%x"
-msgstr ""
-"Fel: Första sektionen i segmentet (%s) börjar vid 0x%x medan segmentet "
-"börjar med 0x%x"
+msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x"
+msgstr "Fel: Första sektionen i segmentet (%s) börjar vid 0x%x medan segmentet börjar med 0x%x"
-#: elf.c:3811
+#: elf.c:4148
#, c-format
msgid "%s: warning: allocated section `%s' not in segment"
msgstr "%s: varning: allokerad sektion \"%s\" inte i segment"
-#: elf.c:4142
+#: elf.c:4472
#, c-format
msgid "%s: symbol `%s' required but not present"
msgstr "%s: symbolen \"%s\" krävs men finns inte med"
-#: elf.c:4395
+#: elf.c:4749
#, c-format
-msgid "%s: warning: Empty loadable segment detected\n"
-msgstr "%s: varning: Tomt inläsningsbart segment upptäckt\n"
+msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr "%s: varning: Tomt inläsningsbart segment upptäckt, är detta meningen?\n"
-#: elf.c:5808
+#: elf.c:6193
#, c-format
msgid "%s: unsupported relocation type %s"
msgstr "%s: omlokaliseringstypen %s stöds inte"
-#: elf32-arm.h:1224
+#: elf32-arm.h:1221
#, c-format
msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
-msgstr ""
-"%s: Varning: Arm BLX-instruktion använder Arm-funktionen \"%s\" som mål."
+msgstr "%s: Varning: Arm BLX-instruktion använder Arm-funktionen \"%s\" som mål."
-#: elf32-arm.h:1420
+#: elf32-arm.h:1417
#, c-format
msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
-msgstr ""
-"%s: Varning: Thumb BLX-instruktionen använder thumb-funktionen \"%s\" som "
-"mål."
+msgstr "%s: Varning: Thumb BLX-instruktionen använder thumb-funktionen \"%s\" som mål."
-#: elf32-arm.h:1904 elf32-i386.c:1778 elf32-sh.c:3133
+#: elf32-arm.h:1914 elf32-sh.c:4125
#, c-format
msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
msgstr "%s(%s+0x%lx): %s omlokalisering mot SEC_MERGE-sektion"
-#: elf32-arm.h:1998
+#: elf32-arm.h:2008
#, c-format
-msgid ""
-"%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
-msgstr ""
-"%s: varning: olöslig omlokalisering %d mot symbolen \"%s\" från sektionen %s"
-
-#: elf32-arm.h:2166
-#, fuzzy, c-format
-msgid ""
-"Warning: Clearing the interworking flag of %s because non-interworking code "
-"in %s has been linked with it"
-msgstr ""
-"Varning: Stänger av samverkandeflaggan i %s eftersom icke-samverkande kod i %"
-"s har länkats med det"
+msgid "%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
+msgstr "%s: varning: olöslig omlokalisering %d mot symbolen \"%s\" från sektionen %s"
-#: elf32-arm.h:2261
+#: elf32-arm.h:2176
#, c-format
-msgid ""
-"Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"
-msgstr ""
-"Fel: %s kompilerades för EABI version %d, medan %s kompilerades för version %"
-"d"
+msgid "Warning: Clearing the interworking flag of %s because non-interworking code in %s has been linked with it"
+msgstr "Varning: Stänger av samverkandeflaggan i %s eftersom icke-samverkande kod i %s har länkats med det"
-#: elf32-arm.h:2275
+#: elf32-arm.h:2271
#, c-format
-msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"
-msgstr "Fel: %s kompilerad för APCS-%d, medan %s är kompilerad för APCS-%d"
+msgid "ERROR: %s is compiled for EABI version %d, whereas %s is compiled for version %d"
+msgstr "FEL: %s är kompilerad för EABI version %d, medan %s är kompilerad för version %d"
-#: elf32-arm.h:2287
+#: elf32-arm.h:2285
#, c-format
-msgid ""
-"Error: %s passes floats in FP registers, whereas %s passes them in integer "
-"registers"
-msgstr ""
-"Fel: %s skickar flyttal i flyttalsregister, medan %s skickar dem i "
-"heltalsregister"
+msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
+msgstr "FEL: %s är kompilerad för APCS-%d, medan målet %s använder APCS-%d"
-#: elf32-arm.h:2292
+#: elf32-arm.h:2313
#, c-format
-msgid ""
-"Error: %s passes floats in integer registers, whereas %s passes them in FP "
-"registers"
-msgstr ""
-"Fel: %s skickar flyttal i heltalsregister, medan %s skickar dem i "
-"flyttalsregister"
-
-# Tror det saknas "uses" här
-#: elf32-arm.h:2303
-#, fuzzy, c-format
-msgid "Error: %s uses VFP instructions, whereas %s uses FPA instructions"
-msgstr ""
-"Fel: %s använder VFP-instruktioner, medan %s använder FPA-instruktioner"
+msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
+msgstr "FEL: %s använder VFP-instruktioner, medan %s använder FPA-instruktioner"
-# Tror det saknas "uses" här
-#: elf32-arm.h:2308
-#, fuzzy, c-format
-msgid "Error: %s uses FPA instructions, whereas %s uses VFP instructions"
-msgstr ""
-"Fel: %s använder FPA-instruktioner, medan %s använder VFP-instruktioner"
-
-#: elf32-arm.h:2328
+#: elf32-arm.h:2318
#, c-format
-msgid "Error: %s uses software FP, whereas %s uses hardware FP"
-msgstr "Fel: %s använder programvaruflyttal, medan %s använder hårdvaruflyttal"
+msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
+msgstr "FEL: %s använder FPA-instruktioner, medan %s använder VFP-instruktioner"
-#: elf32-arm.h:2333
+#: elf32-arm.h:2338
#, c-format
-msgid "Error: %s uses hardware FP, whereas %s uses software FP"
-msgstr "Fel: %s använder hårdvaruflyttal, medan %s använder programvaruflyttal"
+msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
+msgstr "FEL: %s använder programvaruflyttal, medan %s använder hårdvaruflyttal"
-#: elf32-arm.h:2348
+#: elf32-arm.h:2343
#, c-format
-msgid "Warning: %s supports interworking, whereas %s does not"
-msgstr "Varning: %s stöder samverkande, medan %s däremot inte gör det"
-
-#: elf32-arm.h:2355
-#, c-format
-msgid "Warning: %s does not support interworking, whereas %s does"
-msgstr "Varning: %s stöder inte samverkande, medan %s däremot gör det"
+msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
+msgstr "FEL: %s använder hårdvaruflyttal, medan %s använder programvaruflyttal"
#. Ignore init flag - it may not be set, despite the flags field
#. containing valid data.
-#: elf32-arm.h:2386 elf32-cris.c:2991 elf32-m68k.c:410 elf32-mips.c:3242
+#: elf32-arm.h:2396 elf32-cris.c:2988 elf32-m68k.c:410 elf32-vax.c:543
+#: elfxx-mips.c:7756
#, c-format
msgid "private flags = %lx:"
msgstr "privata flaggor = %lx:"
-#: elf32-arm.h:2395
+#: elf32-arm.h:2405
msgid " [interworking enabled]"
msgstr " [samverkande är aktiverat]"
-#: elf32-arm.h:2398
-msgid " [APCS-26]"
-msgstr " [APCS-26]"
-
-#: elf32-arm.h:2400
-msgid " [APCS-32]"
-msgstr " [APCS-32]"
-
-#: elf32-arm.h:2403
+#: elf32-arm.h:2413
msgid " [VFP float format]"
msgstr " [VFP-flyttalsformat]"
-#: elf32-arm.h:2405
+#: elf32-arm.h:2415
msgid " [FPA float format]"
msgstr " [FPA-flyttalsformat]"
-#: elf32-arm.h:2414
+#: elf32-arm.h:2424
msgid " [new ABI]"
msgstr " [nytt ABI]"
-#: elf32-arm.h:2417
+#: elf32-arm.h:2427
msgid " [old ABI]"
msgstr " [gammalt ABI]"
-#: elf32-arm.h:2420
+#: elf32-arm.h:2430
msgid " [software FP]"
msgstr " [programvaru-FP]"
-#: elf32-arm.h:2428
+#: elf32-arm.h:2438
msgid " [Version1 EABI]"
msgstr " [Version1 EABI]"
-#: elf32-arm.h:2431 elf32-arm.h:2442
+#: elf32-arm.h:2441 elf32-arm.h:2452
msgid " [sorted symbol table]"
msgstr " [sorterad symboltabell]"
-#: elf32-arm.h:2433 elf32-arm.h:2444
+#: elf32-arm.h:2443 elf32-arm.h:2454
msgid " [unsorted symbol table]"
msgstr " [osorterad symboltabell]"
-#: elf32-arm.h:2439
+#: elf32-arm.h:2449
msgid " [Version2 EABI]"
msgstr " [Version2 EABI]"
-#: elf32-arm.h:2447
+#: elf32-arm.h:2457
msgid " [dynamic symbols use segment index]"
msgstr " [dynamiska symboler använder segmentindex]"
-#: elf32-arm.h:2450
+#: elf32-arm.h:2460
msgid " [mapping symbols precede others]"
msgstr " [mappsymboler har företräde före andra]"
-#: elf32-arm.h:2457
+#: elf32-arm.h:2467
msgid " <EABI version unrecognised>"
msgstr " <EABI-version känns inte igen>"
-#: elf32-arm.h:2464
+#: elf32-arm.h:2474
msgid " [relocatable executable]"
msgstr " [omlokaliseringsbar körbar fil]"
-#: elf32-arm.h:2467
+#: elf32-arm.h:2477
msgid " [has entry point]"
msgstr " [har startpunkt]"
-#: elf32-arm.h:2472
+#: elf32-arm.h:2482
msgid "<Unrecognised flag bits set>"
msgstr "<Okända flaggbitar satta>"
-#: elf32-avr.c:843 elf32-cris.c:1414 elf32-fr30.c:661 elf32-i860.c:1056
-#: elf32-openrisc.c:463 elf32-v850.c:1699 elf32-xstormy16.c:984
-#: elf64-mmix.c:1172
+#: elf32-avr.c:841 elf32-cris.c:1411 elf32-fr30.c:643 elf32-frv.c:817
+#: elf32-i860.c:1039 elf32-openrisc.c:447 elf32-v850.c:1699
+#: elf32-xstormy16.c:941 elf64-mmix.c:1310
msgid "internal error: dangerous relocation"
msgstr "internt fel: farlig omlokalisering"
#: elf32-cris.c:1012
#, c-format
-msgid ""
-"%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
-msgstr ""
-"%s: Varken någon PLT eller GOT för omlokalisering %s mot symbolen \"%s\" "
-"från sektionen %s"
+msgid "%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
+msgstr "%s: Varken någon PLT eller GOT för omlokalisering %s mot symbolen \"%s\" från sektionen %s"
-#: elf32-cris.c:1015 elf32-cris.c:1142
+#: elf32-cris.c:1015 elf32-cris.c:1141
msgid "[whose name is lost]"
msgstr "[vars namn tappats bort]"
-#: elf32-cris.c:1131
+#: elf32-cris.c:1130
#, c-format
-msgid ""
-"%s: relocation %s with non-zero addend %d against local symbol from %s "
-"section"
-msgstr ""
-"%s: omlokalisering %s med icke-tomt addendum %d mot lokal symbol från "
-"sektionen %s"
+msgid "%s: relocation %s with non-zero addend %d against local symbol from %s section"
+msgstr "%s: omlokalisering %s med icke-tomt addendum %d mot lokal symbol från sektionen %s"
-#: elf32-cris.c:1138
+#: elf32-cris.c:1137
#, c-format
-msgid ""
-"%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
-msgstr ""
-"%s: omlokalisering %s med icke-tomt addendum %d mot symbolen \"%s\" från "
-"sektionen %s"
+msgid "%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
+msgstr "%s: omlokalisering %s med icke-tomt addendum %d mot symbolen \"%s\" från sektionen %s"
-#: elf32-cris.c:1156
+#: elf32-cris.c:1155
#, c-format
-msgid ""
-"%s: relocation %s is not allowed for global symbol: `%s' from %s section"
-msgstr ""
-"%s: omlokaliseringen %s är inte tillåten för global symbol: \"%s\" från "
-"sektionen %s"
+msgid "%s: relocation %s is not allowed for global symbol: `%s' from %s section"
+msgstr "%s: omlokaliseringen %s är inte tillåten för global symbol: \"%s\" från sektionen %s"
-#: elf32-cris.c:1171
-#, fuzzy, c-format
+#: elf32-cris.c:1170
+#, c-format
msgid "%s: relocation %s in section %s with no GOT created"
-msgstr "%s: omlokaliseringar i sektionen \"%s\", men den har inget innehåll"
+msgstr "%s: omlokalisering %s i sektionen %s utan GOT skapad"
-#: elf32-cris.c:1289
+#: elf32-cris.c:1288
#, c-format
msgid "%s: Internal inconsistency; no relocation section %s"
msgstr "%s: Intern inkonsistens; ingen omlokaliseringssektion %s"
-#: elf32-cris.c:2523
+#: elf32-cris.c:2514
#, c-format
msgid ""
"%s, section %s:\n"
" relocation %s should not be used in a shared object; recompile with -fPIC"
msgstr ""
"%s, sektion %s:\n"
-" omlokaliseringen %s bör inte användas i ett delat objekt; kompilera om med "
-"-fPIC"
+" omlokaliseringen %s bör inte användas i ett delat objekt; kompilera om med -fPIC"
-#: elf32-cris.c:2994
+#: elf32-cris.c:2991
msgid " [symbols have a _ prefix]"
msgstr " [symboler har ett _-prefix]"
-#: elf32-cris.c:3033
+#: elf32-cris.c:3030
#, c-format
msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
-msgstr ""
-"%s: använder symboler med _-prefix, men skriver fil med symboler utan prefix"
+msgstr "%s: använder symboler med _-prefix, men skriver fil med symboler utan prefix"
-#: elf32-cris.c:3034
+#: elf32-cris.c:3031
#, c-format
msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
-msgstr ""
-"%s: använder symboler utan prefix, men skriver fil med symboler med _-prefix"
+msgstr "%s: använder symboler utan prefix, men skriver fil med symboler med _-prefix"
+
+#: elf32-frv.c:1217
+#, c-format
+msgid "%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr "%s: kompilerad med %s och länkad med moduler som använder icke-pic-omlokalisering"
+
+#: elf32-frv.c:1267
+#, c-format
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr "%s: kompilerad med %s och länkad med moduler som kompilerats med %s"
+
+#: elf32-frv.c:1279
+#, c-format
+msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgstr "%s: använder andra okända e_flags-fält (0x%lx) än tidigare moduler (0x%lx)"
+
+#: elf32-frv.c:1315
+#, c-format
+msgid "private flags = 0x%lx:"
+msgstr "privata flaggor = 0x%lx:"
#: elf32-gen.c:82 elf64-gen.c:82
#, c-format
msgid "%s: Relocations in generic ELF (EM: %d)"
msgstr "%s: Omlokalisering i allmän ELF (EM: %d)"
-#: elf32-hppa.c:646
+#: elf32-hppa.c:671 elf64-ppc.c:2323
#, c-format
msgid "%s: cannot create stub entry %s"
msgstr "%s: kan inte skapa stubbstarten %s"
-#: elf32-hppa.c:937 elf32-hppa.c:3545
+#: elf32-hppa.c:956 elf32-hppa.c:3555
#, c-format
msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
msgstr "%s(%s+0x%lx): kan inte nå %s, kompilera om med -ffunction-sections"
-#: elf32-hppa.c:1312
+#: elf32-hppa.c:1338 elf64-x86-64.c:673
#, c-format
-msgid ""
-"%s: relocation %s can not be used when making a shared object; recompile "
-"with -fPIC"
-msgstr ""
-"%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas; "
-"kompilera om med -fPIC"
+msgid "%s: relocation %s can not be used when making a shared object; recompile with -fPIC"
+msgstr "%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas; kompilera om med -fPIC"
-#: elf32-hppa.c:1332
+#: elf32-hppa.c:1358
#, c-format
-msgid ""
-"%s: relocation %s should not be used when making a shared object; recompile "
-"with -fPIC"
-msgstr ""
-"%s: omlokaliseringen %s bör inte användas då ett delat objekt skapas; "
-"kompilera om med -fPIC"
+msgid "%s: relocation %s should not be used when making a shared object; recompile with -fPIC"
+msgstr "%s: omlokaliseringen %s bör inte användas då ett delat objekt skapas; kompilera om med -fPIC"
-#: elf32-hppa.c:1525
+#: elf32-hppa.c:1551
#, c-format
msgid "Could not find relocation section for %s"
msgstr "Kunde inte hitta omlokaliseringssektion för %s"
-#: elf32-hppa.c:2867
+#: elf32-hppa.c:2855
#, c-format
msgid "%s: duplicate export stub %s"
msgstr "%s: dubbel exportstubb %s"
-#: elf32-hppa.c:3429
+#: elf32-hppa.c:3433
#, c-format
msgid "%s(%s+0x%lx): fixing %s"
msgstr "%s(%s+0x%lx): fixar %s"
-#: elf32-hppa.c:4069
+#: elf32-hppa.c:4080
#, c-format
msgid "%s(%s+0x%lx): cannot handle %s for %s"
msgstr "%s(%s+0x%lx): kan inte hantera %s för %s"
-#: elf32-hppa.c:4408
+#: elf32-hppa.c:4393
msgid ".got section not immediately after .plt section"
msgstr ".got-sektionen följer inte omedelbart efter .plt-sektion"
-#: elf32-i386.c:298
+#: elf32-i386.c:379
#, c-format
msgid "%s: invalid relocation type %d"
msgstr "%s: ogiltig omlokaliseringstyp %d"
-#: elf32-i386.c:718 elf32-s390.c:636 elf64-s390.c:595
+#: elf32-i386.c:876 elf32-s390.c:649 elf64-s390.c:595 elf64-x86-64.c:591
#, c-format
msgid "%s: bad symbol index: %d"
msgstr "%s: felaktigt symbolindex: %d"
-#: elf32-i386.c:863 elf32-s390.c:790 elf64-ppc.c:2198 elf64-s390.c:759
+#: elf32-i386.c:948
+#, c-format
+msgid "%s: `%s' accessed both as normal and thread local symbol"
+msgstr "%s: \"%s\" anropad både som lokal normal symbol och lokal trådsymbol"
+
+#: elf32-i386.c:1072 elf32-s390.c:808 elf64-ppc.c:2827 elf64-s390.c:759
+#: elf64-x86-64.c:761
#, c-format
msgid "%s: bad relocation section name `%s'"
msgstr "%s: felaktig omlokaliseringssektionsnamn \"%s\""
-#: elf32-i386.c:2069 elf32-s390.c:1951 elf64-ppc.c:4124 elf64-s390.c:1955
+#: elf32-i386.c:1159 elf64-alpha.c:4768
+#, c-format
+msgid "%s: TLS local exec code cannot be linked into shared objects"
+msgstr "%s: lokal TLS-exekveringskod kan inte länkas in i delade objekt"
+
+#: elf32-i386.c:2747 elf32-s390.c:1981 elf32-sparc.c:1571 elf64-ppc.c:5918
+#: elf64-s390.c:1945 elf64-sparc.c:2578 elf64-x86-64.c:1948
#, c-format
msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
msgstr "%s(%s+0x%lx): olöslig omlokalisering mot symbolen \"%s\""
-#: elf32-i386.c:2107 elf32-s390.c:1989 elf64-s390.c:1993
+#: elf32-i386.c:2784 elf32-s390.c:2019 elf64-ppc.c:5977 elf64-s390.c:1983
+#: elf64-x86-64.c:1986
#, c-format
msgid "%s(%s+0x%lx): reloc against `%s': error %d"
msgstr "%s(%s+0x%lx): omlokalisering mot \"%s\": fel %d"
-#: elf32-m32r.c:923
+#: elf32-m32r.c:924
msgid "SDA relocation when _SDA_BASE_ not defined"
msgstr "SDA-omlokalisering då _SDA_BASE_ inte är definierat"
-#: elf32-ia64.c:3537 elf32-m32r.c:1007 elf32-ppc.c:2930 elf64-ia64.c:3537
+#: elf32-ia64.c:3687 elf32-m32r.c:1013 elf32-ppc.c:2987 elf64-alpha.c:4185
+#: elf64-alpha.c:4313 elf64-ia64.c:3687
#, c-format
msgid "%s: unknown relocation type %d"
msgstr "%s: okänd omlokaliseringstyp %d"
-#: elf32-m32r.c:1223
+#: elf32-m32r.c:1221
#, c-format
msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
msgstr "%s: Målet (%s) för en %s-omlokalisering är i fel sektion (%s)"
-#: elf32-m32r.c:2000
+#: elf32-m32r.c:1947
#, c-format
msgid "%s: Instruction set mismatch with previous modules"
msgstr "%s: Instruktionsuppsättning passar inte med tidigare moduler"
-#: elf32-m32r.c:2023
+#: elf32-m32r.c:1970
#, c-format
msgid "private flags = %lx"
msgstr "privata flaggor = %lx"
-#: elf32-m32r.c:2028
+#: elf32-m32r.c:1975
msgid ": m32r instructions"
msgstr ": m32r-instruktioner"
-#: elf32-m32r.c:2029
+#: elf32-m32r.c:1976
msgid ": m32rx instructions"
msgstr ": m32rx-instruktioner"
msgid " [cpu32]"
msgstr " [cpu32]"
-#: elf32-mcore.c:353 elf32-mcore.c:479
+#: elf32-m68k.c:416
+msgid " [m68000]"
+msgstr " [m68000]"
+
+#: elf32-mcore.c:354 elf32-mcore.c:457
#, c-format
msgid "%s: Relocation %s (%d) is not currently supported.\n"
msgstr "%s: Omlokalisering %s (%d) stöds för närvarande inte.\n"
-#: elf32-mcore.c:438
+#: elf32-mcore.c:442
#, c-format
msgid "%s: Unknown relocation type %d\n"
msgstr "%s: Okänd omlokaliseringstyp %d\n"
-#: elf32-mips.c:2156 elf64-mips.c:1972
+#: elf32-mips.c:1152 elf64-mips.c:1783
msgid "32bits gp relative relocation occurs for an external symbol"
msgstr "32-bitars gp-relativ omlokalisering förekom för en extern symbol"
-#: elf32-mips.c:2305
+#: elf32-mips.c:1301
#, c-format
msgid "Linking mips16 objects into %s format is not supported"
msgstr "Länkning av mips16-objekt till %s-format stöds inte"
-#: elf32-mips.c:3129
+#: elf32-ppc.c:1460
#, c-format
-msgid "%s: linking PIC files with non-PIC files"
-msgstr "%s: länkar PIC-filer med icke-PIC-filer"
+msgid "%s: compiled with -mrelocatable and linked with modules compiled normally"
+msgstr "%s: kompilerad med -mrelocatable och länkad med moduler som kompilerats normalt"
-#: elf32-mips.c:3139
+#: elf32-ppc.c:1468
#, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
-msgstr "%s: länkar abicalls-filer med icke-abicalls-filer"
+msgid "%s: compiled normally and linked with modules compiled with -mrelocatable"
+msgstr "%s: kompilerad normalt och länkad med moduler som kompilerats med -mrelocatable"
-#: elf32-mips.c:3168
-#, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
-msgstr "%s: ISA (-mips%d) passar inte med tidigare moduler (-mips%d)"
-
-#: elf32-mips.c:3177
-#, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
-msgstr "%s: ISA (%d) passar inte med tidigare moduler (%d)"
-
-#: elf32-mips.c:3200
-#, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
-msgstr "%s: ABI passar inte: länkar %s-modul med tidigare %s-moduler"
-
-#: elf32-mips.c:3214 elf32-ppc.c:1470 elf64-ppc.c:1556 elf64-sparc.c:3027
+#: elf32-ppc.c:1494 elf64-sparc.c:2989 elfxx-mips.c:7713
#, c-format
msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
msgstr "%s: använder andra e_flags-fält (0x%lx) än tidigare moduler (0x%lx)"
-#: elf32-mips.c:3245
-msgid " [abi=O32]"
-msgstr " [abi=O32]"
-
-#: elf32-mips.c:3247
-msgid " [abi=O64]"
-msgstr " [abi=O64]"
-
-#: elf32-mips.c:3249
-msgid " [abi=EABI32]"
-msgstr " [abi=EABI32]"
-
-#: elf32-mips.c:3251
-msgid " [abi=EABI64]"
-msgstr " [abi=EABI64]"
-
-#: elf32-mips.c:3253
-msgid " [abi unknown]"
-msgstr " [okänt abi]"
-
-#: elf32-mips.c:3255
-msgid " [abi=N32]"
-msgstr " [abi=N32]"
-
-#: elf32-mips.c:3257
-msgid " [abi=64]"
-msgstr " [abi=64]"
-
-#: elf32-mips.c:3259
-msgid " [no abi set]"
-msgstr " [inget abi inställt]"
-
-#: elf32-mips.c:3262
-msgid " [mips1]"
-msgstr " [mips1]"
-
-#: elf32-mips.c:3264
-msgid " [mips2]"
-msgstr " [mips2]"
-
-#: elf32-mips.c:3266
-msgid " [mips3]"
-msgstr " [mips3]"
-
-#: elf32-mips.c:3268
-msgid " [mips4]"
-msgstr " [mips4]"
-
-#: elf32-mips.c:3270
-msgid " [mips5]"
-msgstr " [mips5]"
-
-#: elf32-mips.c:3272
-msgid " [mips32]"
-msgstr " [mips32]"
-
-#: elf32-mips.c:3274
-msgid " [mips64]"
-msgstr " [mips64]"
-
-#: elf32-mips.c:3276
-msgid " [unknown ISA]"
-msgstr " [okänd ISA]"
-
-#: elf32-mips.c:3279
-msgid " [32bitmode]"
-msgstr " [32-bitarsläge]"
-
-#: elf32-mips.c:3281
-msgid " [not 32bitmode]"
-msgstr " [inte 32-bitarsläge]"
-
-#: elf32-mips.c:4954
-msgid "static procedure (no name)"
-msgstr "statisk procedur (inget namn)"
-
-#: elf32-mips.c:5572 elf64-mips.c:6694
-#, c-format
-msgid "%s: illegal section name `%s'"
-msgstr "%s: ogiltigt sektionsnamn \"%s\""
-
-#: elf32-mips.c:6139 elf64-mips.c:3150
-msgid "not enough GOT space for local GOT entries"
-msgstr "inte tillräckligt med GOT-utrymme för lokala GOT-poster"
-
-#: elf32-mips.c:7250 elf64-mips.c:4203
-#, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
-msgstr "%s: %s+0x%lx: hoppa till stubbrutin som inte är jal"
-
-#: elf32-mips.c:8259 elf64-mips.c:5891
-#, c-format
-msgid "%s: Malformed reloc detected for section %s"
-msgstr "%s: Felaktig omlokalisering för sektion %s upptäckt"
-
-#: elf32-mips.c:8337 elf64-mips.c:5969
-#, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
-msgstr "%s: CALL16-omlokalisering vid 0x%lx är inte mot global symbol"
-
-#: elf32-ppc.c:1436 elf64-ppc.c:1521
-#, c-format
-msgid ""
-"%s: compiled with -mrelocatable and linked with modules compiled normally"
-msgstr ""
-"%s: kompilerad med -mrelocatable och länkad med moduler som kompilerats "
-"normalt"
-
-#: elf32-ppc.c:1444 elf64-ppc.c:1529
-#, c-format
-msgid ""
-"%s: compiled normally and linked with modules compiled with -mrelocatable"
-msgstr ""
-"%s: kompilerad normalt och länkad med moduler som kompilerats med -"
-"mrelocatable"
-
-#: elf32-ppc.c:1568
+#: elf32-ppc.c:1592
#, c-format
msgid "%s: Unknown special linker type %d"
msgstr "%s: Okänd speciallänkartyp %d"
-#: elf32-ppc.c:2218 elf32-ppc.c:2252 elf32-ppc.c:2287
+#: elf32-ppc.c:2273 elf32-ppc.c:2307 elf32-ppc.c:2342
#, c-format
msgid "%s: relocation %s cannot be used when making a shared object"
msgstr "%s: omlokaliseringen %s kan inte användas då ett delat objekt skapas"
-#: elf32-ppc.c:3097 elf64-ppc.c:3716
+#: elf32-ppc.c:3126 elf64-ppc.c:5473
#, c-format
msgid "%s: unknown relocation type %d for symbol %s"
msgstr "%s: okänd omlokaliseringstyp %d för symbolen %s"
-#: elf32-ppc.c:3452 elf32-ppc.c:3473 elf32-ppc.c:3523
+#: elf32-ppc.c:3482 elf32-ppc.c:3503 elf32-ppc.c:3553
#, c-format
-msgid ""
-"%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
+msgid "%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
msgstr "%s: Målet (%s) för en %s-omlokalisering är i fel utdatasektion (%s)"
-#: elf32-ppc.c:3589
+#: elf32-ppc.c:3619
#, c-format
msgid "%s: Relocation %s is not yet supported for symbol %s."
msgstr "%s: Omlokaliseringen %s stöds inte än för symbolen %s."
-#: elf32-sh.c:1101
+#: elf32-sh.c:1964
#, c-format
msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
msgstr "%s: 0x%lx: varning: felaktigt R_SH_USES-avstånd"
-#: elf32-sh.c:1113
+#: elf32-sh.c:1976
#, c-format
msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
msgstr "%s: 0x%lx: varning: R_SH_USES pekar till okänd instruktion 0x%x"
-#: elf32-sh.c:1130
+#: elf32-sh.c:1993
#, c-format
msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
msgstr "%s: 0x%lx: varning: felaktigt R_SH_USES-inläsningsavstånd"
-#: elf32-sh.c:1145
+#: elf32-sh.c:2008
#, c-format
msgid "%s: 0x%lx: warning: could not find expected reloc"
msgstr "%s: 0x%lx: varning: kunde inte hitta förväntad omlokalisering"
-#: elf32-sh.c:1202
+#: elf32-sh.c:2036
#, c-format
msgid "%s: 0x%lx: warning: symbol in unexpected section"
msgstr "%s: 0x%lx: varning: symbol i oväntad sektion"
-#: elf32-sh.c:1323
+#: elf32-sh.c:2153
#, c-format
msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
msgstr "%s: 0x%lx: varning: kunde inte hitta förväntad COUNT-omlokalisering"
-#: elf32-sh.c:1332
+#: elf32-sh.c:2162
#, c-format
msgid "%s: 0x%lx: warning: bad count"
msgstr "%s: 0x%lx: varning: felaktigt antal"
-#: elf32-sh.c:1741 elf32-sh.c:2132
+#: elf32-sh.c:2550 elf32-sh.c:2926
#, c-format
msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
msgstr "%s: 0x%lx: ödesdigert: omlokalisering ger överspill vid förenklingen"
-#: elf32-sh.c:3267
+#: elf32-sh.c:4073 elf64-sh64.c:1576
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+msgstr "Oväntat STO_SH5_ISA32 på lokal symbol hanteras inte"
+
+#: elf32-sh.c:4284
#, c-format
msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
-msgstr ""
-"%s: 0x%lx: ödesdigert: ojusterat grenmål för omlokalisering för "
-"förenklingsstöd"
+msgstr "%s: 0x%lx: ödesdigert: ojusterat grenmål för omlokalisering för förenklingsstöd"
-#: elf32-sparc.c:1554 elf64-sparc.c:2280
+#: elf32-sh64.c:203 elf64-sh64.c:2364
+#, c-format
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgstr "%s: kompilerat som 32-bitarsobjekt och %s är 64-bitars"
+
+#: elf32-sh64.c:206 elf64-sh64.c:2367
+#, c-format
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgstr "%s: kompilerat som 64-bitarsobjekt och %s är 32-bitars"
+
+#: elf32-sh64.c:208 elf64-sh64.c:2369
+#, c-format
+msgid "%s: object size does not match that of target %s"
+msgstr "%s: objektstorleken stämmer inte överens med den hos målet %s"
+
+#: elf32-sh64.c:440 elf64-sh64.c:2941
+#, c-format
+msgid "%s: encountered datalabel symbol in input"
+msgstr "%s: påträffade dataetikettssymbol i indata"
+
+#: elf32-sh64.c:523
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr "PTB passar inte: en SHmedia-adress (bit 0 == 1)"
+
+#: elf32-sh64.c:526
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr "PTA passar inte: en SHcompact-adress (bit 0 == 0)"
+
+#: elf32-sh64.c:544
+#, c-format
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgstr "%s: GAS-fel: oväntad PTB-instruktion med R_SH_PT_16"
+
+#: elf32-sh64.c:593 elf64-sh64.c:1703
+#, c-format
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgstr "%s: fel: ojusterad omlokaliseringstyp %d på %08x omlokalisering %08x\n"
+
+#: elf32-sh64.c:677
+#, c-format
+msgid "%s: could not write out added .cranges entries"
+msgstr "%s: kunde inte skriva ut tillagda .cranges-poster"
+
+#: elf32-sh64.c:739
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
+msgstr "%s: kunde inte skriva ut sorterade cranges-poster"
+
+#: elf32-sparc.c:1535 elf64-sparc.c:2224
#, c-format
msgid "%s: probably compiled without -fPIC?"
msgstr "%s: troligen kompilerad utan -fPIC?"
-#: elf32-sparc.c:2007
+#: elf32-sparc.c:2002
#, c-format
msgid "%s: compiled for a 64 bit system and target is 32 bit"
msgstr "%s: kompilerat för ett 64-bitarssystem och målet är 32-bitars"
-#: elf32-sparc.c:2021
+#: elf32-sparc.c:2016
#, c-format
msgid "%s: linking little endian files with big endian files"
msgstr "%s: länkar little endian-filer med big endian-filer"
#: elf32-v850.c:685
#, c-format
-msgid ""
-"Variable `%s' can only be in one of the small, zero, and tiny data regions"
-msgstr ""
-"Variabel \"%s\" kan bara vara i ett av de små, tomma och pyttesmå "
-"dataområdena"
+msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions"
+msgstr "Variabel \"%s\" kan bara vara i ett av de små, tomma och pyttesmå dataområdena"
#: elf32-v850.c:688
#, c-format
-msgid ""
-"Variable `%s' cannot be in both small and zero data regions simultaneously"
-msgstr ""
-"Variabel \"%s\" kan inte vara i både små och tomma dataområden samtidigt"
+msgid "Variable `%s' cannot be in both small and zero data regions simultaneously"
+msgstr "Variabel \"%s\" kan inte vara i både små och tomma dataområden samtidigt"
#: elf32-v850.c:691
#, c-format
-msgid ""
-"Variable `%s' cannot be in both small and tiny data regions simultaneously"
-msgstr ""
-"Variabel \"%s\" kan inte vara i både små och pyttesmå dataområden samtidigt"
+msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously"
+msgstr "Variabel \"%s\" kan inte vara i både små och pyttesmå dataområden samtidigt"
#: elf32-v850.c:694
#, c-format
-msgid ""
-"Variable `%s' cannot be in both zero and tiny data regions simultaneously"
-msgstr ""
-"Variabel \"%s\" kan inte vara i både tomma och pyttesmå dataområden samtidigt"
+msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously"
+msgstr "Variabel \"%s\" kan inte vara i både tomma och pyttesmå dataområden samtidigt"
#: elf32-v850.c:1072
msgid "FAILED to find previous HI16 reloc\n"
msgid "could not locate special linker symbol __ctbp"
msgstr "kunde inte lokalisera speciell länkarsymbol __ctbp"
-#: elf32-v850.c:1877
+#: elf32-v850.c:1875
#, c-format
msgid "%s: Architecture mismatch with previous modules"
msgstr "%s: Arkitekturen passar inte ihop med tidigare moduler"
-#: elf32-v850.c:1897
+#: elf32-v850.c:1895
#, c-format
msgid "private flags = %lx: "
msgstr "privata flaggor = %lx: "
-#: elf32-v850.c:1902
+#: elf32-v850.c:1900
msgid "v850 architecture"
msgstr "v850-arkitektur"
-#: elf32-v850.c:1903
+#: elf32-v850.c:1901
msgid "v850e architecture"
msgstr "v850e-arkitektur"
-#: elf32-v850.c:1904
+#: elf32-v850.c:1902
msgid "v850ea architecture"
msgstr "v850ea-arkitektur"
-#: elf32-ia64.c:2247 elf32-xstormy16.c:414 elf64-ia64.c:2247
+#: elf32-vax.c:546
+msgid " [nonpic]"
+msgstr " [icke-pic]"
+
+#: elf32-vax.c:549
+msgid " [d-float]"
+msgstr " [d-flyttal]"
+
+#: elf32-vax.c:552
+msgid " [g-float]"
+msgstr " [g-flyttal]"
+
+#: elf32-vax.c:674
+#, c-format
+msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"
+msgstr "%s: varning: GOT-addendum %ld till \"%s\" stämmer inte överens med tidigare GOT-addendum %ld"
+
+#: elf32-vax.c:1679
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr "%s: varning: PLT-addendum %d till \"%s\" från sektionen %s ignorerades"
+
+#: elf32-vax.c:1814
+#, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr "%s: varning: %s-omlokalisering mot symbolen \"%s\" från sektionen %s"
+
+#: elf32-vax.c:1820
+#, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
+msgstr "%s: varning: %s-omlokalisering till 0x%x från sektionen %s"
+
+#: elf32-ia64.c:2280 elf32-xstormy16.c:414 elf64-ia64.c:2280
msgid "non-zero addend in @fptr reloc"
msgstr "icke-tomt addendum i @fptr-omlokalisering"
-#: elf64-alpha.c:858
+#: elf64-alpha.c:1097
msgid "GPDISP relocation did not find ldah and lda instructions"
msgstr "GPDISP-omlokalisering hittade inga ldah- och lda-instruktioner"
-#: elf64-alpha.c:2934
+#: elf64-alpha.c:3675
#, c-format
msgid "%s: .got subsegment exceeds 64K (size %d)"
msgstr "%s: .got-subsegment överskrider 64 kB (storlek %d)"
-#: elf64-alpha.c:3518 elf64-alpha.c:3530
+#: elf64-alpha.c:4498 elf64-alpha.c:4510
#, c-format
msgid "%s: gp-relative relocation against dynamic symbol %s"
msgstr "%s: gp-relativ omlokalisering mot dynamiska symbolen %s"
-#: elf64-hppa.c:2070
+#: elf64-alpha.c:4536 elf64-alpha.c:4676
+#, c-format
+msgid "%s: pc-relative relocation against dynamic symbol %s"
+msgstr "%s: pc-relativ omlokalisering mot dynamiska symbolen %s"
+
+#: elf64-alpha.c:4564
+#, c-format
+msgid "%s: change in gp: BRSGP %s"
+msgstr "%s: ändring i gp: BRSGP %s"
+
+#: elf64-alpha.c:4589
+msgid "<unknown>"
+msgstr "<okänd>"
+
+#: elf64-alpha.c:4594
+#, c-format
+msgid "%s: !samegp reloc against symbol without .prologue: %s"
+msgstr "%s: !samegp-omlokalisering mot symbol utan .prologue: %s"
+
+#: elf64-alpha.c:4639
+#, c-format
+msgid "%s: unhandled dynamic relocation against %s"
+msgstr "%s: ohanterad dynamisk omlokalisering mot %s"
+
+#: elf64-alpha.c:4752
+#, c-format
+msgid "%s: dtp-relative relocation against dynamic symbol %s"
+msgstr "%s: dtp-relativ omlokalisering mot dynamiska symbolen %s"
+
+#: elf64-alpha.c:4775
+#, c-format
+msgid "%s: tp-relative relocation against dynamic symbol %s"
+msgstr "%s: tp-relativ omlokalisering mot dynamiska symbolen %s"
+
+#: elf64-hppa.c:2080
#, c-format
msgid "stub entry for %s cannot load .plt, dp offset = %ld"
msgstr "stubbpost för %s kan inte läsa in .plt, dp-avstånd = %ld"
-# Bör rapportera detta
-#
-# (_("%s: register relocation against non-register symbol: %s in %s"),
-# bfd_get_filename (input_section->owner),
-# symname == NULL || *symname == 0 ? _("(unknown)") : symname,
-# bfd_get_section_name (symsec->owner, symsec));
-#
-#: elf64-mmix.c:1271
-#, fuzzy, c-format
+#: elf64-mmix.c:1002
+#, c-format
+msgid ""
+"%s: Internal inconsistency error for value for\n"
+" linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"
+msgstr ""
+"%s: Intern inkkonsistensfel för värdet för\n"
+" länkarallokerat globalt register: länkat: 0x%lx%08lx != avslappnat: 0x%lx%08lx\n"
+
+#: elf64-mmix.c:1386
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: (unknown) in %s"
+msgstr "%s: bas-plus-avståndsomlokalisering mot registersymbol: (okänd) i %s"
+
+#: elf64-mmix.c:1391
+#, c-format
+msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
+msgstr "%s: bas-plus-avståndsomlokalisering mot registersymbol: %s i %s"
+
+#: elf64-mmix.c:1435
+#, c-format
msgid "%s: register relocation against non-register symbol: (unknown) in %s"
-msgstr "%s: registeromlokalisering mot icke-registersymbol: %s i %s"
+msgstr "%s: registeromlokalisering mot icke-registersymbol: (okänd) i %s"
-# Bör rapportera detta
-#
-# (_("%s: register relocation against non-register symbol: %s in %s"),
-# bfd_get_filename (input_section->owner),
-# symname == NULL || *symname == 0 ? _("(unknown)") : symname,
-# bfd_get_section_name (symsec->owner, symsec));
-#
-#: elf64-mmix.c:1276
+#: elf64-mmix.c:1440
#, c-format
msgid "%s: register relocation against non-register symbol: %s in %s"
msgstr "%s: registeromlokalisering mot icke-registersymbol: %s i %s"
-#: elf64-mmix.c:1312
+#: elf64-mmix.c:1477
#, c-format
msgid "%s: directive LOCAL valid only with a register or absolute value"
-msgstr ""
-"%s: LOCAL-direktivet är endast giltigt med ett register eller absolutvärde"
+msgstr "%s: LOCAL-direktivet är endast giltigt med ett register eller absolutvärde"
-#: elf64-mmix.c:1340
+#: elf64-mmix.c:1505
#, c-format
-msgid ""
-"%s: LOCAL directive: Register $%ld is not a local register. First global "
-"register is $%ld."
-msgstr ""
-"%s: LOCAL-direktiv: Register $%ld är inte ett lokalt register. Första "
-"globala registret är $%ld."
+msgid "%s: LOCAL directive: Register $%ld is not a local register. First global register is $%ld."
+msgstr "%s: LOCAL-direktiv: Register $%ld är inte ett lokalt register. Första globala registret är $%ld."
-#: elf64-mmix.c:1615
+#: elf64-mmix.c:1965
#, c-format
-msgid ""
-"%s: Error: multiple definition of `%s'; start of %s is set in a earlier "
-"linked file\n"
-msgstr ""
-"%s: Fel: flera definitioner av \"%s\"; början på %s är inställd i en "
-"tidigare länkad fil\n"
+msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n"
+msgstr "%s: Fel: flera definitioner av \"%s\"; början på %s är inställd i en tidigare länkad fil\n"
-#: elf64-mmix.c:1674
+#: elf64-mmix.c:2024
msgid "Register section has contents\n"
msgstr "Registersektion har innehåll\n"
-#: elf64-ppc.c:1484 libbfd.c:1436
+#: elf64-mmix.c:2186
+#, c-format
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+" Please report this bug."
+msgstr ""
+"Intern inkonsekvens: återstående %u != max %u.\n"
+" Rapportera gärna detta fel."
+
+#: elf64-ppc.c:1669 libbfd.c:1435
#, c-format
msgid "%s: compiled for a big endian system and target is little endian"
msgstr "%s: kompilerad för big endian-system och målet är little endian"
-#: elf64-ppc.c:1486 libbfd.c:1438
+#: elf64-ppc.c:1671 libbfd.c:1437
#, c-format
msgid "%s: compiled for a little endian system and target is big endian"
msgstr "%s: kompilerad för ett little endian-system och målet är big endian"
-#: elf64-ppc.c:3350
-#, fuzzy, c-format
+#: elf64-ppc.c:3610
+#, c-format
+msgid "%s: unexpected reloc type %u in .opd section"
+msgstr "%s: oväntad omlokaliseringstyp %u i .opd-sektion"
+
+#: elf64-ppc.c:3630
+#, c-format
+msgid "%s: .opd is not a regular array of opd entries"
+msgstr "%s: .opd är inte en vanlig vektor med opd-poster"
+
+#: elf64-ppc.c:3672
+#, c-format
+msgid "%s: undefined sym `%s' in .opd section"
+msgstr "%s: odefinierad symbol \"%s\" i .opd-sektion"
+
+#: elf64-ppc.c:4397
+#, c-format
+msgid "can't find branch stub `%s'"
+msgstr "kan inte hitta grenstubb \"%s\""
+
+#: elf64-ppc.c:4436 elf64-ppc.c:4501
+#, c-format
msgid "linkage table error against `%s'"
-msgstr "länktabell spiller över mot \"%s\""
+msgstr "länktabellsfel mot \"%s\""
+
+#: elf64-ppc.c:4573
+#, c-format
+msgid "can't build branch stub `%s'"
+msgstr "kan inte bygga grenstubb \"%s\""
-#: elf64-ppc.c:3432
-msgid "stub section size doesn't match calculated size"
-msgstr "stubbsektionsstorleken stämmer inte överens med beräknad storlek"
+#: elf64-ppc.c:5179
+msgid "stubs don't match calculated size"
+msgstr "stubbar stämmer inte överens med beräknad storlek"
-#: elf64-ppc.c:4061
+#: elf64-ppc.c:5828
#, c-format
msgid "%s: Relocation %s is not supported for symbol %s."
msgstr "%s: Omlokaliseringen %s stöds inte för symbolen %s."
-#: elf64-ppc.c:4105
+#: elf64-ppc.c:5872
#, c-format
msgid "%s: error: relocation %s not a multiple of 4"
msgstr "%s: fel: omlokaliseringen %s är inte en multipel av 4"
-#: elf64-sparc.c:1277
+#: elf64-sparc.c:1280
#, c-format
msgid "%s: check_relocs: unhandled reloc type %d"
msgstr "%s: check_relocs: ohanterad omlokaliseringstyp %d"
-#: elf64-sparc.c:1314
+#: elf64-sparc.c:1317
#, c-format
msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
msgstr "%s: Endast register %%g[2367] kan deklareras med STT_REGISTER"
-#: elf64-sparc.c:1334
-#, fuzzy, c-format
+#: elf64-sparc.c:1337
+#, c-format
msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
-msgstr "Register %%g%d används inkompatibelt: %s i %s"
+msgstr "Register %%g%d används inkompatibelt: %s i %s, tidigare %s i %s"
-#: elf64-sparc.c:1357
-#, fuzzy, c-format
+#: elf64-sparc.c:1360
+#, c-format
msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
-msgstr "Symbolen \"%s\" har olika typer: tidigare %s, REGISTER i %s"
+msgstr "Symbolen \"%s\" har olika typer: REGISTER i %s, tidigare %s i %s"
-#: elf64-sparc.c:1404
-#, fuzzy, c-format
+#: elf64-sparc.c:1406
+#, c-format
msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
-msgstr "Symbolen \"%s\" har olika typer: tidigare %s, REGISTER i %s"
+msgstr "Symbolen \"%s\" har olika typer: %s i %s, tidigare REGISTER i %s"
-#: elf64-sparc.c:3008
+#: elf64-sparc.c:2970
#, c-format
msgid "%s: linking UltraSPARC specific with HAL specific code"
msgstr "%s: länkar UltraSPARC-specifik med HAL-specifik kod"
-#: elfcode.h:1218
+#: elfcode.h:1198
#, c-format
msgid "%s: version count (%ld) does not match symbol count (%ld)"
msgstr "%s: versionsantal (%ld) stämmer inte med symbolantal (%ld)"
-#: elflink.c:434
+#: elflink.c:440
#, c-format
msgid "%s: Section %s is too large to add hole of %ld bytes"
msgstr "%s: Sektionen %s är för stor för att stoppa hål med %ld byte i"
-#: elflink.h:1113
+#: elflink.h:1090
#, c-format
msgid "%s: warning: unexpected redefinition of `%s'"
msgstr "%s: varning: oväntad omdefinition av \"%s\""
-#: elflink.h:1784
+#: elflink.h:1727
#, c-format
msgid "%s: %s: invalid version %u (max %d)"
msgstr "%s: %s: ogiltig version %u (max %d)"
-#: elflink.h:1825
+#: elflink.h:1768
#, c-format
msgid "%s: %s: invalid needed version %d"
msgstr "%s: %s: ogiltig krävd version %d"
-#: elflink.h:1945
+#: elflink.h:1890
#, c-format
msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
msgstr "Varning: storleken på symbolen \"%s\" ändrades från %lu till %lu i %s"
-#: elflink.h:4014
+#: elflink.h:3174
+#, c-format
+msgid "%s: .preinit_array section is not allowed in DSO"
+msgstr "%s: .preinit_array-sektionen är inte tillåten i DSO"
+
+#: elflink.h:4030
#, c-format
msgid "warning: type and size of dynamic symbol `%s' are not defined"
-msgstr ""
-"varning: typen och storleken på dynamiska symbolen \"%s\" är inte definierade"
+msgstr "varning: typen och storleken på dynamiska symbolen \"%s\" är inte definierade"
-#: elflink.h:4320
+#: elflink.h:4345
#, c-format
msgid "%s: undefined versioned symbol name %s"
msgstr "%s: odefinierat symbolnamn med version %s"
-#: elflink.h:4544 elflink.h:4552 elflink.h:6203 elflink.h:7280
+#: elflink.h:4611 elflink.h:4619 elflink.h:6508 elflink.h:7600
msgid "Error: out of memory"
msgstr "Fel: slut på minne"
-#: elflink.h:4714
+#: elflink.h:4781
msgid "Not enough memory to sort relocations"
msgstr "Inte tillräckligt med minne för att sortera omlokaliseringar"
-#: elflink.h:5980
+#: elflink.h:5682 elflink.h:5725
+#, c-format
+msgid "%s: could not find output section %s"
+msgstr "%s: kunde inte hitta utdatasektionen %s"
+
+#: elflink.h:5688
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr "varning: %s-sektionen har nollstorlek"
+
+#: elflink.h:6275
#, c-format
msgid "%s: could not find output section %s for input section %s"
-msgstr "%s: kunde inte hitta utdatasektion %s för indatasektionen %s"
+msgstr "%s: kunde inte hitta utdatasektionen %s för indatasektionen %s"
-#: elflink.h:6553
+#: elflink.h:6486
+#, c-format
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr "%s: omlokaliseringsstorleken stämmer inte överens i %s-sektionen %s"
+
+#: elflink.h:6849
msgid "warning: relocation against removed section; zeroing"
msgstr "varning: omlokalisering mot borttagen sektion; nollställer"
-#: elflink.h:6583
+#: elflink.h:6879
msgid "warning: relocation against removed section"
msgstr "varning: omlokalisering mot borttagen sektion"
-#: elflink.h:6596
+#: elflink.h:6892
#, c-format
msgid "local symbols in discarded section %s"
msgstr "lokala symboler i bortkastade sektionen %s"
-#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456
+#: elfxx-mips.c:734
+msgid "static procedure (no name)"
+msgstr "statisk procedur (inget namn)"
+
+#: elfxx-mips.c:1601
+msgid "not enough GOT space for local GOT entries"
+msgstr "inte tillräckligt med GOT-utrymme för lokala GOT-poster"
+
+#: elfxx-mips.c:2750
+#, c-format
+msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgstr "%s: %s+0x%lx: hoppa till stubbrutin som inte är jal"
+
+#: elfxx-mips.c:4270
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr "%s: Felaktig omlokalisering för sektion %s upptäckt"
+
+#: elfxx-mips.c:4348
+#, c-format
+msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgstr "%s: CALL16-omlokalisering vid 0x%lx är inte mot global symbol"
+
+#: elfxx-mips.c:7301
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr "%s: ogiltigt sektionsnamn \"%s\""
+
+#: elfxx-mips.c:7615
+#, c-format
+msgid "%s: linking PIC files with non-PIC files"
+msgstr "%s: länkar PIC-filer med icke-PIC-filer"
+
+#: elfxx-mips.c:7625
+#, c-format
+msgid "%s: linking abicalls files with non-abicalls files"
+msgstr "%s: länkar abicalls-filer med icke-abicalls-filer"
+
+#: elfxx-mips.c:7654
+#, c-format
+msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+msgstr "%s: ISA (-mips%d) passar inte med tidigare moduler (-mips%d)"
+
+#: elfxx-mips.c:7676
+#, c-format
+msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+msgstr "%s: ISA (%d) passar inte med tidigare moduler (%d)"
+
+#: elfxx-mips.c:7699
+#, c-format
+msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+msgstr "%s: ABI passar inte: länkar %s-modul med tidigare %s-moduler"
+
+#: elfxx-mips.c:7759
+msgid " [abi=O32]"
+msgstr " [abi=O32]"
+
+#: elfxx-mips.c:7761
+msgid " [abi=O64]"
+msgstr " [abi=O64]"
+
+#: elfxx-mips.c:7763
+msgid " [abi=EABI32]"
+msgstr " [abi=EABI32]"
+
+#: elfxx-mips.c:7765
+msgid " [abi=EABI64]"
+msgstr " [abi=EABI64]"
+
+#: elfxx-mips.c:7767
+msgid " [abi unknown]"
+msgstr " [okänt abi]"
+
+#: elfxx-mips.c:7769
+msgid " [abi=N32]"
+msgstr " [abi=N32]"
+
+#: elfxx-mips.c:7771
+msgid " [abi=64]"
+msgstr " [abi=64]"
+
+#: elfxx-mips.c:7773
+msgid " [no abi set]"
+msgstr " [inget abi inställt]"
+
+#: elfxx-mips.c:7776
+msgid " [mips1]"
+msgstr " [mips1]"
+
+#: elfxx-mips.c:7778
+msgid " [mips2]"
+msgstr " [mips2]"
+
+#: elfxx-mips.c:7780
+msgid " [mips3]"
+msgstr " [mips3]"
+
+#: elfxx-mips.c:7782
+msgid " [mips4]"
+msgstr " [mips4]"
+
+#: elfxx-mips.c:7784
+msgid " [mips5]"
+msgstr " [mips5]"
+
+#: elfxx-mips.c:7786
+msgid " [mips32]"
+msgstr " [mips32]"
+
+#: elfxx-mips.c:7788
+msgid " [mips64]"
+msgstr " [mips64]"
+
+#: elfxx-mips.c:7790
+msgid " [unknown ISA]"
+msgstr " [okänd ISA]"
+
+#: elfxx-mips.c:7793
+msgid " [mdmx]"
+msgstr " [mdmx]"
+
+#: elfxx-mips.c:7796
+msgid " [mips16]"
+msgstr " [mips16]"
+
+#: elfxx-mips.c:7799
+msgid " [32bitmode]"
+msgstr " [32-bitarsläge]"
+
+#: elfxx-mips.c:7801
+msgid " [not 32bitmode]"
+msgstr " [inte 32-bitarsläge]"
+
+#: i386linux.c:458 m68klinux.c:462 sparclinux.c:459
#, c-format
msgid "Output file requires shared library `%s'\n"
msgstr "Utdatafilen kräver delade biblioteket \"%s\"\n"
-#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464
+#: i386linux.c:466 m68klinux.c:470 sparclinux.c:467
#, c-format
msgid "Output file requires shared library `%s.so.%s'\n"
msgstr "Utdatafilen kräver delade biblioteket \"%s.so.%s\"\n"
-#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708
-#: sparclinux.c:655 sparclinux.c:705
+#: i386linux.c:655 i386linux.c:705 m68klinux.c:662 m68klinux.c:710
+#: sparclinux.c:657 sparclinux.c:707
#, c-format
msgid "Symbol %s not defined for fixups\n"
msgstr "Symbolen %s är inte definierad för fixar\n"
-#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729
+#: i386linux.c:729 m68klinux.c:734 sparclinux.c:731
msgid "Warning: fixup count mismatch\n"
msgstr "Varning: antalet fixar stämmer inte\n"
msgid "%s: unrecognized symbol `%s' flags 0x%x"
msgstr "%s: okänd symbol \"%s\" flaggor 0x%x"
-# Ett extra blanksteg i originalet här
#: ieee.c:877
-#, fuzzy, c-format
+#, c-format
msgid "%s: unimplemented ATI record %u for symbol %u"
msgstr "%s: inte implementerad ATI-post %u för symbolen %u"
msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
msgstr "%s:%d: oväntat tecken \"%s\" i hexadecimal Intel-fil\n"
-#: ihex.c:368
+#: ihex.c:366
#, c-format
msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
-msgstr ""
-"%s:%u: felaktig kontrollsumma i hexadecimal Intel-fil (förväntade %u, "
-"hittade %u)"
+msgstr "%s:%u: felaktig kontrollsumma i hexadecimal Intel-fil (förväntade %u, hittade %u)"
-#: ihex.c:422
+#: ihex.c:420
#, c-format
msgid "%s:%u: bad extended address record length in Intel Hex file"
-msgstr ""
-"%s:%u: felaktig längd på post för utökad adress i hexadecimal Intel-fil"
+msgstr "%s:%u: felaktig längd på post för utökad adress i hexadecimal Intel-fil"
-#: ihex.c:439
+#: ihex.c:437
#, c-format
msgid "%s:%u: bad extended start address length in Intel Hex file"
msgstr "%s:%u: felaktig längd på utökad startadress i hexadecimal Intel-fil"
-#: ihex.c:456
+#: ihex.c:454
#, c-format
msgid "%s:%u: bad extended linear address record length in Intel Hex file"
-msgstr ""
-"%s:%u: felaktig längd på post för utökad linjär adress i hexadecimal Intel-"
-"fil"
+msgstr "%s:%u: felaktig längd på post för utökad linjär adress i hexadecimal Intel-fil"
-#: ihex.c:473
+#: ihex.c:471
#, c-format
msgid "%s:%u: bad extended linear start address length in Intel Hex file"
-msgstr ""
-"%s:%u: felaktig längd på post för utökad linjär startadress i hexadecimal "
-"Intel-fil"
+msgstr "%s:%u: felaktig längd på post för utökad linjär startadress i hexadecimal Intel-fil"
-#: ihex.c:490
+#: ihex.c:488
#, c-format
msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
msgstr "%s:%u: okänd ihex-typ %u i hexadecimal Intel-fil\n"
-#: ihex.c:610
+#: ihex.c:607
#, c-format
msgid "%s: internal error in ihex_read_section"
msgstr "%s: internt fel i ihex_read_section"
-#: ihex.c:645
+#: ihex.c:642
#, c-format
msgid "%s: bad section length in ihex_read_section"
msgstr "%s: felaktig sektionslängd i ihex_read_sektion"
-# Verkar vara stavfel i originalet här
-#: ihex.c:863
-#, fuzzy, c-format
+#: ihex.c:860
+#, c-format
msgid "%s: address 0x%s out of range for Intel Hex file"
msgstr "%s: adressen 0x%s är utanför intervallet för hexadecimal Intel-fil"
msgid "not mapping: env var not set\n"
msgstr "mappar inte: miljövariabel är inte satt\n"
-#: libbfd.c:1467
-#, fuzzy, c-format
+#: libbfd.c:1466
+#, c-format
msgid "Deprecated %s called at %s line %d in %s\n"
-msgstr " vid %s rad %d i %s\n"
+msgstr "Föråldrad %s anropad vid %s rad %d i %s\n"
-# Skumt!
-#: libbfd.c:1470
-#, fuzzy, c-format
+#: libbfd.c:1469
+#, c-format
msgid "Deprecated %s called\n"
-msgstr "Föråldrad %s anropad"
+msgstr "Föråldrad %s anropad\n"
-#: linker.c:1849
+#: linker.c:1873
#, c-format
msgid "%s: indirect symbol `%s' to `%s' is a loop"
msgstr "%s: indirekt symbol \"%s\" till \"%s\" är en slinga"
-#: linker.c:2745
+#: linker.c:2776
#, c-format
msgid "Attempt to do relocateable link with %s input and %s output"
msgstr "Försök att göra en omlokaliseringsbar länk med %s-indata och %s-utdata"
-#: merge.c:897
+#: merge.c:892
#, c-format
msgid "%s: access beyond end of merged section (%ld + %ld)"
msgstr "%s: åtkomst bortom slut på sammanslagen sektion (%ld + %ld)"
msgid "%s: No core to allocate section name %s\n"
msgstr "%s: Ingen kärna för att allokera sektionsnamn %s\n"
-#: mmo.c:537
+#: mmo.c:536
#, c-format
msgid "%s: No core to allocate a symbol %d bytes long\n"
msgstr "%s: Ingen kärna för att allokera en %d byte lång symbol\n"
-#: mmo.c:1190
+#: mmo.c:1245
#, c-format
msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
msgstr "%s: ogiltig mmo-fil: initieringsvärde för $255 är inte \"Main\"\n"
-#: mmo.c:1336
+#: mmo.c:1391
#, c-format
-msgid ""
-"%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name "
-"starting with `%s'\n"
-msgstr ""
-"%s: bred teckensekvens som inte stöds 0x%02X 0x%02X efter symbolnamnet som "
-"börjar med \"%s\"\n"
+msgid "%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name starting with `%s'\n"
+msgstr "%s: bred teckensekvens som inte stöds 0x%02X 0x%02X efter symbolnamnet som börjar med \"%s\"\n"
-#: mmo.c:1571
+#: mmo.c:1633
#, c-format
msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
msgstr "%s: ogiltig mmo-fil: lopkod \"%d\" stöds inte\n"
-#: mmo.c:1581
+#: mmo.c:1643
#, c-format
msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
msgstr "%s: ogiltig mmo-fil: förväntade YZ = 1 fick YZ = %d för lop_quote\n"
-#: mmo.c:1617
+#: mmo.c:1679
#, c-format
msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
-msgstr ""
-"%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_loc\n"
+msgstr "%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_loc\n"
-#: mmo.c:1663
+#: mmo.c:1725
#, c-format
-msgid ""
-"%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
-msgstr ""
-"%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_fixo\n"
+msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
+msgstr "%s: ogiltig mmo-fil: förväntade z = 1 eller z = 2, fick z = %d för lop_fixo\n"
-#: mmo.c:1702
+#: mmo.c:1764
#, c-format
msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
msgstr "%s: ogiltig mmo-fil: förväntade y = 0, fick y = %d för lop_fixrx\n"
-#: mmo.c:1711
+#: mmo.c:1773
#, c-format
-msgid ""
-"%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
-msgstr ""
-"%s: ogiltig mmo-fil: förväntade z = 16 eller z = 24, fick z = %d för "
-"lop_fixr\n"
+msgid "%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
+msgstr "%s: ogiltig mmo-fil: förväntade z = 16 eller z = 24, fick z = %d för lop_fixr\n"
-#: mmo.c:1734
+#: mmo.c:1796
#, c-format
-msgid ""
-"%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d "
-"for lop_fixrx\n"
-msgstr ""
-"%s: ogiltig mmo-fil: inledande byte i operandord måste vara 0 eller 1, fick %"
-"d för lop_fixrx\n"
+msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n"
+msgstr "%s: ogiltig mmo-fil: inledande byte i operandord måste vara 0 eller 1, fick %d för lop_fixrx\n"
-#: mmo.c:1757
+#: mmo.c:1819
#, c-format
msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
msgstr "%s: kan inte allokera filnamn för fil nummer %d, %d byte\n"
-#: mmo.c:1777
+#: mmo.c:1839
#, c-format
-msgid ""
-"%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
-msgstr ""
-"%s: ogiltig mmo-fil: fil nummer %d \"%s\", var redan angiven som \"%s\"\n"
+msgid "%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
+msgstr "%s: ogiltig mmo-fil: fil nummer %d \"%s\", var redan angiven som \"%s\"\n"
-#: mmo.c:1790
+#: mmo.c:1852
#, c-format
-msgid ""
-"%s: invalid mmo file: file name for number %d was not specified before use\n"
-msgstr ""
-"%s: ogiltig mmo-fil: filnamnet för nummer %d angavs inte innan användning\n"
+msgid "%s: invalid mmo file: file name for number %d was not specified before use\n"
+msgstr "%s: ogiltig mmo-fil: filnamnet för nummer %d angavs inte innan användning\n"
-#: mmo.c:1896
+#: mmo.c:1958
#, c-format
-msgid ""
-"%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
-msgstr ""
-"%s: ogiltig mmo-fil: fälten y och z i lop_stab är icke-tomma, y: %d, z: %d\n"
+msgid "%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
+msgstr "%s: ogiltig mmo-fil: fälten y och z i lop_stab är icke-tomma, y: %d, z: %d\n"
-#: mmo.c:1932
+#: mmo.c:1994
#, c-format
msgid "%s: invalid mmo file: lop_end not last item in file\n"
msgstr "%s: ogiltig mmo-fil: lop_end är inte sista objektet i fil\n"
-#: mmo.c:1945
+#: mmo.c:2007
#, c-format
-msgid ""
-"%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras "
-"to the preceding lop_stab (%ld)\n"
-msgstr ""
-"%s: ogiltig mmo-fil: YZ i lop_end (%ld) är inte lika med antalet tetra till "
-"den föregående lop_stab (%ld)\n"
+msgid "%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras to the preceding lop_stab (%ld)\n"
+msgstr "%s: ogiltig mmo-fil: YZ i lop_end (%ld) är inte lika med antalet tetra till den föregående lop_stab (%ld)\n"
-#: mmo.c:2610
+#: mmo.c:2670
#, c-format
msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
msgstr "%s: ogiltig symboltabell: dublettsymbol \"%s\"\n"
-#: mmo.c:2898
+#: mmo.c:2921
#, c-format
-msgid ""
-"%s: Bad symbol definition: `Main' set to %s rather than the start address %"
-"s\n"
-msgstr ""
-"%s: Felaktig symboldefinition: \"Main\" är inställd till %s istället för "
-"startadressen %s\n"
+msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n"
+msgstr "%s: Felaktig symboldefinition: \"Main\" är inställd till %s istället för startadressen %s\n"
-#: mmo.c:2932
+#: mmo.c:3011
#, c-format
-msgid ""
-"%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: "
-"%d. Only `Main' will be emitted.\n"
-msgstr ""
-"%s: varning: symboltabellen är för stor för mmo, större än 65535 32-bitars "
-"ord: %d. Endast \"Main\" kommer att skickas.\n"
+msgid "%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: %d. Only `Main' will be emitted.\n"
+msgstr "%s: varning: symboltabellen är för stor för mmo, större än 65535 32-bitars ord: %d. Endast \"Main\" kommer att skickas.\n"
-#: mmo.c:2977
+#: mmo.c:3056
#, c-format
msgid "%s: internal error, symbol table changed size from %d to %d words\n"
msgstr "%s: internt fel, symboltabellen ändrade storlek från %d till %d ord\n"
-#: mmo.c:3032
+#: mmo.c:3111
#, c-format
msgid "%s: internal error, internal register section %s had contents\n"
msgstr "%s: internt fel, interna registersektionen %s hade innehåll\n"
-#: mmo.c:3084
+#: mmo.c:3163
#, c-format
msgid "%s: no initialized registers; section length 0\n"
msgstr "%s: inga initierade register; sektionslängd 0\n"
-#: mmo.c:3090
+#: mmo.c:3169
#, c-format
msgid "%s: too many initialized registers; section length %ld\n"
msgstr "%s: för många initierade register; sektionslängd %ld\n"
-#: mmo.c:3095
+#: mmo.c:3174
#, c-format
-msgid ""
-"%s: invalid start address for initialized registers of length %ld: 0x%lx%"
-"08lx\n"
-msgstr ""
-"%s: ogiltig startadress för initierade register med längden %ld: 0x%lx%08lx\n"
+msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n"
+msgstr "%s: ogiltig startadress för initierade register med längden %ld: 0x%lx%08lx\n"
-#: oasys.c:1036
+#: oasys.c:1029
#, c-format
msgid "%s: can not represent section `%s' in oasys"
msgstr "%s: kan inte representera sektionen \"%s\" i oasys"
#: peicode.h:1174
#, c-format
-msgid ""
-"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
-"archive"
+msgid "%s: Recognised but unhandled machine type (0x%x) in Import Library Format archive"
msgstr "%s: Känd men ohanterad maskintyp (0x%x) i Import Library Format-arkiv"
#: peicode.h:1191
msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
msgstr "Längd på partition[%d] = 0x%.8lx (%ld)\n"
-#: som.c:5402
+#: som.c:5398
msgid "som_sizeof_headers unimplemented"
msgstr "som_sizeof_headers är inte implementerat"
msgid "%s:%d: Unexpected character `%s' in S-record file\n"
msgstr "%s:%d: Oväntat tecken \"%s\" i S-postfil\n"
-#: syms.c:998
+# Vad är stabs?
+#: stabs.c:319
+#, c-format
+msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
+msgstr "%s(%s+0x%lx): Stabbpost har ogiltigt strängindex."
+
+#: syms.c:1044
msgid "Unsupported .stab relocation"
msgstr ".stab-omlokalisering som inte stöds"
msgid "Size mismatch section %s=%lx, %s=%lx"
msgstr "Storleken passar inte på sektion %s=%lx, %s=%lx"
-#: vms-gsd.c:704
+#: vms-gsd.c:702
#, c-format
msgid "unknown gsd/egsd subtype %d"
msgstr "okänd gsd/egsd-undertyp %d"
msgstr "Inget minne!"
#: vms-tir.c:362
-#, fuzzy, c-format
+#, c-format
msgid "bad section index in %s"
-msgstr "Felaktigt sektionsindex i ETIR_S_C_STA_PQ"
+msgstr "felaktigt sektionsindex i %s"
#: vms-tir.c:375
-#, fuzzy, c-format
+#, c-format
msgid "unsupported STA cmd %s"
-msgstr "STA-kommando %d stöds inte"
+msgstr "STA-kommando %s stöds inte"
#: vms-tir.c:380 vms-tir.c:1240
-#, fuzzy, c-format
+#, c-format
msgid "reserved STA cmd %d"
-msgstr "Reserverat STA-kommando %d"
+msgstr "reserverat STA-kommando %d"
#: vms-tir.c:491 vms-tir.c:514
-#, fuzzy, c-format
+#, c-format
msgid "%s: no symbol \"%s\""
-msgstr "%s: ingen sådan symbol"
+msgstr "%s: ingen symbol \"%s\""
#. unsigned shift
#. rotate
#. Define a literal.
#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
#: vms-tir.c:838 vms-tir.c:1563
-#, fuzzy, c-format
+#, c-format
msgid "%s: not supported"
-msgstr "stöder inte"
+msgstr "%s: stöds inte"
#: vms-tir.c:586 vms-tir.c:1418
-#, fuzzy, c-format
+#, c-format
msgid "%s: not implemented"
-msgstr "%s: oimplementerat %s\n"
+msgstr "%s: inte implementerad"
#: vms-tir.c:590 vms-tir.c:1422
-#, fuzzy, c-format
+#, c-format
msgid "reserved STO cmd %d"
-msgstr "Reserverat STO-kommando %d"
+msgstr "reserverat STO-kommando %d"
#: vms-tir.c:708 vms-tir.c:1568
-#, fuzzy, c-format
+#, c-format
msgid "reserved OPR cmd %d"
-msgstr "Reserverat OPR-kommando %d"
+msgstr "reserverat OPR-kommando %d"
#: vms-tir.c:776 vms-tir.c:1632
-#, fuzzy, c-format
+#, c-format
msgid "reserved CTL cmd %d"
-msgstr "Reserverat CTL-kommando %d"
+msgstr "reserverat CTL-kommando %d"
#. stack byte from image
#. arg: none.
#: vms-tir.c:1148
-#, fuzzy
msgid "stack-from-image not implemented"
-msgstr "Stac-from-image är inte implementerat"
+msgstr "stack-from-image är inte implementerat"
#: vms-tir.c:1166
-#, fuzzy
msgid "stack-entry-mask not fully implemented"
-msgstr "Stack-entry-mask är inte helt implementerat"
+msgstr "stack-entry-mask är inte helt implementerat"
#. compare procedure argument
#. arg: cs symbol name
msgstr "PASSMECH är inte helt implementerat"
#: vms-tir.c:1199
-#, fuzzy
msgid "stack-local-symbol not fully implemented"
-msgstr "Stack-local-symbol är inte helt implementerat"
+msgstr "stack-local-symbol är inte helt implementerat"
#: vms-tir.c:1212
-#, fuzzy
msgid "stack-literal not fully implemented"
-msgstr "Stack-literal är inte helt implementerat"
+msgstr "stack-literal är inte helt implementerat"
#: vms-tir.c:1233
-#, fuzzy
msgid "stack-local-symbol-entry-point-mask not fully implemented"
-msgstr "Stack-local-symbol-entry-point-mask är inte helt implementerat"
+msgstr "stack-local-symbol-entry-point-mask är inte helt implementerat"
#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
#: vms-tir.c:1619 vms-tir.c:1627
-#, fuzzy, c-format
+#, c-format
msgid "%s: not fully implemented"
-msgstr "PASSMECH är inte helt implementerat"
+msgstr "%s: inte helt implementerat"
#: vms-tir.c:1684
-#, fuzzy, c-format
+#, c-format
msgid "obj code %d not found"
-msgstr "Objektkod %d kunde inte hittas"
+msgstr "objektkod %d kunde inte hittas"
#: vms-tir.c:2019
#, c-format
msgid "Unhandled relocation %s"
msgstr "Ohanterad omlokalisering %s"
-#: xcofflink.c:1241
+#: xcofflink.c:1243
#, c-format
msgid "%s: `%s' has line numbers but no enclosing section"
msgstr "%s: \"%s\" har radnummer men ingen inneslutande sektion"
-#: xcofflink.c:1294
+#: xcofflink.c:1296
#, c-format
msgid "%s: class %d symbol `%s' has no aux entries"
msgstr "%s: klass %d-symbolen \"%s\" har inga yttre poster"
-#: xcofflink.c:1317
+#: xcofflink.c:1319
#, c-format
msgid "%s: symbol `%s' has unrecognized csect type %d"
msgstr "%s: symbolen \"%s\" har okänd csect-typ %d"
-#: xcofflink.c:1329
+#: xcofflink.c:1331
#, c-format
msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
msgstr "%s: felaktig XTY_ER-symbol \"%s\": klass %d scnum %d scnlen %d"
-#: xcofflink.c:1365
+#: xcofflink.c:1367
#, c-format
msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
msgstr "%s: XMC_TC0-symbolen \"%s\" är klass %d scnlen %d"
-#: xcofflink.c:1517
+#: xcofflink.c:1519
#, c-format
msgid "%s: csect `%s' not in enclosing section"
msgstr "%s: csect \"%s\" är inte i inneslutande sektion"
-#: xcofflink.c:1624
+#: xcofflink.c:1626
#, c-format
msgid "%s: misplaced XTY_LD `%s'"
msgstr "%s: felaktigt placerat XTY_LD \"%s\""
-#: xcofflink.c:1948
+#: xcofflink.c:1957
#, c-format
msgid "%s: reloc %s:%d not in csect"
msgstr "%s: omlokaliseringen %s:%d är inte i csect"
-#: xcofflink.c:2083
+#: xcofflink.c:2092
#, c-format
msgid "%s: XCOFF shared object when not producing XCOFF output"
msgstr "%s: XCOFF delade objekt när inte XCOFF-utdata produceras"
-#: xcofflink.c:2104
+#: xcofflink.c:2113
#, c-format
msgid "%s: dynamic object with no .loader section"
msgstr "%s: dynamiskt objekt utan någon .loader-sektion"
-#: xcofflink.c:2749
+#: xcofflink.c:2758
#, c-format
msgid "%s: no such symbol"
msgstr "%s: ingen sådan symbol"
-#: xcofflink.c:2890
+#: xcofflink.c:2891
msgid "error: undefined symbol __rtinit"
msgstr "fel: odefinierad symbol __rtinit"
-#: xcofflink.c:3458
+#: xcofflink.c:3453
#, c-format
msgid "warning: attempt to export undefined symbol `%s'"
msgstr "varning: försök att exportera odefinierade symbolen \"%s\""
-#: xcofflink.c:4452
+#: xcofflink.c:4447
#, c-format
msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
-msgstr ""
-"TOC ger överspill: 0x%lx > 0x10000; prova -mminimal-toc vid kompilering"
+msgstr "TOC ger överspill: 0x%lx > 0x10000; prova -mminimal-toc vid kompilering"
-#: xcofflink.c:5292 xcofflink.c:5754 xcofflink.c:5816 xcofflink.c:6117
+#: xcofflink.c:5287 xcofflink.c:5756 xcofflink.c:5818 xcofflink.c:6119
#, c-format
msgid "%s: loader reloc in unrecognized section `%s'"
msgstr "%s: inläsaromlokalisering i okända sektionen \"%s\""
-#: xcofflink.c:5314 xcofflink.c:6128
+#: xcofflink.c:5309 xcofflink.c:6130
#, c-format
msgid "%s: `%s' in loader reloc but not loader sym"
msgstr "%s: \"%s\" i inläsaromlokalisering men inte inläsarsym"
-#: xcofflink.c:5329
+#: xcofflink.c:5324
#, c-format
msgid "%s: loader reloc in read-only section %s"
msgstr "%s: inläsaromlokalisering i skrivskyddade sektionen %s"
-#: elf32-ia64.c:2189 elf64-ia64.c:2189
+#: elf32-ia64.c:2222 elf64-ia64.c:2222
msgid "@pltoff reloc against local symbol"
msgstr "@pltoff-omlokalisering mot lokal symbol"
-#: elf32-ia64.c:3413 elf64-ia64.c:3413
+#: elf32-ia64.c:3562 elf64-ia64.c:3562
#, c-format
msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
msgstr "%s: kort datasegment spillde över (0x%lx >= 0x400000)"
-#: elf32-ia64.c:3424 elf64-ia64.c:3424
+#: elf32-ia64.c:3573 elf64-ia64.c:3573
#, c-format
msgid "%s: __gp does not cover short data segment"
msgstr "%s: __gp täcker inte kort datasegment"
-#: elf32-ia64.c:3728 elf64-ia64.c:3728
+#: elf32-ia64.c:3858 elf64-ia64.c:3858
#, c-format
msgid "%s: linking non-pic code in a shared library"
msgstr "%s: länkar icke-pic-kod i delat bibliotek"
-#: elf32-ia64.c:3761 elf64-ia64.c:3761
+#: elf32-ia64.c:3891 elf64-ia64.c:3891
#, c-format
msgid "%s: @gprel relocation against dynamic symbol %s"
msgstr "%s: @gprel-omlokalisering mot dynamiska symbolen %s"
-#: elf32-ia64.c:3900 elf64-ia64.c:3900
+#: elf32-ia64.c:4030 elf64-ia64.c:4030
#, c-format
msgid "%s: dynamic relocation against speculation fixup"
msgstr "%s: dynamisk omlokalisering utan spekulationsfixar"
-#: elf32-ia64.c:3908 elf64-ia64.c:3908
+#: elf32-ia64.c:4038 elf64-ia64.c:4038
#, c-format
msgid "%s: speculation fixup against undefined weak symbol"
msgstr "%s: spekulationsfix mot odefinierad svag symbol"
-#: elf32-ia64.c:4092 elf64-ia64.c:4092
+#: elf32-ia64.c:4271 elf64-ia64.c:4271
msgid "unsupported reloc"
msgstr "omlokaliseringen stöds inte"
-#: elf32-ia64.c:4372 elf64-ia64.c:4372
+#: elf32-ia64.c:4551 elf64-ia64.c:4551
#, c-format
msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
msgstr "%s: länkar fånga-vid-NULL-dereferens med ickefångande filer"
-#: elf32-ia64.c:4381 elf64-ia64.c:4381
+#: elf32-ia64.c:4560 elf64-ia64.c:4560
#, c-format
msgid "%s: linking big-endian files with little-endian files"
msgstr "%s: länkar big endian-filer med little endian-filer"
-#: elf32-ia64.c:4390 elf64-ia64.c:4390
+#: elf32-ia64.c:4569 elf64-ia64.c:4569
#, c-format
msgid "%s: linking 64-bit files with 32-bit files"
msgstr "%s: länkar 64-bitarsfiler med 32-bitarsfiler"
-#: elf32-ia64.c:4399 elf64-ia64.c:4399
+#: elf32-ia64.c:4578 elf64-ia64.c:4578
#, c-format
msgid "%s: linking constant-gp files with non-constant-gp files"
msgstr "%s: länkar konstant-gp-filer med icke-konstant-gp-filer"
-#: elf32-ia64.c:4409 elf64-ia64.c:4409
+#: elf32-ia64.c:4588 elf64-ia64.c:4588
#, c-format
msgid "%s: linking auto-pic files with non-auto-pic files"
msgstr "%s: länkar auto-pic-filer med icke-auto-pic-filer"
"There is an import table, but the section containing it could not be found\n"
msgstr ""
"\n"
-"Det finns en importtabell, men sektionen som innehåller den kunde inte "
-"hittas\n"
+"Det finns en importtabell, men sektionen som innehåller den kunde inte hittas\n"
#: peigen.c:1076 pepigen.c:1076
#, c-format
# Vad är thunk?
#: peigen.c:1130 pepigen.c:1130
-#, fuzzy
msgid ""
" vma: Hint Time Forward DLL First\n"
" Table Stamp Chain Name Thunk\n"
-msgstr " tabell stämpel kedja namn thunk\n"
+msgstr ""
+" vma: Tips- Tids- Framåt- DLL- Första\n"
+" tabell stämpel kedja namn thunk\n"
-#: peigen.c:1180 pepigen.c:1180
+#: peigen.c:1181 pepigen.c:1181
#, c-format
msgid ""
"\n"
"\n"
"\tDLL-namn: %s\n"
-#: peigen.c:1184 peigen.c:1247 pepigen.c:1184 pepigen.c:1247
-msgid "\tvma: Hint/Ord Member-Name\n"
-msgstr "\tvma: Tips/Vanligt medlemsnamn\n"
-
-#: peigen.c:1246 pepigen.c:1246
-msgid "\tThe Import Address Table (difference found)\n"
-msgstr "\tImportadresstabellen (skillnad hittad)\n"
+#: peigen.c:1192 pepigen.c:1192
+msgid "\tvma: Hint/Ord Member-Name Bound-To\n"
+msgstr "\tvma: Tips/Ordn Medlemsnamn Bundet till\n"
-#: peigen.c:1253 pepigen.c:1253
-msgid "\t>>> Ran out of IAT members!\n"
-msgstr "\t>>> Slut på IAT-medlemmar!\n"
-
-#: peigen.c:1271 pepigen.c:1271
-msgid "\tThe Import Address Table is identical\n"
-msgstr "\tImportadresstabellen är identisk\n"
+#: peigen.c:1217 pepigen.c:1217
+msgid ""
+"\n"
+"There is a first thunk, but the section containing it could not be found\n"
+msgstr ""
+"\n"
+"Det finns en första thunk, men sektionen som innehåller den kunde inte hittas\n"
-#: peigen.c:1343 pepigen.c:1343
+#: peigen.c:1357 pepigen.c:1357
msgid ""
"\n"
"There is an export table, but the section containing it could not be found\n"
msgstr ""
"\n"
-"Det finns en exporttabell, men sektionen som innehåller den kunde inte "
-"hittas\n"
+"Det finns en exporttabell, men sektionen som innehåller den kunde inte hittas\n"
-#: peigen.c:1348 pepigen.c:1348
+#: peigen.c:1362 pepigen.c:1362
#, c-format
msgid ""
"\n"
"\n"
"Det finns en exporttabell i %s vid 0x%lx\n"
-#: peigen.c:1379 pepigen.c:1379
+#: peigen.c:1393 pepigen.c:1393
#, c-format
msgid ""
"\n"
"\n"
"Exporttabellerna (tolkade innehåll i %s-sektion)\n"
-#: peigen.c:1383 pepigen.c:1383
+#: peigen.c:1397 pepigen.c:1397
#, c-format
msgid "Export Flags \t\t\t%lx\n"
msgstr "Exportflaggor \t\t\t%lx\n"
-#: peigen.c:1386 pepigen.c:1386
+#: peigen.c:1400 pepigen.c:1400
#, c-format
msgid "Time/Date stamp \t\t%lx\n"
msgstr "Tid-/Datumstämpel \t\t%lx\n"
-#: peigen.c:1389 pepigen.c:1389
+#: peigen.c:1403 pepigen.c:1403
#, c-format
msgid "Major/Minor \t\t\t%d/%d\n"
msgstr "Övre/Undre \t\t\t%d/%d\n"
-#: peigen.c:1392 pepigen.c:1392
+#: peigen.c:1406 pepigen.c:1406
msgid "Name \t\t\t\t"
msgstr "Namn \t\t\t\t"
-#: peigen.c:1398 pepigen.c:1398
+#: peigen.c:1412 pepigen.c:1412
#, c-format
msgid "Ordinal Base \t\t\t%ld\n"
msgstr "Ordningsbas \t\t\t%ld\n"
-#: peigen.c:1401 pepigen.c:1401
+#: peigen.c:1415 pepigen.c:1415
msgid "Number in:\n"
msgstr "Tal i:\n"
-#: peigen.c:1404 pepigen.c:1404
+#: peigen.c:1418 pepigen.c:1418
#, c-format
msgid "\tExport Address Table \t\t%08lx\n"
msgstr "\tExportadresstabell \t\t%08lx\n"
-#: peigen.c:1408 pepigen.c:1408
+#: peigen.c:1422 pepigen.c:1422
#, c-format
msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
msgstr "\t[Namnpekare/Ordningstal]-tabell\t%08lx\n"
-#: peigen.c:1411 pepigen.c:1411
+#: peigen.c:1425 pepigen.c:1425
msgid "Table Addresses\n"
msgstr "Tabelladresser\n"
-#: peigen.c:1414 pepigen.c:1414
+#: peigen.c:1428 pepigen.c:1428
msgid "\tExport Address Table \t\t"
msgstr "\tExportadresstabell \t\t"
-#: peigen.c:1419 pepigen.c:1419
+#: peigen.c:1433 pepigen.c:1433
msgid "\tName Pointer Table \t\t"
msgstr "\tNamnpekartabell \t\t"
-#: peigen.c:1424 pepigen.c:1424
+#: peigen.c:1438 pepigen.c:1438
msgid "\tOrdinal Table \t\t\t"
msgstr "\tOrdningstalstabell \t\t\t"
-#: peigen.c:1439 pepigen.c:1439
+#: peigen.c:1453 pepigen.c:1453
#, c-format
msgid ""
"\n"
"\n"
"Exportadresstabell -- Orningsbas %ld\n"
-#: peigen.c:1458 pepigen.c:1458
+#: peigen.c:1472 pepigen.c:1472
msgid "Forwarder RVA"
msgstr "Vidarebefordrar-RVA"
-#: peigen.c:1469 pepigen.c:1469
+#: peigen.c:1483 pepigen.c:1483
msgid "Export RVA"
msgstr "Export-RVA"
-#: peigen.c:1476 pepigen.c:1476
+#: peigen.c:1490 pepigen.c:1490
msgid ""
"\n"
"[Ordinal/Name Pointer] Table\n"
"\n"
"[Ordningstals-/Namnpekar-]tabell\n"
-#: peigen.c:1531 pepigen.c:1531
+#: peigen.c:1545 pepigen.c:1545
#, c-format
msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
-msgstr ""
-"Varning, storleken på .pdata-sektionen (%ld) är inte en multipel av %d\n"
+msgstr "Varning, storleken på .pdata-sektionen (%ld) är inte en multipel av %d\n"
-#: peigen.c:1535 pepigen.c:1535
+#: peigen.c:1549 pepigen.c:1549
msgid ""
"\n"
"The Function Table (interpreted .pdata section contents)\n"
"\n"
"Funktionstabellen (tolkade innehåll från .pdata-sektionen)\n"
-#: peigen.c:1538 pepigen.c:1538
+#: peigen.c:1552 pepigen.c:1552
msgid " vma:\t\t\tBegin Address End Address Unwind Info\n"
msgstr " vma:\t\t\tStartadress Slutadress Ospola information\n"
-# This is broken
-#
-# #ifdef COFF_WITH_pep
-# fprintf (file,
-# _(" vma:\t\t\tBegin Address End Address Unwind Info\n"));
-# #else
-# fprintf (file,
-# _(" vma:\t\tBegin End EH EH PrologEnd Exception\n"));
-# fprintf (file,
-# _(" \t\tAddress Address Handler Data Address Mask\n"));
-#
-#: peigen.c:1540 pepigen.c:1540
-#, fuzzy
+#: peigen.c:1554 pepigen.c:1554
msgid ""
" vma:\t\tBegin End EH EH PrologEnd Exception\n"
" \t\tAddress Address Handler Data Address Mask\n"
-msgstr " vma:\t\tStart- Slut- EH- EH- Prologslut- Undantags-\n"
+msgstr ""
+" vma:\t\tStart- Slut- EH- EH- Prologsluts- Undantags-\n"
+" \t\tadress adress hanterare data adress mask\n"
-#: peigen.c:1610 pepigen.c:1610
+#: peigen.c:1624 pepigen.c:1624
msgid " Register save millicode"
msgstr " Registerspara millikod"
-#: peigen.c:1613 pepigen.c:1613
+#: peigen.c:1627 pepigen.c:1627
msgid " Register restore millicode"
msgstr " Registeråterställ millikod"
-#: peigen.c:1616 pepigen.c:1616
+#: peigen.c:1630 pepigen.c:1630
msgid " Glue code sequence"
msgstr " Klisterkodsekvens"
-#: peigen.c:1668 pepigen.c:1668
+#: peigen.c:1682 pepigen.c:1682
msgid ""
"\n"
"\n"
"\n"
"PE-filbasomlokaliseringar (tolkat innehåll i .reloc-sektionen)\n"
-#: peigen.c:1698 pepigen.c:1698
+#: peigen.c:1712 pepigen.c:1712
#, c-format
msgid ""
"\n"
"\n"
"Virtuell adress: %08lx Områdesstorlek %ld (0x%lx) Antal fixar %ld\n"
-#: peigen.c:1711 pepigen.c:1711
+#: peigen.c:1725 pepigen.c:1725
#, c-format
msgid "\treloc %4d offset %4x [%4lx] %s"
msgstr "\tomlokalisering %4d avstånd %4x [%4lx] %s"
#. The MS dumpbin program reportedly ands with 0xff0f before
#. printing the characteristics field. Not sure why. No reason to
#. emulate it here.
-#: peigen.c:1751 pepigen.c:1751
+#: peigen.c:1765 pepigen.c:1765
#, c-format
msgid ""
"\n"
"\n"
"Karakteristik 0x%x\n"
+#~ msgid "\tThe Import Address Table (difference found)\n"
+#~ msgstr "\tImportadresstabellen (skillnad hittad)\n"
+
+#~ msgid "\t>>> Ran out of IAT members!\n"
+#~ msgstr "\t>>> Slut på IAT-medlemmar!\n"
+
+#~ msgid "\tThe Import Address Table is identical\n"
+#~ msgstr "\tImportadresstabellen är identisk\n"
+
# Ska vara blanksteg här tror jag
#~ msgid "BFD %sinternal error, aborting at %s line %d\n"
#~ msgstr "Internt BFD %s-fel, avbryter vid %s rad %d\n"
#~ msgid "GP relative relocation when GP not defined"
#~ msgstr "GP-relativ omlokalisering då GP inte är definierad"
+#~ msgid "%s: ERROR: passes floats in float registers whereas target %s uses integer registers"
+#~ msgstr "%s: FEL: skickar flyttal i flyttalsregister där målet %s istället använder heltalsregister"
+
+#~ msgid "%s: ERROR: passes floats in integer registers whereas target %s uses float registers"
+#~ msgstr "%s: FEL: skickar flyttal i heltalsregister där målet %s istället använder flyttalsregister"
+
#~ msgid "Warning: input file %s supports interworking, whereas %s does not."
-#~ msgstr ""
-#~ "Varning: indatafilen %s stöder samverkande, medan %s däremot inte gör det."
+#~ msgstr "Varning: indatafilen %s stöder samverkande, medan %s däremot inte gör det."
-#~ msgid ""
-#~ "Warning: input file %s does not support interworking, whereas %s does."
-#~ msgstr ""
-#~ "Varning: indatafilen %s stöder inte samverkande, medan %s däremot gör det."
+#~ msgid "Warning: input file %s does not support interworking, whereas %s does."
+#~ msgstr "Varning: indatafilen %s stöder inte samverkande, medan %s däremot gör det."
#~ msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
#~ msgstr "AUX tagndx %ld ttlsiz 0x%lx radnummer %ld nästa %ld"
-#~ msgid ""
-#~ "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x"
-#~ "%.8lx%s\n"
-#~ msgstr ""
-#~ "elf_symbol_from_bfd_symbol 0x%.8lx, namn = %s, symbolnr = %d, flaggor = 0x"
-#~ "%.8lx%s\n"
+#~ msgid "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n"
+#~ msgstr "elf_symbol_from_bfd_symbol 0x%.8lx, namn = %s, symbolnr = %d, flaggor = 0x%.8lx%s\n"
-#~ msgid ""
-#~ "Warning: Not setting interwork flag of %s since it has already been "
-#~ "specified as non-interworking"
-#~ msgstr ""
-#~ "Varning: Ställer inte in samverkandeflaggan för %s eftersom den redan har "
-#~ "angivits som inte samverkande"
+#~ msgid "Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"
+#~ msgstr "Varning: Ställer inte in samverkandeflaggan för %s eftersom den redan har angivits som inte samverkande"
#~ msgid "Warning: Clearing the interwork flag of %s due to outside request"
-#~ msgstr ""
-#~ "Varning: Stänger av samverkandeflaggan för %s på grund av utomstående "
-#~ "begäran"
+#~ msgstr "Varning: Stänger av samverkandeflaggan för %s på grund av utomstående begäran"
+
+#~ msgid " [APCS-26]"
+#~ msgstr " [APCS-26]"
+
+#~ msgid " [APCS-32]"
+#~ msgstr " [APCS-32]"
#~ msgid "(unknown)"
#~ msgstr "(okänd)"
#~ msgid " \t\tAddress Address Handler Data Address Mask\n"
#~ msgstr " \t\tadress adress hanterare data adress mask\n"
-#~ msgid "float"
-#~ msgstr "flyttal"
-
#~ msgid "integer"
#~ msgstr "heltal"
+#~ msgid "float"
+#~ msgstr "flyttal"
+
#~ msgid "soft"
#~ msgstr "mjuk"
#~ msgstr "%s(%s+0x%lx): kan inte hitta stubbstarten %s"
#~ msgid "%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections"
-#~ msgstr ""
-#~ "%s(%s+0x%lx): kan inte omlokalisera %s, kompilera om med -ffunction-"
-#~ "sections"
-
-#~ msgid ""
-#~ "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section "
-#~ "= 0x%.8lx\n"
-#~ msgstr ""
-#~ "skapar sektionssymbol, namn = %s, värde = 0x%.8lx, index = %d, sektion = "
-#~ "0x%.8lx\n"
+#~ msgstr "%s(%s+0x%lx): kan inte omlokalisera %s, kompilera om med -ffunction-sections"
+
+#~ msgid "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = 0x%.8lx\n"
+#~ msgstr "skapar sektionssymbol, namn = %s, värde = 0x%.8lx, index = %d, sektion = 0x%.8lx\n"
# Hmm
#~ msgid " whereas segment starts at 0x%x"
srec_mkobject (abfd)
bfd *abfd;
{
+ bfd_size_type amt;
+ tdata_type *tdata;
+
srec_init ();
- if (abfd->tdata.srec_data == NULL)
- {
- bfd_size_type amt = sizeof (tdata_type);
- tdata_type *tdata = (tdata_type *) bfd_alloc (abfd, amt);
- if (tdata == NULL)
- return false;
- abfd->tdata.srec_data = tdata;
- tdata->type = 1;
- tdata->head = NULL;
- tdata->tail = NULL;
- tdata->symbols = NULL;
- tdata->symtail = NULL;
- tdata->csymbols = NULL;
- }
+ amt = sizeof (tdata_type);
+ tdata = (tdata_type *) bfd_alloc (abfd, amt);
+ if (tdata == NULL)
+ return false;
+
+ abfd->tdata.srec_data = tdata;
+ tdata->type = 1;
+ tdata->head = NULL;
+ tdata->tail = NULL;
+ tdata->symbols = NULL;
+ tdata->symtail = NULL;
+ tdata->csymbols = NULL;
return true;
}
srec_object_p (abfd)
bfd *abfd;
{
+ PTR tdata_save;
bfd_byte b[4];
srec_init ();
return NULL;
}
- if (! srec_mkobject (abfd)
- || ! srec_scan (abfd))
- return NULL;
+ tdata_save = abfd->tdata.any;
+ if (! srec_mkobject (abfd) || ! srec_scan (abfd))
+ {
+ if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL)
+ bfd_release (abfd, abfd->tdata.any);
+ abfd->tdata.any = tdata_save;
+ return NULL;
+ }
if (abfd->symcount > 0)
abfd->flags |= HAS_SYMS;
symbolsrec_object_p (abfd)
bfd *abfd;
{
+ PTR tdata_save;
char b[2];
srec_init ();
return NULL;
}
- if (! srec_mkobject (abfd)
- || ! srec_scan (abfd))
- return NULL;
+ tdata_save = abfd->tdata.any;
+ if (! srec_mkobject (abfd) || ! srec_scan (abfd))
+ {
+ if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL)
+ bfd_release (abfd, abfd->tdata.any);
+ abfd->tdata.any = tdata_save;
+ return NULL;
+ }
if (abfd->symcount > 0)
abfd->flags |= HAS_SYMS;
extern const bfd_target bfd_elf32_bigarc_vec;
extern const bfd_target bfd_elf32_bigarm_oabi_vec;
extern const bfd_target bfd_elf32_bigarm_vec;
+extern const bfd_target bfd_elf32_bigarmqnx_vec;
extern const bfd_target bfd_elf32_bigmips_vec;
extern const bfd_target bfd_elf32_cris_vec;
extern const bfd_target bfd_elf32_d10v_vec;
extern const bfd_target bfd_elf32_littlearc_vec;
extern const bfd_target bfd_elf32_littlearm_oabi_vec;
extern const bfd_target bfd_elf32_littlearm_vec;
+extern const bfd_target bfd_elf32_littlearmqnx_vec;
extern const bfd_target bfd_elf32_littlemips_vec;
extern const bfd_target bfd_elf32_m32r_vec;
extern const bfd_target bfd_elf32_m68hc11_vec;
extern const bfd_target bfd_elf32_mcore_little_vec;
extern const bfd_target bfd_elf32_mn10200_vec;
extern const bfd_target bfd_elf32_mn10300_vec;
+extern const bfd_target bfd_elf32_nbigmips_vec;
+extern const bfd_target bfd_elf32_nlittlemips_vec;
+extern const bfd_target bfd_elf32_ntradbigmips_vec;
+extern const bfd_target bfd_elf32_ntradlittlemips_vec;
extern const bfd_target bfd_elf32_openrisc_vec;
extern const bfd_target bfd_elf32_or32_big_vec;
extern const bfd_target bfd_elf32_pj_vec;
extern const bfd_target bfd_elf32_pjl_vec;
extern const bfd_target bfd_elf32_powerpc_vec;
extern const bfd_target bfd_elf32_powerpcle_vec;
+extern const bfd_target bfd_elf32_powerpcleqnx_vec;
+extern const bfd_target bfd_elf32_powerpcqnx_vec;
extern const bfd_target bfd_elf32_s390_vec;
extern const bfd_target bfd_elf32_sh64_vec;
extern const bfd_target bfd_elf32_sh64l_vec;
&bfd_elf32_mcore_little_vec,
&bfd_elf32_mn10200_vec,
&bfd_elf32_mn10300_vec,
+#ifdef BFD64
+ &bfd_elf32_nbigmips_vec,
+ &bfd_elf32_nlittlemips_vec,
+ &bfd_elf32_ntradbigmips_vec,
+ &bfd_elf32_ntradlittlemips_vec,
+#endif
&bfd_elf32_openrisc_vec,
&bfd_elf32_or32_big_vec,
&bfd_elf32_pj_vec,
&bfd_elf32_pjl_vec,
&bfd_elf32_powerpc_vec,
&bfd_elf32_powerpcle_vec,
+ &bfd_elf32_powerpcleqnx_vec,
+ &bfd_elf32_powerpcqnx_vec,
&bfd_elf32_s390_vec,
&bfd_elf32_sh_vec,
&bfd_elf32_shblin_vec,
{
struct ext_vheader ext;
unsigned char len;
+ tdata_type *tdata_save;
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
return NULL;
/* OK, looks like a record, build the tdata and read in. */
- if (!versados_mkobject (abfd)
- || !versados_scan (abfd))
- return NULL;
+ tdata_save = abfd->tdata.versados_data;
+ if (!versados_mkobject (abfd) || !versados_scan (abfd))
+ {
+ abfd->tdata.versados_data = tdata_save;
+ return NULL;
+ }
return abfd->xvec;
}
-#define BFD_VERSION_DATE 20020722
+#define BFD_VERSION_DATE 20020809
if (PRIV (buf_size) == 0)
{
+ bfd_size_type amt;
+
if (PRIV (is_vax))
{
- PRIV (vms_buf) = (unsigned char *) malloc (OBJ_S_C_MAXRECSIZ);
- PRIV (buf_size) = OBJ_S_C_MAXRECSIZ;
+ amt = OBJ_S_C_MAXRECSIZ;
PRIV (file_format) = FF_VAX;
}
else
- PRIV (vms_buf) = (unsigned char *) malloc (6);
+ amt = 6;
+ PRIV (vms_buf) = (unsigned char *) bfd_malloc (amt);
+ PRIV (buf_size) = amt;
}
vms_buf = PRIV (vms_buf);
if (vms_buf == 0)
- {
- bfd_set_error (bfd_error_no_memory);
- return -1;
- }
+ return -1;
switch (PRIV (file_format))
{
if (PRIV (is_vax))
{
PRIV (rec_length) = bfd_bread (vms_buf, (bfd_size_type) PRIV (buf_size),
- abfd);
+ abfd);
if (PRIV (rec_length) <= 0)
{
bfd_set_error (bfd_error_file_truncated);
{
/* extract vms record length */
- _bfd_vms_get_header_values (abfd, vms_buf+test_start, NULL,
+ _bfd_vms_get_header_values (abfd, vms_buf + test_start, NULL,
&PRIV (rec_length));
if (PRIV (rec_length) <= 0)
if (PRIV (rec_length) > PRIV (buf_size))
{
PRIV (vms_buf) = ((unsigned char *)
- realloc (vms_buf, (size_t) PRIV (rec_length)));
+ bfd_realloc (vms_buf,
+ (bfd_size_type) PRIV (rec_length)));
vms_buf = PRIV (vms_buf);
if (vms_buf == 0)
- {
- bfd_set_error (bfd_error_no_memory);
- return -1;
- }
+ return -1;
PRIV (buf_size) = PRIV (rec_length);
}
if (sptr != NULL)
return sptr;
- newptr = (vms_section *) bfd_malloc ((bfd_size_type) sizeof (vms_section));
+ newptr = (vms_section *) bfd_alloc (abfd,
+ (bfd_size_type) sizeof (vms_section));
if (newptr == (vms_section *) NULL)
return NULL;
newptr->contents = (unsigned char *) bfd_alloc (abfd, section->_raw_size);
int i;
bfd_size_type amt;
- if (abfd->tdata.any != 0)
- return true;
-
bfd_set_start_address (abfd, (bfd_vma) -1);
amt = sizeof (struct vms_private_data_struct);
- abfd->tdata.any = (struct vms_private_data_struct*) bfd_malloc (amt);
+ abfd->tdata.any = (struct vms_private_data_struct*) bfd_alloc (abfd, amt);
if (abfd->tdata.any == 0)
return false;
PRIV (sections) = NULL;
amt = sizeof (struct stack_struct) * STACKSIZE;
- PRIV (stack) = (struct stack_struct *) bfd_malloc (amt);
+ PRIV (stack) = (struct stack_struct *) bfd_alloc (abfd, amt);
if (PRIV (stack) == 0)
- {
- vms_init_no_mem1:
- free (abfd->tdata.any);
- abfd->tdata.any = 0;
- return false;
- }
+ goto error_ret1;
PRIV (stackptr) = 0;
amt = sizeof (struct bfd_hash_table);
- PRIV (vms_symbol_table) = (struct bfd_hash_table *) bfd_malloc (amt);
+ PRIV (vms_symbol_table) = (struct bfd_hash_table *) bfd_alloc (abfd, amt);
if (PRIV (vms_symbol_table) == 0)
- {
- vms_init_no_mem2:
- free (PRIV (stack));
- PRIV (stack) = 0;
- goto vms_init_no_mem1;
- }
+ goto error_ret1;
if (!bfd_hash_table_init (PRIV (vms_symbol_table), _bfd_vms_hash_newfunc))
- return false;
+ goto error_ret1;
amt = sizeof (struct location_struct) * LOCATION_SAVE_SIZE;
- PRIV (location_stack) = (struct location_struct *) bfd_malloc (amt);
+ PRIV (location_stack) = (struct location_struct *) bfd_alloc (abfd, amt);
if (PRIV (location_stack) == 0)
- {
- vms_init_no_mem3:
- free (PRIV (vms_symbol_table));
- PRIV (vms_symbol_table) = 0;
- goto vms_init_no_mem2;
- }
+ goto error_ret2;
for (i = 0; i < VMS_SECTION_COUNT; i++)
PRIV (vms_section_table)[i] = NULL;
- PRIV (output_buf) = (unsigned char *) malloc (MAX_OUTREC_SIZE);
+ amt = MAX_OUTREC_SIZE;
+ PRIV (output_buf) = (unsigned char *) bfd_alloc (abfd, amt);
if (PRIV (output_buf) == 0)
- {
- free (PRIV (location_stack));
- PRIV (location_stack) = 0;
- goto vms_init_no_mem3;
- }
+ goto error_ret2;
+
PRIV (push_level) = 0;
PRIV (pushed_size) = 0;
PRIV (length_pos) = 2;
PRIV (output_alignment) = 1;
return true;
+
+ error_ret2:
+ bfd_hash_table_free (PRIV (vms_symbol_table));
+ error_ret1:
+ bfd_release (abfd, abfd->tdata.any);
+ abfd->tdata.any = 0;
+ return false;
}
/* Fill symbol->section with section ptr
int prev_type;
const struct bfd_target *target_vector = 0;
const bfd_arch_info_type *arch = 0;
+ PTR tdata_save = abfd->tdata.any;
#if VMS_DEBUG
vms_debug (1, "vms_object_p(%p)\n", abfd);
#endif
if (!vms_initialize (abfd))
- {
- fprintf (stderr, "vms_initialize () failed !!\n");
- return 0;
- }
+ goto error_ret;
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET))
- {
- bfd_set_error (bfd_error_file_truncated);
- return 0;
- }
+ goto err_wrong_format;
prev_type = -1;
#if VMS_DEBUG
vms_debug (2, "next_record failed\n");
#endif
- bfd_set_error (bfd_error_wrong_format);
- return 0;
+ goto err_wrong_format;
}
if ((prev_type == EOBJ_S_C_EGSD)
#if VMS_DEBUG
vms_debug (2, "vms_fixup_sections failed\n");
#endif
- bfd_set_error (bfd_error_wrong_format);
- return 0;
+ goto err_wrong_format;
}
}
#if VMS_DEBUG
vms_debug (2, "slurp type %d failed with %d\n", prev_type, err);
#endif
- bfd_set_error (bfd_error_wrong_format);
- return 0;
+ goto err_wrong_format;
}
}
while ((prev_type != EOBJ_S_C_EEOM) && (prev_type != OBJ_S_C_EOM) && (prev_type != OBJ_S_C_EOMW));
#if VMS_DEBUG
vms_debug (2, "vms_fixup_sections failed\n");
#endif
- bfd_set_error (bfd_error_wrong_format);
- return 0;
+ goto err_wrong_format;
}
/* set arch_info to vax */
#if VMS_DEBUG
vms_debug (2, "arch not found\n");
#endif
- bfd_set_error (bfd_error_wrong_format);
- return 0;
+ goto err_wrong_format;
}
abfd->arch_info = arch;
return target_vector;
+
+ err_wrong_format:
+ bfd_set_error (bfd_error_wrong_format);
+ error_ret:
+ if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL)
+ bfd_release (abfd, abfd->tdata.any);
+ abfd->tdata.any = tdata_save;
+ return NULL;
}
/* Check the format for a file being read.
#endif
if (!vms_initialize (abfd))
- {
- fprintf (stderr, "vms_initialize () failed !!\n");
- return 0;
- }
+ return 0;
{
#ifdef __VAX
vms_close_and_cleanup (abfd)
bfd *abfd;
{
- asection *sec;
- vms_section *es, *es1;
- int i;
-
#if VMS_DEBUG
vms_debug (1, "vms_close_and_cleanup(%p)\n", abfd);
#endif
return true;
if (PRIV (vms_buf) != NULL)
- {
- free (PRIV (vms_buf));
- PRIV (vms_buf) = NULL;
- }
- PRIV (buf_size) = 0;
-
- if (PRIV (output_buf) != 0)
- {
- free (PRIV (output_buf));
- PRIV (output_buf) = 0;
- }
-
- sec = abfd->sections;
- while (sec != NULL)
- {
- if (sec->contents)
- free (sec->contents);
- sec = sec->next;
- }
+ free (PRIV (vms_buf));
if (PRIV (sections) != NULL)
- {
- free (PRIV (sections));
- PRIV (sections) = NULL;
- }
+ free (PRIV (sections));
if (PRIV (vms_symbol_table))
- {
- bfd_hash_table_free (PRIV (vms_symbol_table));
- PRIV (vms_symbol_table) = 0;
- }
-
- if (PRIV (stack))
- {
- free (PRIV (stack));
- PRIV (stack) = 0;
- }
-
- if (PRIV (location_stack))
- {
- free (PRIV (location_stack));
- PRIV (location_stack) = 0;
- }
-
- for (i = 0; i < VMS_SECTION_COUNT; i++)
- {
- es = PRIV (vms_section_table)[i];
- while (es != NULL)
- {
- es1 = es->next;
- free (es);
- es = es1;
- }
- PRIV (vms_section_table)[i] = NULL;
- }
+ bfd_hash_table_free (PRIV (vms_symbol_table));
- free (abfd->tdata.any);
+ bfd_release (abfd, abfd->tdata.any);
abfd->tdata.any = NULL;
return true;
isym.n_value = (h->root.u.def.section->output_section->vma
+ h->root.u.def.section->output_offset
+ h->root.u.def.value);
- isym.n_scnum = h->root.u.def.section->output_section->target_index;
+ if (bfd_is_abs_section (h->root.u.def.section->output_section))
+ isym.n_scnum = N_ABS;
+ else
+ isym.n_scnum = h->root.u.def.section->output_section->target_index;
isym.n_sclass = C_HIDEXT;
aux.x_csect.x_smtyp = XTY_SD;
hppa*-*-*elf* | \
parisc*-*-linux* | hppa*-*-linux* | \
hppa*-*-lites* | \
+ hppa*-*-openbsd* | \
hppa*64*-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
# Do configure ld/binutils/gas for this case.
# if the --with-newlib option has been given, because otherwise
# 'target-newlib' will appear in skipdirs.
;;
- *-*-linux*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
- ;;
i[3456]86-*-mingw32*)
target_configdirs="$target_configdirs target-mingw"
noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
powerpc-*-eabi)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ powerpc64*-*-linux*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ # not yet ported.
+ noconfigdirs="$noconfigdirs target-libffi"
+ ;;
rs6000-*-lynxos*)
noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
;;
noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
;;
mips*-*-linux*)
- noconfigdirs="$noconfigdirs target-libffi"
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
mips*-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}"
ip2k-*-*)
noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
;;
+ *-*-linux*)
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ ;;
*-*-lynxos*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
(mi_execute_command): Don't print the prompt if the command return
is MI_CMD_QUIET.
+2002-08-09 Grace Sainsbury <graces@redhat.com>
+
+ * remote.c: (remote_wait, remote_async_wait): Add check for awatch
+ T-packets; the 'a' is not taken as a register number.
+ (remote_check_watch_resources, remote_stopped_by_watchpoint)
+ (remote_stopped_data_address): New functions; add to target
+ vector.
+ (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint): Change
+ prototypes to match other implementations of this
+ function. replace integer argument with pointer -- the length
+ field in the Z-packet is the length of what is pointed to or 1 if
+ pointer is null. Add to target vector.
+ (remote_insert_watchpoint, remote_remove_watchpoint): Add to
+ target vector.
+
+ From Mark Salter:
+ * remote.c (remote_wait): Add support to extract optional
+ watchpoint information from T-packet. Ignore unrecognized
+ optional info in T-packet.
+ (remote_async_wait): Ditto.
+
+2002-08-09 Corinna Vinschen <vinschen@redhat.com>
+
+ * cli/cli-dump.c: Change fopen modes to use binary open modes
+ as defined in include/fopen-bin.h throughout.
+
+2002-08-08 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c: Minor whitespace and indentation clean-ups.
+
+2002-08-08 Kevin Buettner <kevinb@redhat.com>
+
+ * doublest.c (store_floating): Avoid floatformat_from_doublest()
+ assertion failure by returning early after a warning.
+
+2002-08-08 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_find_saved_regs): Make static.
+ (mips_frame_init_saved_regs): New function.
+ (mips_gdbarch_init): Setup FRAME_INIT_SAVED_REGS method.
+ * config/mips/tm-mips.h (FRAME_INIT_SAVED_REGS): Delete macro.
+ (mips_find_saved_regs): Delete declaration.
+
+2002-08-08 Grace Sainsbury <graces@redhat.com>
+
+ * remote.c (remote_wait, remote_async_wait): Change
+ thread_num from int to ULONGEST.
+ (unpack_varlen_hex): Change result parameter from
+ int * to ULONGEST *.
+
+2002-08-08 Andrew Cagney <ac131313@redhat.com>
+
+ * configure.tgt: Replace powerpc-*-sysv*, powerpc-*-elf*,
+ powerpcle-*-eabi*, powerpcle-*-sysv* and powerpcle-*-elf* with
+ powerpc*-*-*.
+ * MAINTAINERS: Remove redundant rs6000-ibm-aix4.1 target.
+
+2002-08-08 Andrew Cagney <cagney@redhat.com>
+
+ * gcore.c (override_derive_stack_segment): Delete variable.
+ (preempt_derive_stack_segment): Delete function.
+ (derive_stack_segment): Delete function.
+ (default_derive_stack_segment): Renamed to derive_stack_segment.
+ (override_derive_heap_segment): Delete variable.
+ (preempt_derive_heap_segment): Delete function.
+ (derive_heap_segment): Delete function.
+ (default_derive_heap_segment): Rename to derive_heap_segment.
+
+2002-08-06 Michael Snyder <msnyder@redhat.com>
+
+ * config/mips/tm-mips.h: Remove #define USE_STRUCT_CONVENTION.
+ * mips-tdep.c (mips_EABI_use_struct_convention,
+ mips_OABI_use_struct_convention, mips_NABI_use_struct_convention):
+ New functions. (mips_use_struct_convention): Delete.
+ (mips_gdbarch_init): set use_gdbarch_convention.
+
+2002-08-06 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c: gdbarch-ify reg_struct_has_addr.
+ (mips_eabi_reg_struct_has_addr, mips_n32n64_reg_struct_has_addr,
+ mips_o32_reg_struct_has_addr): New functions.
+ (mips_gdbarch_init): Set gdbarch reg_struct_has_addr.
+
+2002-08-07 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.c (pseudo_register): Delete function.
+ (fetch_register): Delete function.
+ (store_register): Delete function.
+ (regcache_raw_read, legacy_read_register_gen): Use
+ target_fetch_registers instead of fetch_register.
+ (legacy_write_register_gen, regcache_raw_write): Use
+ target_store_register instead of store_register.
+ (write_register_bytes): Ditto.
+
+ * gdbarch.sh (FETCH_PSEUDO_REGISTER): Delete.
+ (STORE_PSEUDO_REGISTER): Delete.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2002-08-06 Corinna Vinschen <vinschen@redhat.com>
+
+ * cli/cli-dump.c (add_dump_command): Explicitely use "b" flag to
+ write dump file binary.
+
+2002-08-05 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_find_saved_regs): Adjust stack according
+ to MIPS_SAVED_REGSIZE, not GDB_TARGET_IS_MIPS64. Enhance comment.
+ (mips_gdbarch_init): Set N32 target to be mips64.
+
+2002-08-06 Kevin Buettner <kevinb@redhat.com>
+
+ * frame.c (find_saved_register): Break out of loop once saved
+ register address is found. Don't mention sparc in loop comment
+ anymore.
+
+2002-08-06 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): For the N32 ABI, set
+ mips_default_saved_regsize to 8.
+
+2002-08-06 Andrew Cagney <ac131313@redhat.com>
+
+ * gcore.c: Do not include <sys/procfs.h>.
+ * Makefile.in (gcore.o): Update dependencies.
+
+2002-08-06 Andrew Cagney <cagney@redhat.com>
+
+ * configure.tgt: Make arc-*-* obsolete.
+ * NEWS: Mention that arc-*-* has been identifed as obsolete.
+ * MAINTAINERS: Make arc-elf obsolete.
+ * arc-tdep.c: Make file obsolete.
+ * config/arc/arc.mt: Ditto.
+ * config/arc/tm-arc.h: Ditto.
+
+2002-08-05 Theodore A. Roth <troth@verinet.com>
+
+ * gdb/avr-tdep.c(avr_skip_prologue): Fix to return the correct pc.
+
+2002-08-05 Andrew Cagney <ac131313@redhat.com>
+
+ * mcore-tdep.c (mcore_gdbarch_init): Use
+ generic_unwind_get_saved_register instead of
+ generic_get_saved_register.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * config/mn10200/tm-mn10200.h (GET_SAVED_REGISTER): Ditto.
+ * config/h8300/tm-h8300.h (GET_SAVED_REGISTER): Ditto.
+
+2002-08-05 Joel Brobecker <brobecker@gnat.com>
+
+ * objfiles.h: Add missing #include "symfile.h"
+
+ * Makefile.in (objfiles_h): Add dependency on symfile.h and dependents.
+
+2002-08-04 Andrew Cagney <ac131313@redhat.com>
+
+ From 2002-08-01 david carlton <carlton@math.stanford.edu>:
+ * hpread.c (hpread_read_struct_type): Deleted superfluous setting
+ of FIELD_BITSIZE.
+
+2002-08-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * NEWS: Cleanup and nitpick.
+
+2002-08-03 Andrew Cagney <ac131313@redhat.com>
+
+ * NEWS: Cleanup. Use *-linux*-gnu*. Only use `*' for headings.
+
+2002-08-03 Andrew Cagney <ac131313@redhat.com>
+
+ * Makefile.in (gdbtk-bp.o): Update dependencies.
+ (gdbtk-register.o): Ditto.
+ (gdbtk-varobj.o): Ditto.
+
+2002-08-03 Andrew Cagney <cagney@redhat.com>
+
+ * m68hc11-tdep.c (m68hc11_pseudo_register_read): Replace
+ m68hc11_fetch_pseudo_register.
+ (m68hc11_pseudo_register_write): Replace
+ m68hc11_store_pseudo_register.
+ (m68hc11_gdbarch_init): Update.
+
+Fri Aug 2 15:53:50 2002 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh: Include "gdb_string.h".
+ * gdbarch.c: Regenerate.
+
+ * regcache.c: Include "gdb_string.h".
+ * ax-general.c: Ditto.
+ * varobj.c: Ditto.
+ * std-regs.c: Ditto.
+ * fbsd-proc.c: Ditto.
+ * thread.c: Ditto.
+
+ * Makefile.in (regcache.o): Update dependencies.
+ (thread.o, gdbarch.o): Ditto.
+ (ax-general.o, gdbarch.o): Ditto.
+ (varobj.o, std-regs.o): Ditto.
+ (fbsd-proc.o): Specify dependencies.
+
+2002-08-02 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (regcache_cooked_read): Rename rawnum parameter to
+ regnum.
+ (regcache_cooked_write): Ditto.
+
+2002-08-02 Andrew Cagney <ac131313@redhat.com>
+
+ * regcache.c (regcache_cooked_read): New function.
+ (regcache_cooked_write): New function.
+ (read_register_gen): Rewrite using regcache_cooked_read.
+ (write_register_gen): Rewrite using regcache_cooked_write.
+
+ * regcache.h (regcache_cooked_read, regcache_cooked_write):
+ Declare.
+
+2002-08-02 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (pseudo_register_read, pseudo_register_write):
+ Replace the architecture methods register_read and register_write.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * regcache.c (init_regcache_descr): Update.
+ (read_register_gen): Update.
+ (write_register_gen): Update.
+ (supply_register): Update comment.
+
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ (sh_pseudo_register_read, sh64_pseudo_register_read): Add
+ `regcache' and `gdbarch' parameters. Make `buffer' a void
+ pointer. Update code.
+ (sh_pseudo_register_write, sh64_pseudo_register_write): Add
+ `regcache' and `gdbarch' parameters. Make `buffer' a constant
+ void pointer. Update code.
+ (sh64_register_write): Delete.
+ (sh4_register_read): Delete.
+ (sh64_register_read): Delete.
+ (sh4_register_write): Delete.
+ (sh_sh4_register_convert_to_raw): Make `from' parameter a constant
+ void pointer, `to' parameter a void pointer.
+ (sh_sh64_register_convert_to_raw): Ditto.
+
+2002-08-01 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_register_virtual_type): Use architecture
+ invariant return values.
+
+2002-08-01 Andrew Cagney <cagney@redhat.com>
+
+ * linux-proc.c: Include "gdb_string.h".
+ * Makefile.in (linux-proc.o): Update dependency list.
+
+2002-08-01 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Add comments. Fix typo in
+ comment.
+
+2002-08-01 Grace Sainsbury <graces@redhat.com>
+
+ * target.h: Add to_insert_hw_breakpoint, to_remove_hw_breakpoint,
+ to_insert_watchpoint, to_remove_watchpoint,
+ to_stopped_by_watchpoint, to_stopped_data_address,
+ to_region_size_ok_for_hw_watchpoint, to_can_use_hw_breakpoint to
+ target vecctor. Define their corresponding macros so they call
+ them.
+
+ * target.c: Add default and debug versions of for
+ to_insert_hw_breakpoint, to_remove_hw_breakpoint,
+ to_insert_watchpoint, to_remove_watchpoint,
+ to_stopped_by_watchpoint, to_stopped_data_address,
+ to_region_size_ok_for_hw_watchpoint, to_can_use_hw_breakpoint.
+
+2002-08-01 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_register_virtual_type): New function.
+ (mips_gdbarch_init): Register mips_register_virtual_type()
+ with gdbarch machinery.
+ * config/mips/tm-irix6.h (mips/tm-bigmips64.h): Include
+ this file instead of tm-bigmips.h.
+ (MIPS_REGSIZE): Delete this macro.
+ (REGISTER_VIRTUAL_TYPE): Delete macro. Undef macro so that
+ multiarch version in mips-tdep.c will be found.
+
+2002-08-01 Andrew Cagney <cagney@redhat.com>
+
+ * NEWS: Menion that CHILL has been made obsolete.
+
+ * gdbtypes.c (chill_varying_type): Make chill references obsolete.
+ * gdbserver/Makefile.in: Ditto.
+ * stabsread.c (read_range_type): Ditto.
+ * gdbtypes.h: Ditto.
+ * language.c (binop_type_check): Ditto.
+ (binop_result_type): Ditto.
+ (integral_type): Ditto.
+ (character_type): Ditto.
+ (string_type): Ditto.
+ (boolean_type): Ditto.
+ (structured_type): Ditto.
+ (lang_bool_type): Ditto.
+ (binop_type_check): Ditto.
+ * language.h (_LANG_chill): Ditto.
+ * dwarfread.c (set_cu_language): Ditto.
+ * dwarfread.c (CHILL_PRODUCER): Ditto.
+ * dwarfread.c (handle_producer): Ditto.
+ * expression.h (enum exp_opcode): Ditto.
+ * eval.c: Ditto for comments.
+ * typeprint.c (typedef_print) [_LANG_chill]: Ditto.
+ * expprint.c (print_subexp): Ditto.
+ (print_subexp): Ditto.
+ * valops.c (value_cast): Ditto.
+ (search_struct_field): Ditto.
+ * value.h (COERCE_VARYING_ARRAY): Ditto.
+ * symfile.c (init_filename_language_table): Ditto.
+ (add_psymbol_with_dem_name_to_list): Ditto.
+ * valarith.c (value_binop): Ditto.
+ (value_neg): Ditto.
+ * valops.c (value_slice): Ditto.
+ * symtab.h (union language_specific): Ditto.
+ (SYMBOL_INIT_LANGUAGE_SPECIFIC): Ditto.
+ (SYMBOL_DEMANGLED_NAME): Ditto.
+ (SYMBOL_CHILL_DEMANGLED_NAME): Ditto.
+ * defs.h (enum language): Ditto.
+ * symtab.c (got_symtab): Ditto.
+ * utils.c (fprintf_symbol_filtered): Ditto.
+
+ * ch-typeprint.c: Make file obsolete.
+ * ch-valprint.c: Make file obsolete.
+ * ch-lang.h: Make file obsolete.
+ * ch-exp.c: Make file obsolete.
+ * ch-lang.c: Make file obsolete.
+
+ * Makefile.in (FLAGS_TO_PASS): Do not pass CHILL or CHILLFLAGS or
+ CHILL_LIB.
+ (TARGET_FLAGS_TO_PASS): Ditto.
+ (CHILLFLAGS): Obsolete.
+ (CHILL): Obsolete.
+ (CHILL_FOR_TARGET): Obsolete.
+ (CHILL_LIB): Obsolete.
+ (SFILES): Remove ch-exp.c, ch-lang.c, ch-typeprint.c and
+ ch-valprint.c.
+ (HFILES_NO_SRCDIR): Remove ch-lang.h.
+ (COMMON_OBS): Remove ch-valprint.o, ch-typeprint.o, ch-exp.o and
+ ch-lang.o.
+ (ch-exp.o, ch-lang.o, ch-typeprint.o, ch-valprint.o): Delete
+ targets.
+
+2002-07-31 Joel Brobecker <brobecker@gnat.com>
+
+ * dwarf2read.c (set_cu_language): Add handler for LANG_Ada95.
+ This does not change anything at the moment, but will be helpful
+ later when full Ada support is integrated.
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (_initialize_mips_tdep): Add "n64" to "set mips abi"
+ help message.
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_push_arguments): Fetch gdbarch_tdep struct
+ and save it in a local variable. Use variable in later test.
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips_find_abi_section): Add N64 ABI recognition
+ test. (Thanks to Daniel Jacobowitz.)
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (enum mips_abi): Add MIPS_ABI_N64.
+ (mips_abi_strings): Add "n64".
+ (mips_gdbarch_init): Add test for n64 abi. Add MIPS_ABI_N64 case.
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * config/mips/tm-irix6.h (MIPS_REGSIZE): Define to be 8.
+ (REGISTER_VIRTUAL_TYPE): Some registers are now 64 bits wide.
+
+2002-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * utils.c (host_pointer_to_address, address_to_host_pointer):
+ Use gdb_assert() instead of explicit call to internal_error().
+
+2002-07-30 Kevin Buettner <kevinb@redhat.com>
+
+ * Makefile.in (rs6000-nat.o): Update dependencies.
+
+ From Nicholas Duffek:
+ * Makefile.in (ALLDEPFILES): Add aix-thread.c.
+ (aix-thread.o): New rule.
+ * configure.host (gdb_host): Set to aix432 on AIX 4.3.2+.
+ * config/powerpc/aix432.mh: New file.
+
+2002-07-30 Daniel Jacobowitz <drow@mvista.com>
+
+ * ppc-linux-tdep.c (ELF_NGREG, ELF_NFPREG, ELF_NVRREG)
+ (ELF_FPREGSET_SIZE, ELF_GREGSET_SIZE): New enums.
+ (fetch_core_registers, ppc_linux_supply_gregset)
+ (ppc_linux_supply_fpregset): New functions.
+ (ppc_linux_regset_core_fns): New.
+ (_initialize_ppc_linux_tdep): Call add_core_fns.
+ * ppc-tdep.h: Add prototypes for ppc_linux_supply_fpregset
+ and ppc_linux_supply_gregset.
+ * ppc-linux-nat.c (supply_gregset): Call ppc_linux_supply_gregset.
+ (supply_fpregset): Call ppc_linux_supply_fpregset.
+ * config/powerpc/linux.mh (NATDEPFILES): Remove core-regset.o and
+ corelow.o.
+ * config/powerpc/linux.mt (TDEPFILES): Add corelow.o.
+
+2002-07-30 Daniel Jacobowitz <drow@mvista.com>
+
+ * symtab.c (lookup_symbol): Demangle before lowercasing.
+
+2002-07-30 Andrew Cagney <ac131313@redhat.com>
+
+ * symtab.h: Replace #include "gdb_obstack.h" with opaque
+ declaration.
+ * cli/cli-cmds.c, cli/cli-script.c: Include "gdb_string.h".
+ * gnu-v3-abi.c, arc-tdep.c, cli/cli-decode.c: Ditto.
+ * avr-tdep.c, mon960-rom.c, i960-tdep.c: Ditto.
+ * arch-utils.c, cli/cli-setshow.c: Unconditionally include
+ "gdb_string.h".
+ * Makefile.in (cli-script.o, cli-cmds.o): Update dependencies.
+ (gnu-v3-abi.o, cli-setshow.o, i960-tdep.o): Ditto.
+ (cli-decode.o, mi-cmd-var.o, mi-cmd-disas.o): Ditto.
+ (avr-tdep.o, mon960-rom.o): Ditto.
+ (aout_stabs_gnu_h): Define.
+ (symtab_h): Remove $(gdb_obstack_h).
+
+2002-07-30 Jim Blandy <jimb@redhat.com>
+
+ Patch from David Carlton <carlton@math.stanford.edu>:
+ * gdbinit.in: Move the `dir' commands that add GDB's own source
+ directory to the search path to the end, so that the `gdb' source
+ directory will be searched first.
+
+2002-07-29 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb_obstack.h: New file.
+ * symtab.h: Include "gdb_obstack.h" instead of "obstack.h".
+ (obstack_chunk_alloc, obstack_chunk_free): Delete macros.
+ * objfiles.h: Include "gdb_obstack.h".
+ * Makefile.in (gdb_obstack_h): Define.
+ (symtab_h): Add $(gdb_obstack_h).
+ (objfiles_h): Add $(gdb_obstack_h).
+
+ * objfiles.c: Include "gdb_obstack.h" instead of "obstack.h".
+ * macrotab.c, cp-valprint.c, dbxread.c: Ditto.
+ * ch-typeprint.c, ch-valprint.c, dstread.c: Ditto.
+ * macroexp.c, p-typeprint.c, stabsread.c: Ditto.
+ * symtab.c, f-typeprint.c, mdebugread.c: Ditto.
+ * p-valprint.c, symmisc.c, typeprint.c: Ditto.
+ * symfile.c, coffread.c, c-typeprint.c: Ditto.
+ * buildsym.c, bcache.c, ada-typeprint.c: Ditto.
+
+ * Makefile.in (bcache.o): Update dependencies.
+ (buildsym.o, c-typeprint.o, ch-typeprint.o): Ditto.
+ (ch-valprint.o, coffread.o, cp-valprint.o): Ditto.
+ (dbxread.o, dstread.o, f-typeprint.o): Ditto.
+ (objfiles.o, p-typeprint.o, p-valprint.o): Ditto.
+ (stabsread.o, symfile.o, symmisc.o): Ditto.
+ (symtab.o, typeprint.o, macroexp.o): Ditto.
+ (macrotab.o, mdebugread.o): Ditto.
+ (f_lang_h, coff_sym_h, coff_symconst_h): Define.
+ (coff_ecoff_h, aout_aout64_h): Define.
+ (aout_stabs_gnu_h, libaout_h): Define.
+
+2002-07-29 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (struct regcache_descr): Rename nr_registers to
+ nr_cooked_registers. Revise comments describing the structure
+ member fields.
+ (init_regcache_descr): Update.
+ (init_legacy_regcache_descr): Update.
+ (read_register_gen, write_register_gen): When a cooked register in
+ the raw register range, directly access the value from the raw
+ register cache.
+
+2002-07-29 Andrew Cagney <ac131313@redhat.com>
+
+ * z8k-tdep.c: Do not include "obstack.h".
+ * h8300-tdep.c, h8500-tdep.c: Ditto.
+ * m68hc11-tdep.c, sh-tdep.c: Ditto.
+ * valprint.c, v850-tdep.c: Ditto.
+ * d10v-tdep.c, mn10300-tdep.c: Ditto.
+ * mn10200-tdep.c: Ditto.
+
+ * Makefile.in (z8k-tdep.o): Update dependencies.
+ (m68hc11-tdep.o, valprint.o): Ditto.
+ (v850-tdep.o, d10v-tdep.o): Ditto.
+ (mn10300-tdep.o, sparc-tdep.o): Ditto.
+ (sh-tdep.o, h8500-tdep.o, h8300-tdep.o): Ditto.
+ (m32r-tdep.o, mn10200-tdep.o): Specify dependencies.
+ (sh_opc_h, gdb_sim_sh_h): Define.
+ (elf_sh_h, elf_bfd_h): Define.
+ (opcode_m68hc11_h): Define.
+ (OPCODES_SRC, OPCODES_DIR): define.
+ (OPCODES): Use $(OPCODES_DIR).
+ (gdb_sim_d10v_h): Rename sim_d10v_h.
+ (gdb_sim_arm_h): Rename sim_arm_h.
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * utils.c (host_pointer_to_address, address_to_host_pointer):
+ Change internal_error() message to indicate function responsible
+ for the error.
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * ui-out.c (ui_out_field_core_addr): Remove unnecessary cast in
+ calls to local_hex_string_custom().
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * irix5-nat.c: Move IRIX shared library support from here...
+ * solib-irix.c: ...to here. Revised substantially to work with
+ generic solib framework.
+
+ * osabi.h (gdb_osabi): Add new enum constant GDB_OSABI_IRIX.
+ * osabi.c (gdb_osabi_names): Add corresponding string for Irix.
+ * mips-irix-tdep.c: New file.
+
+ * Makefile.in (ALLDEPFILES): Add mips-irix-tdep.c and solib-irix.c.
+ (mips-irix-tdep.o, solib-irix.o): New rules.
+ * config/mips/irix5.mt (TDEPFILES): Add mips-irix-tdep.o, solib.o,
+ solib-irix.o.
+ * config/mips/irix6.mt (TDEPFILES): Likewise.
+ * config/mips/irix6.mh (NATDEPFILES): Remove solib.o.
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (coff/internal.h, bfd/libcoff.h, pthread.h): Remove
+ disabled (via ``#if 0'') includes.
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (special_register_p, supply_sprs64, supply_sprs32)
+ (fetch_regs_user_thread, fetch_regs_kernel_thread, fill_sprs64)
+ (fill_sprs32, store_regs_user_thread, store_regs_kernel_thread):
+ Add support for the fpscr register.
+ * rs6000-nat.c (regmap, fetch_inferior_registers)
+ (store_inferior_registers, fetch_core_registers): Likewise.
+
+2002-07-26 Kevin Buettner <kevinb@redhat.com>
+
+ * rs6000-nat.c (language.h): Include.
+ (special_regs): Delete this array.
+ (regmap): New function.
+ (fetch_register, store_register): Use regmap() to map gdb
+ register numbers to ptrace register numbers. Also, use
+ outputs from regmap() to make decisions regarding type of
+ ptrace() call to make. In particular, don't compare against
+ FIRST_UISA_SP_REGNUM or LAST_UISA_SP_REGNUM.
+ (fetch_inferior_registers, store_inferior_registers): Where
+ possible, obtain register numbers from tdep struct. Don't
+ refer to FIRST_UISA_SP_REGNUM or LAST_UISA_SP_REGNUM.
+ * config/rs6000/tm-rs6000.h (FIRST_UISA_SP_REGNUM)
+ (LAST_UISA_SP_REGNUM): Delete.
+
+2002-07-25 Kevin Buettner <kevinb@redhat.com>
+
+ * rs6000-nat.c (ppc-tdep.h): Include.
+ (fetch_registers, store_register, fetch_core_registers): Don't
+ access registers[] directly. Instead, use supply_register() or
+ regcache_collect() as appropriate.
+ (find_toc_address): Format hex address with local_hex_string().
+
+2002-07-25 Andrew Cagney <ac131313@redhat.com>
+
+ * config/djgpp/fnchange.lst: Rename bfd/elf32-fr30.c and
+ bfd/elf32-frv.c.
+
+2002-07-24 Tom Tromey <tromey@redhat.com>
+
+ * jv-exp.y: Marked all strings with _().
+ (ClassInstanceCreationExpression, ArrayCreationExpression): Use
+ internal_error.
+ (MethodInvocation, CastExpression, parse_number, yyerror,
+ java_type_from_name, push_expression_name, yylex): Typo fixes.
+
+2002-07-24 Daniel Jacobowitz <drow@mvista.com>
+
+ * ui-file.c (struct tee_file, tee_file_new, tee_file_delete)
+ (tee_file_flush, tee_file_write, tee_file_fputs)
+ (tee_file_isatty): New.
+ * ui-file.h (tee_file_new): Add prototype.
+
+2002-07-24 Aidan Skinner <aidan@velvet.net>
+
+ * ada-lang.c: Change k&r style function definitions to prototyped
+ form.
+ * ada-typeprint.c: Change k&r style function definitions to prototyped
+ form.
+ * ada-valprint.c: Change k&r style function definitions to prototyped
+ form.
+
+2002-07-24 Andrew Cagney <cagney@redhat.com>
+
+ * README: Remove reference to remote-bug.
+ * Makefile.in (ALLDEPFILES): Remove m88k-nat.c, m88k-tdep.c and
+ remote-bug.c.
+ (m88k-nat.o): Delete rule.
+ (m88k-tdep.o): Delete rule.
+ (remote-bug.o): Delete rule.
+ * MAINTAINERS: Mark as obsolete.
+ * elfread.c (elf_symtab_read): Mention that m88k is obsolete.
+ * m88k-tdep.c: Make file obsolete.
+ * config/m88k/m88k.mh: Ditto.
+ * config/m88k/delta88v4.mh: Ditto.
+ * config/m88k/delta88v4.mt: Ditto.
+ * config/m88k/delta88.mt: Ditto.
+ * config/m88k/delta88.mh: Ditto.
+ * remote-bug.c: Ditto.
+ * config/m88k/tm-delta88.h: Ditto.
+ * config/m88k/nm-delta88v4.h: Ditto.
+ * config/m88k/xm-delta88.h: Ditto.
+ * config/m88k/xm-dgux.h: Ditto.
+ * config/m88k/tm-m88k.h: Ditto.
+ * config/m88k/nm-m88k.h: Ditto.
+ * config/m88k/tm-delta88v4.h: Ditto.
+ * m88k-nat.c: Ditto.
+ * cxux-nat.c: Ditto.
+ * configure.host: Make m88*-motorola-sysv4*, m88*-motorola-sysv*
+ and m88*-*-* obsolete.
+ * configure.tgt: Make m88*-motorola-sysv4*, m88*-motorola-* and
+ m88*-*-* obsolete.
+
+2002-07-24 Andrew Cagney <cagney@redhat.com>
+
+ * findvar.c (extract_unsigned_integer): Make `addr' parameter
+ constant. Same for local pointer variables.
+ (extract_signed_integer): Ditto.
+ * defs.h (extract_unsigned_integer): Update.
+ (extract_signed_integer): Update.
+
+2002-07-24 Kevin Buettner <kevinb@redhat.com>
+
+ * gdbserver/configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
+ * gdbserver/configure: Regenerate.
+ * gdbserver/config.in: Regenerate.
+
+2002-07-24 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.c (regcache_raw_write): Change buf parameter to a
+ constant void pointer.
+ (regcache_raw_read): Change buf parameter to a void pointer.
+ (legacy_write_register_gen): Change myaddr parameter a constant
+ void pointer.
+ (supply_register): Change val parameter to a const void pointer.
+ * regcache.h (regcache_raw_write): Update declaration.
+ (regcache_raw_read): Update declaration.
+ (supply_register): Update declaration.
+
+2002-07-24 Tom Tromey <tromey@redhat.com>
+
+ * defs.h (gdb_readline_wrapper): Declare.
+ * utils.c (prompt_for_continue): Use gdb_readline_wrapper.
+ * tracepoint.c (read_actions): Use gdb_readline_wrapper.
+ * top.c (gdb_readline_wrapper): New function.
+ (command_line_input): Use it.
+
+2002-07-24 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.h (regcache_raw_read, regcache_raw_write): Replace
+ regcache_read and regcache_write.
+ (regcache_raw_read_as_address): Replace regcache_read_as_address.
+ * regcache.c: Update.
+ * sh-tdep.c (sh64_push_arguments): Update comment.
+ (sh_pseudo_register_read): Update.
+ (sh_pseudo_register_write): Update.
+ (sh4_register_read): Update.
+ (sh4_register_write): Update.
+ (sh64_pseudo_register_read): Update.
+ (sh64_pseudo_register_write): Update.
+ (sh64_register_read): Update.
+ (sh64_register_write): Update.
+ * i386-tdep.c (i386_extract_return_value): Update.
+ (i386_extract_struct_value_address): Update.
+ (i386_extract_return_value): Update.
+ * blockframe.c (generic_read_register_dummy): Update.
+ (generic_call_dummy_register_unwind): Update
+ * infrun.c (write_inferior_status_register): Update.
+
+2002-07-23 Jim Blandy <jimb@redhat.com>
+
+ * parser-defs.h (expression_context_pc): Make this extern.
+ (Thanks to Michael Snyder.)
+
+2002-07-23 Andrew Cagney <ac131313@redhat.com>
+
+ GDB 5.2.1 released from 5.2 branch.
+ * NEWS: Mention changes in 5.2.1 including addition of AVR target.
+ * README: Update to mention 5.2.1.
+
+2002-07-23 Mark Salter <msalter@redhat.com>
+
+ * remote.c (remote_read_bytes): Fix check for error.
+
+2002-07-22 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (language.h): Include.
+ (ptrace_check, pdc_symbol_addrs, pdc_read_regs, pdc_write_regs)
+ (pdc_read_data, pdc_write_data, pdc_alloc, pdc_realloc, pdc_dealloc):
+ Print newlines at end of debug messages.
+ (pdc_symbol_addrs, pdc_read_regs, pdc_write_regs, pdc_read_data)
+ (pdc_write_data): Use local_hex_string() instead of %llx formats.
+
+2002-07-22 Kevin Buettner <kevinb@redhat.com>
+
+ * aix-thread.c (ppc-tdep.h): Include.
+ (special_register_p): New function.
+ (supply_sprs64, supply_sprs32, fill_sprs64, fill_sprs32)
+ (store_regs_user_thread): Use register number information from
+ gdbarch_tdep struct instead of hardcoded offsets relative to
+ FIRST_UISA_SP_REGNUM.
+ (fetch_regs_kernel_thread, store_regs_kernel_thread): Call
+ special_register_p() instead of using FPLAST_REGNUM and
+ LAST_UISA_SP_REGNUM as lower and upper bounds on the special
+ register numbers. Also, don't assume that LAST_UISA_SP_REGNUM
+ will be MQ's register number.
+
+2002-07-22 Michael Snyder <msnyder@redhat.com>
+
+ * aix-thread.c (ops): Rename to aix_thread_ops.
+ (base_ops): Rename to base_target.
+ (ops_attach): Rename to aix_thread_attach.
+ (ops_detach): Rename to aix_thread_detach.
+ (ops_resume): Rename to aix_thread_detach.
+ (ops_wait): Rename to aix_thread_wait.
+ (ops_kill): Rename to aix_thread_kill.
+ (init_ops): Rename to init_aix_thread_ops.
+ (ops_fetch_register): Rename to aix_thread_fetch_register.
+ (ops_store_register): Rename to aix_thread_store_register.
+ (ops_mourn_inferior): Rename to aix_thread_mourn_inferior.
+ (ops_thread_alive): Rename to aix_thread_thread_alive.
+ (ops_extra_thread_info: Rename to aix_thread_extra_thread_info.
+ (ops_pid_to_str): Rename to aix_thread_pid_to_str.
+ (ops_xfer_memory): Rename to aix_thread_xfer_memory.
+ (fetch_regs_lib): Rename to fetch_regs_user_thread.
+ (fetch_regs_kern): Rename to fetch_regs_kernel_thread.
+ (store_regs_lib): Rename to store_regs_user_thread.
+ (store_regs_kern): Rename to store_regs_kernel_thread.
+
+2002-07-22 Michael Snyder <msnyder@redhat.com>
+
+ * aix-thread.c (ops_prepare_to_store): Eliminate.
+ (init_ops): Don't initialize ops.prepare_to_store.
+ (store_regs_kern): Pre-fetch register buffers from child,
+ because some registers may not be in the cache. Copy
+ regs from register cache only if they are cached.
+ (store_regs_lib): Copy regs from register cache only
+ if they are cached.
+ (fill_sprs32, (fill_sprs64, fill_fprs, fill_gprs32,
+ fill_gprs64): Ditto.
+
2002-07-22 Kevin Buettner <kevinb@redhat.com>
* aix-thread.c (gdb_assert.h): Include.
alpha --target=alpha-dec-osf4.0a -Werror
Maintenance only
- arc --target=arc-elf ,-Werror
- Maintenance only
- OBSOLETE candidate, not multi-arch
+ arc (--target=arc-elf OBSOLETE)
arm --target=arm-elf ,
Fernando Nasser fnasser@redhat.com
m68k --target=m68k-elf ,-Werror
Maintenance only
- m88k --target=m88k ,-Werror
- Known problem in 5.1
- Maintenance only
- OBSOLETE candidate, not multi-arch
+ m88k (--target=m88k OBSOLETE)
mcore --target=mcore-elf,mcore-pe ,-Werror
Maintenance only
powerpc --target=powerpc-eabi ,-Werror
Kevin Buettner kevinb@redhat.com
- rs6000 --target=rs6000-ibm-aix4.1 ,-Werror
- (see rs6000 native and ppc target)
-
s390 --target=s390-linux ,-Werror
(contact DJ Barrow djbarrow@de.ibm.com)
# in INCLUDE_DIR.
# Where is the "-lopcodes" library, with (some of) the opcode tables and
# disassemblers?
-OPCODES = ../opcodes/libopcodes.a
+OPCODES_DIR = ../opcodes
+OPCODES_SRC = $(srcdir)/$(OPCODES_DIR)
+OPCODES = $(OPCODES_DIR)/libopcodes.a
# Where are the other opcode tables which only have header file
# versions?
OP_INCLUDE = $(INCLUDE_DIR)/opcode
"AR_FLAGS=$(AR_FLAGS)" \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
- "CHILLFLAGS=$(CHILLFLAGS)" \
- "CHILL=$(CHILL)" \
- "CHILL_LIB=$(CHILL_LIB)" \
"CXX=$(CXX)" \
"CXXFLAGS=$(CXXFLAGS)" \
"DLLTOOL=$(DLLTOOL)" \
fi; \
fi`
-CHILLFLAGS = $(CFLAGS)
-CHILL = gcc
-CHILL_FOR_TARGET = ` \
- if [ -f $${rootme}/../gcc/Makefile ] ; then \
- echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -L$${rootme}/../gcc/ch/runtime/; \
- else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
- echo $(CC); \
- else \
- t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
- fi; \
- fi`
-CHILL_LIB = ` \
- if [ -f $${rootme}/../gcc/ch/runtime/libchill.a ] ; then \
- echo $${rootme}/../gcc/ch/runtime/chillrt0.o \
- $${rootme}/../gcc/ch/runtime/libchill.a; \
- else \
- echo -lchill; \
- fi`
+# OBSOLETE CHILLFLAGS = $(CFLAGS)
+# OBSOLETE CHILL = gcc
+# OBSOLETE CHILL_FOR_TARGET = ` \
+# OBSOLETE if [ -f $${rootme}/../gcc/Makefile ] ; then \
+# OBSOLETE echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -L$${rootme}/../gcc/ch/runtime/; \
+# OBSOLETE else \
+# OBSOLETE if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+# OBSOLETE echo $(CC); \
+# OBSOLETE else \
+# OBSOLETE t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
+# OBSOLETE fi; \
+# OBSOLETE fi`
+# OBSOLETE CHILL_LIB = ` \
+# OBSOLETE if [ -f $${rootme}/../gcc/ch/runtime/libchill.a ] ; then \
+# OBSOLETE echo $${rootme}/../gcc/ch/runtime/chillrt0.o \
+# OBSOLETE $${rootme}/../gcc/ch/runtime/libchill.a; \
+# OBSOLETE else \
+# OBSOLETE echo -lchill; \
+# OBSOLETE fi`
# The use of $$(x_FOR_TARGET) reduces the command line length by not
# duplicating the lengthy definition.
'CC=$$(CC_FOR_TARGET)' \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(CFLAGS)" \
- "CHILLFLAGS=$(CHILLFLAGS)" \
- 'CHILL=$$(CHILL_FOR_TARGET)' \
- "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
- "CHILL_LIB=$(CHILL_LIB)" \
'CXX=$$(CXX_FOR_TARGET)' \
"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
"CXXFLAGS=$(CXXFLAGS)" \
SFILES = ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
buildsym.c c-exp.y c-lang.c c-typeprint.c c-valprint.c \
- ch-exp.c ch-lang.c ch-typeprint.c ch-valprint.c coffread.c \
+ coffread.c \
complaints.c completer.c corefile.c cp-valprint.c dbxread.c \
demangle.c dwarfread.c dwarf2read.c elfread.c environ.c eval.c \
event-loop.c event-top.c \
# (Why would we not want to depend on them? If one of these changes in a
# non-binary-compatible way, it is a real pain to remake the right stuff
# without these dependencies -kingdon, 13 Mar 1994)
+aout_aout64_h = $(INCLUDE_DIR)/aout/aout64.h
+aout_stabs_gnu_h = $(INCLUDE_DIR)/aout/stabs_gnu.h
getopt_h = $(INCLUDE_DIR)/getopt.h
floatformat_h = $(INCLUDE_DIR)/floatformat.h
bfd_h = $(BFD_DIR)/bfd.h
callback_h = $(INCLUDE_DIR)/gdb/callback.h
+coff_sym_h = $(INCLUDE_DIR)/coff/sym.h
+coff_symconst_h = $(INCLUDE_DIR)/coff/symconst.h
+coff_ecoff_h = $(INCLUDE_DIR)/coff/ecoff.h
dis_asm_h = $(INCLUDE_DIR)/dis-asm.h
+elf_sh_h = $(INCLUDE_DIR)/elf/sh.h
+elf_bfd_h = $(BFD_SRC)/elf-bfd.h
+libaout_h = $(BFD_SRC)/libaout.h
remote_sim_h = $(INCLUDE_DIR)/gdb/remote-sim.h
demangle_h = $(INCLUDE_DIR)/demangle.h
obstack_h = $(INCLUDE_DIR)/obstack.h
-sim_arm_h = $(INCLUDE_DIR)/gdb/sim-arm.h
-sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h
+opcode_m68hc11_h = $(INCLUDE_DIR)/opcode/m68hc11.h
+sh_opc_h = $(OPCODES_SRC)/sh-opc.h
+gdb_sim_arm_h = $(INCLUDE_DIR)/gdb/sim-arm.h
+gdb_sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h
+gdb_sim_sh_h = $(INCLUDE_DIR)/gdb/sim-sh.h
splay_tree_h = $(INCLUDE_DIR)/splay-tree.h
readline_headers = \
event_loop_h = event-loop.h
event_top_h = event-top.h
expression_h = expression.h $(doublest_h) $(symtab_h)
+f_lang_h = f-lang.h
frame_h = frame.h
gdb_h = gdb.h
gdb_assert_h = gdb_assert.h
gdb_events_h = gdb-events.h
+gdb_obstack_h = $(obstack_h)
gdb_stabs_h = gdb-stabs.h
gdb_string_h = gdb_string.h
gdb_wait_h = gdb_wait.h
macroscope_h = macroscope.h $(macrotab_h) $(symtab_h)
memattr_h = memattr.h
monitor_h = monitor.h
-objfiles_h = objfiles.h
+objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h)
parser_defs_h = parser-defs.h $(doublest_h)
ppc_tdep_h = ppc-tdep.h osabi.h
regcache_h = regcache.h
objfiles.h parser-defs.h serial.h solib.h \
symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \
macrotab.h macroexp.h macroscope.h \
- c-lang.h ch-lang.h f-lang.h \
+ c-lang.h f-lang.h \
jv-lang.h \
m2-lang.h p-lang.h \
complaints.h valprint.h \
exec.o bcache.o objfiles.o minsyms.o maint.o demangle.o \
dbxread.o coffread.o elfread.o \
dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
- c-lang.o ch-exp.o ch-lang.o f-lang.o \
+ c-lang.o f-lang.o \
ui-out.o cli-out.o interps.o \
varobj.o wrapper.o \
jv-lang.o jv-valprint.o jv-typeprint.o \
m2-lang.o p-lang.o p-typeprint.o p-valprint.o \
scm-exp.o scm-lang.o scm-valprint.o complaints.o typeprint.o \
- c-typeprint.o ch-typeprint.o f-typeprint.o m2-typeprint.o \
- c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
+ c-typeprint.o f-typeprint.o m2-typeprint.o \
+ c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \
nlmread.o serial.o mdebugread.o top.o utils.o \
ui-file.o \
frame.o doublest.o \
## This is ugly, but I don't want GNU make to put these variables in
## the environment. Older makes will see this as a set of targets
## with no dependencies and no actions.
-unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
+# OBSOLETE unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
ALLDEPFILES = a68v-nat.c \
+ aix-thread.c \
alpha-nat.c alphabsd-nat.c \
alpha-tdep.c alpha-linux-tdep.c alphabsd-tdep.c alphanbsd-tdep.c \
alpha-osf1-tdep.c alphafbsd-tdep.c \
lynx-nat.c m3-nat.c \
m68hc11-tdep.c \
m68k-tdep.c \
- m88k-nat.c m88k-tdep.c \
mcore-tdep.c \
mips-linux-nat.c mips-linux-tdep.c \
mips-nat.c \
+ mips-irix-tdep.c \
mips-tdep.c mipsm3-nat.c mipsv4-nat.c \
mipsnbsd-nat.c mipsnbsd-tdep.c \
nbsd-tdep.c \
ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \
ppcnbsd-nat.o ppcnbsd-tdep.o \
procfs.c \
- remote-array.c remote-bug.c remote-e7000.c \
+ remote-array.c remote-e7000.c \
remote-es.c remote-hms.c remote-mips.c \
remote-nindy.c remote-rdp.c remote-sim.c \
remote-st.c remote-utils.c dcache.c \
s390-tdep.c s390-nat.c \
ser-go32.c ser-pipe.c ser-tcp.c \
sh-tdep.c shnbsd-tdep.c shnbsd-nat.c \
- solib.c solib-svr4.c solib-sunos.c sparc-linux-nat.c \
+ solib.c solib-irix.c solib-svr4.c solib-sunos.c sparc-linux-nat.c \
sparc-nat.c \
sparc64nbsd-nat.c sparcnbsd-nat.c sparcnbsd-tdep.c \
sparc-tdep.c sparcl-tdep.c sun3-nat.c \
a68v-nat.o: a68v-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
$(regcache_h)
+aix-thread.o: aix-thread.c $(defs_h) $(gdbcore_h) $(gdbthread_h) \
+ $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h) $(gdb_assert_h) \
+ $(ppc_tdep_h) $(language_h)
+
alpha-nat.o: alpha-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(target_h) \
$(regcache_h) $(alpha_tdep_h)
nbsd-tdep.h
avr-tdep.o: avr-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
- $(symfile_h) $(regcache_h) $(arch_utils_h)
+ $(symfile_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h)
-bcache.o: bcache.c $(bcache_h) $(defs_h)
+bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h)
blockframe.o: blockframe.c $(defs_h) $(gdbcore_h) $(inferior_h) \
$(objfiles_h) $(symfile_h) $(target_h) $(regcache_h)
$(gdb_string_h) $(gdb_events_h) $(linespec_h) $(ui_out_h) \
$(completer_h) $(gdb_h)
-buildsym.o: buildsym.c $(bfd_h) $(buildsym_h) $(complaints_h) $(defs_h) \
- $(objfiles_h) $(symfile_h) $(symtab_h) $(gdb_string_h) \
- $(obstack_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
- $(language_h) $(bcache_h) $(filenames_h) $(stabsread_h) \
- $(macrotab_h)
+buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \
+ $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(complaints_h) \
+ $(gdb_string_h) $(expression_h) $(language_h) $(bcache_h) \
+ $(filenames_h) $(macrotab_h) $(demangle_h) $(buildsym_h) $(stabsread_h)
builtin-regs.o: builtin-regs.c $(defs.h) $(builtin_regs_h) $(gdbtypes_h) \
$(gdb_string_h) $(value_h) $(frame_h)
$(language_h) $(parser_defs_h) $(symtab_h) $(macroscope_h) \
gdb_assert.h
-c-typeprint.o: c-typeprint.c $(c_lang_h) $(defs_h) $(expression_h) \
- $(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) \
- $(target_h) $(typeprint_h) $(value_h) $(gdb_string_h) $(cp_abi_h)
+c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
+ $(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \
+ $(gdb_string_h)
c-valprint.o: c-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
$(language_h) $(symtab_h) $(valprint_h) $(value_h) $(cp_abi_h)
f-lang.o: f-lang.c f-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
$(language_h) $(parser_defs_h) $(symtab_h) $(gdb_string_h)
-f-typeprint.o: f-typeprint.c f-lang.h $(defs_h) $(expression_h) \
- $(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) \
- $(target_h) $(typeprint_h) $(value_h) $(gdb_string_h)
+f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
+ $(f_lang_h) $(gdb_string_h)
f-valprint.o: f-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
$(language_h) $(symtab_h) $(valprint_h) $(value_h) $(gdb_string_h)
-ch-exp.o: ch-exp.c ch-lang.h $(defs_h) $(language_h) $(parser_defs_h) \
- $(bfd_h) $(symfile_h) $(objfiles_h) $(value_h)
+# OBSOLETE ch-exp.o: ch-exp.c ch-lang.h $(defs_h) $(language_h) $(parser_defs_h) \
+# OBSOLETE $(bfd_h) $(symfile_h) $(objfiles_h) $(value_h)
-ch-lang.o: ch-lang.c ch-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) $(parser_defs_h) $(symtab_h)
+# OBSOLETE ch-lang.o: ch-lang.c ch-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
+# OBSOLETE $(language_h) $(parser_defs_h) $(symtab_h)
-ch-typeprint.o: ch-typeprint.c ch-lang.h $(defs_h) $(expression_h) \
- $(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) \
- $(target_h) $(value_h) $(typeprint_h) $(gdb_string_h)
+# OBSOLETE ch-typeprint.o: ch-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \
+# OBSOLETE $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \
+# OBSOLETE $(target_h) $(language_h) $(ch_lang_h) $(typeprint_h) $(gdb_string_h)
-ch-valprint.o: ch-valprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) $(symtab_h) $(valprint_h) $(value_h) $(c_lang_h)
+# OBSOLETE ch-valprint.o: ch-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
+# OBSOLETE $(gdbtypes_h) $(valprint_h) $(expression_h) $(value_h) $(language_h) \
+# OBSOLETE $(demangle_h) $(c_lang_h) $(typeprint_h) $(ch_lang_h) $(annotate_h)
coff-solib.o: coff-solib.c $(defs_h)
-coffread.o: coffread.c $(bfd_h) $(breakpoint_h) $(buildsym_h) \
- $(complaints_h) $(defs_h) $(expression_h) $(gdbtypes_h) $(objfiles_h) \
- $(symfile_h) $(symtab_h) $(gdb_stabs_h) $(stabsread_h) $(target_h) \
- $(gdb_string_h)
+coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \
+ $(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \
+ $(coff_internal_h) $(libcoff_h) $(symfile_h) $(objfiles_h) \
+ $(buildsym_h) $(gdb_stabs_h) $(stabsread_h) $(complaints_h) \
+ $(target_h) $(gdb_assert_h)
complaints.o: complaints.c $(complaints_h) $(defs_h) $(gdbcmd_h)
corelow.o: corelow.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
$(target_h) $(gdbthread_h) $(gdb_string_h) $(regcache_h)
-gcore.o: gcore.c $(defs_h) $(command_h) $(inferior_h) $(gdbcore_h) \
- $(BFD_SRC)/elf-bfd.h $(symfile_h) $(objfiles_h)
+gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \
+ $(elf_bfd_h) $(symfile_h) $(objfiles_h)
-linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(gregset_h) \
- $(gdbcore_h) $(gdbthread_h) $(regcache_h) $(BFD_SRC)/elf-bfd.h
+linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(regcache_h) $(gregset_h) \
+ $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) $(cli_decode_h) \
+ $(gdb_string_h)
cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h)
-cp-valprint.o: cp-valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
- $(gdbtypes_h) $(symtab_h) $(value_h) $(gdb_string_h) $(cp_abi_h)
+cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
+ $(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \
+ $(cp_abi_h)
dcache.o: dcache.c $(dcache_h) $(defs_h) $(gdbcmd_h) $(gdb_string_h) \
$(gdbcore_h) $(target_h)
-d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(obstack_h) $(symtab_h) \
- $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
- $(inferior_h) $(dis-asm_h) $(symfile_h) $(objfiles_h) $(language_h) \
- $(arch_utils_h) $(regcache_h) $(floatformat_h) $(sim_d10v_h) \
- $(sim_regno_h)
+d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
+ $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) $(inferior_h) \
+ $(dis_asm_h) $(symfile_h) $(objfiles_h) $(language_h) $(arch_utils_h) \
+ $(regcache_h) $(floatformat_h) $(sim_d10v_h) $(sim_regno_h)
-dbxread.o: dbxread.c $(breakpoint_h) $(buildsym_h) $(command_h) \
- $(complaints_h) $(defs_h) $(expression_h) $(gdb_stabs_h) $(gdbcore_h) \
- $(gdbtypes_h) $(language_h) $(objfiles_h) \
- $(stabsread_h) $(symfile_h) $(symtab_h) $(target_h) $(gdb_string_h) \
- $(cp_abi_h)
+dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) $(gdb_stat_h) \
+ $(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) $(libaout_h) \
+ $(symfile_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \
+ $(gdb_stabs_h) $(demangle_h) $(language_h) $(complaints_h) \
+ $(cp_abi_h) $(aout_aout64_h) $(aout_stab_gnu_h)
delta68-nat.o: delta68-nat.c $(defs_h)
dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h)
-dstread.o: dstread.c $(gdb_string_h)
+dstread.o: dstread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(breakpoint_h) \
+ $(bfd_h) $(symfile_h) $(objfiles_h) $(buildsym_h) $(gdb_obstack_h) \
+ $(gdb_string_h) $(dst_h)
dwarf2cfi.o: dwarf2cfi.c $(defs_h) $(symtab_h) $(symfile_h) $(objfiles_h) \
$(target_h) $(inferior_h) $(regcache_h) $(dwarf2cfi_h)
expprint.o: expprint.c $(defs_h) $(expression_h) $(gdbtypes_h) \
$(language_h) $(parser_defs_h) $(symtab_h) $(value_h)
+fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) $(gdb_string_h) \
+ $(elf_bfd_h) $(gregset_h)
+
findvar.o: findvar.c $(defs_h) $(gdbcore_h) $(inferior_h) $(target_h) \
$(gdb_string_h) $(regcache_h) $(builtin_regs_h)
frv-tdep.o: frv-tdep.c $(defs_h) $(inferior_h) $(symfile_h) $(gdbcore_h) \
$(arch_utils_h) $(regcache_h)
-regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(regcache_h)
+regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \
+ $(gdbcmd_h) $(regcache_h) $(gdb_assert_h) $(gdb_string_h)
fork-child.o: fork-child.c $(gdb_wait_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) $(target_h) $(terminal_h) $(gdbthread_h) $(gdb_string_h)
-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" -DSRC_DIR=\"$(GDBTK_SRC_DIR)\"
gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \
- $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
- $(defs_h) $(breakpoint_h) $(tracepoint_h) $(symfile_h) $(symtab_h)
+ $(srcdir)/gdbtk/generic/gdbtk.h \
+ $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
+ $(defs_h) $(breakpoint_h) $(tracepoint_h) \
+ $(symfile_h) $(symtab_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-bp.c \
$(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \
- $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
- $(defs_h) $(frame_h) $(value_h)
+ $(srcdir)/gdbtk/generic/gdbtk.h \
+ $(srcdir)/gdbtk/generic/gdbtk-cmds.h \
+ $(defs_h) $(frame_h) $(value_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
$(TIX_CFLAGS) $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-register.c \
-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \
- $(srcdir)/gdbtk/generic/gdbtk.h \
- $(defs_h) $(value_h) $(varobj_h)
+ $(srcdir)/gdbtk/generic/gdbtk.h \
+ $(defs_h) $(value_h) $(varobj_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) $(TIX_CFLAGS) \
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
$(srcdir)/gdbtk/generic/gdbtk-varobj.c
$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
$(srcdir)/v850ice.c
-v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(obstack_h) \
- $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \
- $(symfile_h) $(arch_utils_h) $(regcache_h)
+v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+ $(arch_utils_h) $(regcache_h) $(symtab_h)
tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(tracepoint_h) \
$(gdbtypes_h) $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) \
$(language_h) $(gdb_string_h) $(readline_headers) $(remote_h) \
$(linespec_h) $(regcache_h) $(completer_h)
-gdbarch.o: gdbarch.c $(defs_h) $(bfd_h) $(gdbcmd_h) $(gdb_string_h) \
- $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) $(gdb_wait_h) \
- $(gdbcore_h) $(target_h) $(gdbthread_h) $(annotate_h) $(symfile_h) \
- $(value_h) $(symcat_h) $(floatformat_h) $(gdb_assert_h) \
- $(gdb_events_h)
+gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \
+ $(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \
+ $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(gdbthread_h) \
+ $(annotate_h) $(symfile_h) $(value_h) $(symcat_h) $(floatformat_h) \
+ $(gdb_assert_h) $(gdb_string_h) $(gdb_events_h)
arch-utils.o: arch-utils.c $(defs_h) $(bfd_h) $(gdbcmd_h) \
$(arch_utils_h) $(gdb_assert_h) $(inferior_h) \
gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \
$(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h)
-gnu-v3-abi.o: gnu-v2-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(demangle_h)
+gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(demangle_h) \
+ $(gdb_assert_h) $(gdb_string_h)
-h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(regcache_h)
+h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(dis_asm_h) \
+ $(gdbcmd_h) $(gdbtypes_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
+ $(regcache_h)
-h8500-tdep.o: h8500-tdep.c $(bfd_h) $(dis_asm_h) $(defs_h) \
- $(expression_h) $(frame_h) $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) \
- $(value_h) $(regcache_h)
+h8500-tdep.o: h8500-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
+ $(gdbcmd_h) $(value_h) $(dis_asm_h) $(gdbcore_h) $(regcache_h)
hp300ux-nat.o: hp300ux-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
i387-tdep.o: i387-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
$(inferior_h) $(language_h) $(regcache_h) $(doublest_h) i386-tdep.h
-i960-tdep.o: i960-tdep.c $(floatformat_h) $(defs_h) $(expression_h) \
- $(frame_h) $(gdbtypes_h) $(symtab_h) $(value_h) $(gdbcore_h) \
- $(regcache_h)
+i960-tdep.o: i960-tdep.c $(defs_h) $(symtab_h) $(value_h) $(frame_h) \
+ $(floatformat_h) $(target_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(regcache_h)
m3-nat.o: m3-nat.c $(defs_h) $(inferior_h) $(value_h) $(language_h) \
$(target_h) $(gdb_wait_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h)
+m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+ $(regcache_h)
+
p-lang.o: p-lang.c p-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
$(language_h) $(parser_defs_h) $(symtab_h) $(gdb_string_h)
-p-typeprint.o: p-typeprint.c p-lang.h $(defs_h) $(expression_h) \
- $(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) \
- $(target_h) $(typeprint_h) $(value_h) $(gdb_string_h)
+p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \
+ $(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h)
-p-valprint.o: p-valprint.c p-lang.h $(defs_h) $(expression_h) $(gdbtypes_h) \
- $(language_h) $(symtab_h) $(valprint_h) $(value_h) $(gdb_string_h)
+p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \
+ $(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) $(language_h) \
+ $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h)
-m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
- $(gdbcore_h) $(gdb_string_h)
+m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \
+ $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) $(inferior_h) \
+ $(dis_asm_h) $(symfile_h) $(objfiles_h) $(arch_utils_h) $(regcache_h) \
+ $(target_h) $(opcode_m68hc11_h)
m68k-tdep.o: m68k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \
$(gdbcore_h) $(gdb_string_h) $(regcache_h)
m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \
$(language_h) $(gdbcore_h) $(floatformat_h) $(target_h) $(regcache_h)
-m88k-nat.o: m88k-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
-
-m88k-tdep.o: m88k-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
-
mac-nat.o: mac-nat.c $(defs_h) $(gdb_string_h) $(regcache_h)
main.o: main.c $(top_h) $(defs_h) $(gdb_string_h) $(event_loop_h) \
mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(gdb_string_h) $(regcache_h) $(serial_h)
-mdebugread.o: mdebugread.c $(buildsym_h) $(complaints_h) $(bfd_h) $(defs_h) \
- $(expression_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \
- $(language_h) $(objfiles_h) $(stabsread_h) \
- $(symfile_h) $(symtab_h) $(gdb_string_h)
+mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
+ $(symfile_h) $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) \
+ $(stabsread_h) $(complaints_h) $(demangle_h) $(gdb_assert_h) \
+ $(coff_sym_h) $(coff_symconst_h) $(gdb_stat_h) $(gdb_string_h) \
+ $(bfd_h) $(coff_ecoff_h) $(libaout_h) $(aout_aout64_h) \
+ $(aout_stab_gnu_h) $(expression_h) $(language_h)
mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
mips-nat.o: mips-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
+mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) osabi.h $(BFD_SRC)/elf-bfd.h
+
mips-tdep.o: mips-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
$(arch_utils_h) $(regcache_h) \
$(inferior_h) $(language_h) $(objfiles_h) $(symfile_h) \
mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
$(target_h) $(value_h) osabi.h solib-svr4.h mipsnbsd-tdep.h
-mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
- $(obstack_h) $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) \
- $(gdbcore_h) $(symfile_h) $(regcache_h) $(arch-utils.h)
+mn10200-tdep.o: mn10200-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+ $(regcache_h)
+
+mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
+ $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(symfile_h) \
+ $(regcache_h) $(arch_utils_h)
monitor.o: monitor.c $(monitor_h) $(bfd_h) $(defs_h) $(gdbcmd_h) \
$(inferior_h) $(target_h) $(serial_h) $(terminal_h) $(gdb_string_h) \
ns32k-tdep.o: ns32k-tdep.c $(bfd_h) $(dis_asm_h) $(defs_h)
-objfiles.o: objfiles.c $(bfd_h) $(defs_h) $(objfiles_h) $(symfile_h) \
- $(symtab_h) $(gdb_string_h) $(breakpoint_h) $(bcache_h)
+objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
+ $(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_stat_h) \
+ $(gdb_obstack_h) $(gdb_string_h) $(breakpoint_h) $(mmalloc_h)
solib-osf.o: solib-osf.c $(defs_h) $(inferior_h) $(symtab_h) $(objfiles_h) \
$(symfile_h) $(target_h) $(gdb_string_h) $(solist_h)
somsolib.o: somsolib.c $(defs_h) $(regcache_h)
-std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) \
- $(gdbtypes_h) $(value_h)
+std-regs.o: std-regs.c $(defs_h) $(builtin_regs_h) $(frame_h) $(gdbtypes_h) \
+ $(value_h) $(gdb_string_h)
pa64solib.o: pa64solib.c $(defs_h) $(regcache_h)
remote-rdp.o: remote-rdp.c $(defs_h) $(gdbcore_h) \
$(inferior_h) $(gdb_string_h) $(arm_tdep_h) $(callback_h)
-remote-bug.o: remote-bug.c $(defs_h) $(gdbcore_h) $(serial_h) \
- $(inferior_h) $(target_h) $(terminal_h) $(remote_utils_h) \
- $(gdb_string_h) $(regcache_h)
-
remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(target_h) \
$(serial_h) $(gdb_string_h) $(regcache_h)
rs6000-nat.o: rs6000-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(xcoffsolib_h) $(symfile_h) $(objfiles_h) \
- $(gdb_stabs_h) $(regcache_h) $(arch_utils_h)
+ $(gdb_stabs_h) $(regcache_h) $(arch_utils_h) $(language_h) \
+ $(ppc_tdep_h)
rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
$(target_h) $(ppc_tdep_h) $(regcache_h) $(value_h) $(parser_defs_h)
serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h)
-sh-tdep.o: sh-tdep.c $(bfd_h) $(dis_asm_h) \
- $(srcdir)/../opcodes/sh-opc.h $(defs_h) $(expression_h) $(frame_h) \
- $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) $(value_h) $(arch_utils_h) \
- $(regcache_h) $(doublest_h) $(sh_tdep_h)
+sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \
+ $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \
+ $(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \
+ $(regcache_h) $(doublest_h) $(sh_tdep_h) $(elf_bfd_h) $(solib_svr4_h) \
+ $(elf_sh_h) $(gdb_sim_sh_h)
shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \
$(value_h) $(sh_tdep_h) solib-svr4.h shnbsd-tdep.h nbsd-tdep.h
signals.o: signals/signals.c $(defs_h) $(target_h)
$(CC) -c $(INTERNAL_CFLAGS) $<
-mon960-rom.o: mon960-rom.c $(monitor_h) $(bfd_h) $(gdb_wait_h) $(defs_h) \
- $(gdbcmd_h) $(inferior_h) $(target_h) $(serial_h) $(terminal_h)
+mon960-rom.o: mon960-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
+ $(serial_h) $(srec_h) $(xmodem_h) $(symtab_h) $(symfile_h) \
+ $(inferior_h)
solib.o: solib.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
$(objfiles_h) $(gdb_regex_h) $(symfile_h) $(target_h) $(gdb_string_h) \
$(solist_h) $(completer_h)
+solib-irix.o: solib-irix.c $(defs_h) $(gdbcore_h) $(inferior_h) $(objfiles_h) \
+ $(symfile_h) $(target_h) $(solist_h) solib-svr4.h
+
solib-sunos.o: solib-sunos.c $(defs_h) $(symfile_h) $(objfiles_h) \
$(gdbcore_h) $(inferior_h) $(solist_h)
sparc-nat.o: sparc-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(gdbcore_h) \
$(target_h) $(regcache_h)
-sparc-tdep.o: sparc-tdep.c $(floatformat_h) $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(objfiles_h) $(symfile_h) $(target_h) $(gdb_string_h) \
- $(arch_utils_h) $(regcache_h) osabi.h
+sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \
+ $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(regcache_h) \
+ $(osabi_h) $(gregset_h) $(gdbcore_h) $(symfile_h)
sparcl-tdep.o: sparcl-tdep.c $(defs_h) $(gdbcore_h) $(target_h) $(regcache_h)
dsrec.o: dsrec.c $(defs_h) srec.h
-stabsread.o: stabsread.c $(bfd_h) $(INCLUDE_DIR)/aout/stab.def \
- $(INCLUDE_DIR)/aout/stab_gnu.h $(buildsym_h) $(complaints_h) \
- $(defs_h) $(gdbtypes_h) $(objfiles_h) $(stabsread_h) $(symfile_h) \
- $(symtab_h) $(gdb_string_h) $(doublest_h)
+stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \
+ $(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \
+ $(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \
+ $(buildsym_h) $(complaints_h) $(demangle_h) $(language_h) \
+ $(doublest_h) $(stabsread_h)
stack.o: stack.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
$(language_h) $(target_h) $(gdb_string_h) $(ui_out_h)
$(srcdir)/tui/tuiIO.h
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c
-ax-general.o: ax-general.c $(ax_h) $(defs_h) $(value_h)
+ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h)
+
ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \
$(value_h) $(expression_h) $(command_h) $(ax_h) $(gdbcmd_h) ax-gdb.h
sun3-nat.o: sun3-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
-symfile.o: symfile.c $(breakpoint_h) $(complaints_h) $(defs_h) \
- $(expression_h) $(gdb_stabs_h) $(gdbcmd_h) $(gdbcore_h) \
- $(gdbtypes_h) $(language_h) $(objfiles_h) $(symfile_h) $(symtab_h) \
- $(target_h) $(gdb_string_h) $(completer_h) $(bcache_h)
+symfile.o: symfile.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
+ $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
+ $(gdbcmd_h) $(breakpoint_h) $(language_h) $(complaints_h) \
+ $(demangle_h) $(inferior_h) $(gdb_stabs_h) $(gdb_obstack_h) \
+ $(completer_h) $(bcache_h) $(gdb_string_h) $(gdb_stat_h)
symm-tdep.o: symm-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h)
symm-nat.o: symm-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h)
-symmisc.o: symmisc.c $(bfd_h) $(breakpoint_h) $(command_h) $(defs_h) \
- $(expression_h) $(gdbtypes_h) $(language_h) $(objfiles_h) \
- $(symfile_h) $(symtab_h) $(gdb_string_h)
+symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \
+ $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \
+ $(gdb_obstack_h) $(language_h) $(bcache_h) $(gdb_string_h)
-symtab.o: symtab.c $(call_cmds_h) $(defs_h) $(expression_h) $(frame_h) \
- $(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) $(language_h) $(objfiles_h) \
- $(gdb_regex_h) $(symfile_h) $(symtab_h) $(target_h) $(value_h) \
- $(gdb_string_h) $(linespec_h) $(cp_abi_h)
+symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
+ $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
+ $(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \
+ $(language_h) $(demangle_h) $(inferior_h) $(linespec_h) \
+ $(filenames_h) $(gdb_obstack_h) $(gdb_string_h) $(gdb_stat_h) \
+ $(cp_abi_h)
linespec.o: linespec.c $(linespec_h) $(defs_h) $(frame_h) $(value_h) \
$(objfiles_h) $(symfile_h) $(completer_h) $(symtab_h) \
$(demangle_h) $(command_h) $(cp_abi_h)
-macroexp.o: macroexp.c $(defs_h) $(macrotab_h)
+macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \
+ $(macroexp_h) $(gdb_assert_h)
-macrotab.o: macrotab.c $(defs_h) $(obstack_h) $(objfiles_h) $(symtab_h) \
- $(macrotab_h) $(splay_tree_h) gdb_assert.h $(bcache_h)
+macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) $(symtab_h) \
+ $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) $(bcache_h) \
+ $(complaints_h)
macroscope.o: macroscope.c $(defs_h) $(macroscope_h)
target.o: target.c $(bfd_h) $(defs_h) $(gdbcmd_h) $(inferior_h) \
$(objfiles_h) $(symfile_h) $(target_h) $(gdb_string_h) $(regcache_h)
-thread.o: thread.c $(defs_h) $(gdbthread_h) $(gdbcmd_h) $(target_h) \
- $(regcache_h) $(ui_out_h) $(gdb_h)
+thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \
+ $(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(command_h) \
+ $(gdbcmd_h) $(regcache_h) $(gdb_h) $(ui_out_h)
completer.o: completer.c $(completer_h) $(gdbtypes_h) $(symtab_h) \
$(defs_h) $(gdbcmd_h) $(expression_h) $(readline_headers) \
$(completer_h) $(version_h) $(ui_out_h) $(doublest_h) \
$(serial_h) $(interps_h)
-typeprint.o: typeprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
- $(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) $(target_h) \
- $(value_h) $(gdb_string_h) $(cp_abi_h)
+typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
+ $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \
+ $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(gdb_string_h)
utils.o: utils.c $(bfd_h) $(defs_h) $(expression_h) $(gdbcmd_h) \
$(language_h) $(target_h) $(terminal_h) $(readline_headers) \
valops.o: valops.c $(defs_h) $(gdbcore_h) $(inferior_h) $(target_h) \
$(gdb_string_h) $(regcache_h) $(cp_abi_h) $(gdb_assert_h)
-valprint.o: valprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \
- $(gdbcore_h) $(gdbtypes_h) $(language_h) $(symtab_h) $(target_h) \
- $(value_h) $(gdb_string_h) $(valprint_h) $(doublest_h)
+valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+ $(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(obstack_h) \
+ $(language_h) $(annotate_h) $(valprint_h) $(floatformat_h) \
+ $(doublest_h)
values.o: values.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \
$(gdbcore_h) $(gdbtypes_h) $(symtab_h) $(target_h) $(value_h) \
# FIXME: z8k-tdep.c calls _initialize_gdbtypes(). Since that isn't
# declared -Wimplicit fails. It should be using the GDBARCH framework.
# cagney 1999-09-02.
-z8k-tdep.o: z8k-tdep.c $(bfd_h) $(dis_asm_h) $(defs_h) $(frame_h) \
- $(gdbcmd_h) $(gdbtypes_h) $(symtab_h) $(gdbcore_h) $(value_h) \
- $(regcache_h)
+z8k-tdep.o: z8k-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(gdbcmd_h) \
+ $(gdbtypes_h) $(dis_asm_h) $(gdbcore_h) $(regcache_h)
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \
$(srcdir)/z8k-tdep.c
cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(interps_h)
interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \
$(event_top_h) $(interps_h) $(gdb_h) $(wrapper_h) $(gdb_events_h)
-varobj.o: varobj.c $(defs_h) $(frame_h) $(value_h) \
- $(language_h) $(valprint_h) $(varobj_h) $(wrapper_h)
+varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \
+ $(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h)
wrapper.o: wrapper.c $(defs_h) $(frame_h) $(value_h) $(wrapper_h)
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the cli directory.
-cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(cli_cmds_h) $(cli_decode_h) \
- $(cli_script_h) $(cli_setshow_h) $(top_h) $(completer_h) \
- $(defs_h) $(target_h) $(gdb_wait_h) $(gdb_regex_h) $(ui_out_h)
+cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(completer_h) $(target_h) \
+ $(gdb_wait_h) $(gdb_regex_h) $(gdb_string_h) $(filenames_h) \
+ $(ui_out_h) $(top_h) $(cli_cli_decode_h) $(cli_cli_script_h) \
+ $(cli_cli_setshow_h) $(cli_cli_cmds_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
-cli-decode.o: $(srcdir)/cli/cli-decode.c $(cli_decode_h) \
- $(cli_cmds_h) $(defs_h) $(ui_out_h) \
- $(symtab_h) $(gdb_regex_h)
+cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) $(gdb_regex_h) \
+ $(gdb_string_h) $(ui_out_h) $(cli_cli_cmds_h) \
+ $(cli_cli_decode_h) $(gdb_assert_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c
cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) $(command_h) \
$(value_h) $(gdbcmd_h) $(completer_h) $(cli_dump_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c
-cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) \
+cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(value_h) \
$(wrapper_h) $(event_top_h) $(ui_out_h) $(cli_out_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c
-cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(cli_setshow_h) \
- $(cli_decode_h) $(cli_cmds_h) $(defs_h) \
- $(value_h) $(ui_out_h)
+cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(defs_h) $(value_h) \
+ $(gdb_string_h) $(ui_out_h) $(cli_cli_decode_h) \
+ $(cli_cli_cmds_h) $(cli_cli_setshow_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-setshow.c
-cli-script.o: $(srcdir)/cli/cli-script.c $(cli_script_h) \
- $(cli_cmds_h) $(cli_decode_h) $(top_h) \
- $(defs_h) $(value_h) $(language_h) $(ui_out_h)
+cli-script.o: $(srcdir)/cli//cli-script.c $(defs_h) $(value_h) $(language_h) \
+ $(ui_out_h) $(top_h) $(cli_cli_cmds_h) $(cli_cli_decode_h) \
+ $(cli_cli_script_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-script.c
cli-utils.o: $(srcdir)/cli/cli-utils.c $(cli_utils_h) $(defs_h)
mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) $(ui_out_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c
-mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(top_h) $(mi_cmds_h) \
- $(ui_out_h) $(varobj_h)
+mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
+ $(mi_out_h) $(varobj_h) $(value_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c
mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(top_h) $(mi_cmds_h) \
$(ui_out_h) $(frame_h) $(value_h) $(target_h)
$(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \
$(gdb_events_h) $(mi_getopt_h) $(gdb_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c
-mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(mi_cmds_h) \
- $(ui_out_h) $(value_h) $(target_h)
+mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \
+ $(mi_cmds_h) $(mi_getopt_h) $(ui_out_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c
mi-events.o: $(srcdir)/mi/mi-events.c $(defs_h) $(ui_out_h) $(interps_h) \
$(gdb_h) $(breakpoint_h) $(mi_h)
*** Changes since GDB 5.2:
-* ``gdbserver'' now supports multithreaded applications on some targets
+* ``gdbserver'' now supports multi-threaded applications on some targets
-Support for multithreaded applications using LinuxThreads has been added
-for arm*-*-linux*, i[3456]86-*-linux*, mips*-*-linux*, powerpc*-*-linux*,
-and sh*-*-linux*.
+Support for debugging multi-threaded applications which use
+the GNU/Linux LinuxThreads package has been added for
+arm*-*-linux*-gnu*, i[3456]86-*-linux*-gnu*, mips*-*-linux*-gnu*,
+powerpc*-*-linux*-gnu*, and sh*-*-linux*-gnu*.
* GDB now supports C/C++ preprocessor macros.
and provides various commands for showing macro definitions and how
they expand.
+The new command `macro expand EXPRESSION' expands any macro
+invocations in expression, and shows the result.
+
+The new command `show macro MACRO-NAME' shows the definition of the
+macro named MACRO-NAME, and where it was defined.
+
Most compilers don't include information about macros in the debugging
information by default. In GCC 3.1, for example, you need to compile
your program with the options `-gdwarf-2 -g3'. If the macro
information is present in the executable, GDB will read it.
-Here are the new commands for working with macros:
-
-** macro expand EXPRESSION
-
-Expand any macro invocations in expression, and show the result.
-
-** show macro MACRO-NAME
-
-Show the definition of the macro named MACRO-NAME, and where it was
-defined.
-
* Multi-arched targets.
DEC Alpha (partial) alpha*-*-*
* New targets.
-Atmel AVR avr*-*-*
Fujitsu FRV architecture added by Red Hat frv*-*-*
Mitsubishi D30V d30v-*-*
OS/9000 i[34]86-*-os9k
Fujitsu FR30 fr30-*-elf*
+Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
+Argonaut Risc Chip (ARC) arc-*-*
+
+* OBSOLETE languages
+
+CHILL, a Pascal like language used by telecommunications companies.
* REMOVED configurations and files
to a bfd-format or binary file (dump and append), and back
from a file into memory (restore).
+*** Changes in GDB 5.2.1:
+
+* New targets.
+
+Atmel AVR avr*-*-*
+
+* Bug fixes
+
+gdb/182: gdb/323: gdb/237: On alpha, gdb was reporting:
+mdebugread.c:2443: gdb-internal-error: sect_index_data not initialized
+Fix, by Joel Brobecker imported from mainline.
+
+gdb/439: gdb/291: On some ELF object files, gdb was reporting:
+dwarf2read.c:1072: gdb-internal-error: sect_index_text not initialize
+Fix, by Fred Fish, imported from mainline.
+
+Dwarf2 .debug_frame & .eh_frame handler improved in many ways.
+Surprisingly enough, it works now.
+By Michal Ludvig, imported from mainline.
+
+i386 hardware watchpoint support:
+avoid misses on second run for some targets.
+By Pierre Muller, imported from mainline.
+
*** Changes in GDB 5.2:
* New command "set trust-readonly-sections on[off]".
- README for gdb-5.2 release
- Updated 17 April, 2002 by Andrew Cagney
+ README for gdb-5.2.1 release
+ Updated 19 July, 2002 by Andrew Cagney
This is GDB, the GNU source-level debugger.
In this release, the GDB debugger sources, the generic GNU include
files, the BFD ("binary file description") library, the readline
library, and other libraries all have directories of their own
-underneath the gdb-5.2 directory. The idea is that a variety of GNU
+underneath the gdb-5.2.1 directory. The idea is that a variety of GNU
tools can share a common copy of these things. Be aware of variation
over time--for example don't try to build gdb with a copy of bfd from
a release other than the gdb release (such as a binutils release),
directory tree and automatically build all the pieces in the right
order.
- When you unpack the gdb-5.2.tar.gz file, you'll find a directory
-called `gdb-5.2', which contains:
+ When you unpack the gdb-5.2.1.tar.gz file, you'll find a directory
+called `gdb-5.2.1', which contains:
COPYING config.sub intl missing opcodes
COPYING.LIB configure libiberty mkinstalldirs readline
You can build GDB right in the source directory:
- cd gdb-5.2
+ cd gdb-5.2.1
./configure
make
cp gdb/gdb /usr/local/bin/gdb (or wherever you want)
mkdir build
cd build
- <full path to your sources>/gdb-5.2/configure
+ <full path to your sources>/gdb-5.2.1/configure
make
cp gdb/gdb /usr/local/bin/gdb (or wherever you want)
(Building GDB with DJGPP tools for MS-DOS/MS-Windows is slightly
-different; see the file gdb-5.2/gdb/config/djgpp/README for details.)
+different; see the file gdb-5.2.1/gdb/config/djgpp/README for details.)
This will configure and build all the libraries as well as GDB. If
`configure' can't determine your system type, specify one as its
GDB includes an already formatted copy of the on-line Info version
of this manual in the `gdb/doc' subdirectory. The main Info file is
-`gdb-5.2/gdb/doc/gdb.info', and it refers to subordinate files
+`gdb-5.2.1/gdb/doc/gdb.info', and it refers to subordinate files
matching `gdb.info*' in the same directory. If necessary, you can
print out these files, or read them with any editor; but they are
easier to read using the `info' subsystem in GNU Emacs or the
`makeinfo'.
If you have `makeinfo' installed, and are in the top level GDB
-source directory (`gdb-5.2', in the case of version 5.2), you can make
+source directory (`gdb-5.2.1', in the case of version 5.2.1), you can make
the Info file by typing:
cd gdb/doc
If you want to typeset and print copies of this manual, you need
TeX, a program to print its DVI output files, and `texinfo.tex', the
Texinfo definitions file. This file is included in the GDB
-distribution, in the directory `gdb-5.2/texinfo'.
+distribution, in the directory `gdb-5.2.1/texinfo'.
TeX is a typesetting program; it does not print files directly, but
produces output files called DVI files. To print a typeset document,
This file tells TeX how to typeset a document written in Texinfo
format. On its own, TeX cannot read, much less typeset a Texinfo file.
`texinfo.tex' is distributed with GDB and is located in the
-`gdb-5.2/texinfo' directory.
+`gdb-5.2.1/texinfo' directory.
If you have TeX and a DVI printer program installed, you can typeset
and print this manual. First switch to the the `gdb' subdirectory of
-the main source directory (for example, to `gdb-5.2/gdb') and then type:
+the main source directory (for example, to `gdb-5.2.1/gdb') and then type:
make doc/gdb.dvi
a single directory, whose name is usually composed by appending the
version number to `gdb'.
- For example, the GDB version 5.2 distribution is in the `gdb-5.2'
+ For example, the GDB version 5.2.1 distribution is in the `gdb-5.2.1'
directory. That directory contains:
-`gdb-5.2/{COPYING,COPYING.LIB}'
+`gdb-5.2.1/{COPYING,COPYING.LIB}'
Standard GNU license files. Please read them.
-`gdb-5.2/bfd'
+`gdb-5.2.1/bfd'
source for the Binary File Descriptor library
-`gdb-5.2/config*'
+`gdb-5.2.1/config*'
script for configuring GDB, along with other support files
-`gdb-5.2/gdb'
+`gdb-5.2.1/gdb'
the source specific to GDB itself
-`gdb-5.2/include'
+`gdb-5.2.1/include'
GNU include files
-`gdb-5.2/libiberty'
+`gdb-5.2.1/libiberty'
source for the `-liberty' free software library
-`gdb-5.2/mmalloc'
+`gdb-5.2.1/mmalloc'
source for the GNU memory-mapped malloc package
-`gdb-5.2/opcodes'
+`gdb-5.2.1/opcodes'
source for the library of opcode tables and disassemblers
-`gdb-5.2/readline'
+`gdb-5.2.1/readline'
source for the GNU command-line interface
NOTE: The readline library is compiled for use by GDB, but will
not be installed on your system when "make install" is issued.
-`gdb-5.2/sim'
+`gdb-5.2.1/sim'
source for some simulators (ARM, D10V, SPARC, M32R, MIPS, PPC, V850, etc)
-`gdb-5.2/intl'
+`gdb-5.2.1/intl'
source for the GNU gettext library, for internationalization.
This is slightly modified from the standalone gettext
distribution you can get from GNU.
-`gdb-5.2/texinfo'
+`gdb-5.2.1/texinfo'
The `texinfo.tex' file, which you need in order to make a printed
manual using TeX.
-`gdb-5.2/etc'
+`gdb-5.2.1/etc'
Coding standards, useful files for editing GDB, and other
miscellanea.
-`gdb-5.2/utils'
+`gdb-5.2.1/utils'
A grab bag of random utilities.
Note: the following instructions are for building GDB on Unix or
The simplest way to configure and build GDB is to run `configure'
from the `gdb-VERSION-NUMBER' source directory, which in this example
-is the `gdb-5.2' directory.
+is the `gdb-5.2.1' directory.
First switch to the `gdb-VERSION-NUMBER' source directory if you are
not already in it; then run `configure'.
For example:
- cd gdb-5.2
+ cd gdb-5.2.1
./configure
make
sh configure
If you run `configure' from a directory that contains source
-directories for multiple libraries or programs, such as the `gdb-5.2'
-source directory for version 5.2, `configure' creates configuration
+directories for multiple libraries or programs, such as the `gdb-5.2.1'
+source directory for version 5.2.1, `configure' creates configuration
files for every directory level underneath (unless you tell it not to,
with the `--norecursion' option).
directories in the GDB distribution, if you only want to configure that
subdirectory; but be sure to specify a path to it.
- For example, with version 5.2, type the following to configure only
+ For example, with version 5.2.1, type the following to configure only
the `bfd' subdirectory:
- cd gdb-5.2/bfd
+ cd gdb-5.2.1/bfd
../configure
You can install `gdb' anywhere; it has no hardwired paths. However,
argument to `--srcdir', you can leave out the `--srcdir' option; it
will be assumed.)
- For example, with version 5.2, you can build GDB in a separate
+ For example, with version 5.2.1, you can build GDB in a separate
directory for a Sun 4 like this:
- cd gdb-5.2
+ cd gdb-5.2.1
mkdir ../gdb-sun4
cd ../gdb-sun4
- ../gdb-5.2/configure
+ ../gdb-5.2.1/configure
make
When `configure' builds a configuration using a remote source
The `Makefile' that `configure' generates in each source directory
also runs recursively. If you type `make' in a source directory such
-as `gdb-5.2' (or in a separate configured directory configured with
-`--srcdir=PATH/gdb-5.2'), you will build all the required libraries,
+as `gdb-5.2.1' (or in a separate configured directory configured with
+`--srcdir=PATH/gdb-5.2.1'), you will build all the required libraries,
and then build GDB.
When you have multiple hosts or targets configured in separate
Invalid configuration `i786v': machine `i786v' not recognized
`config.sub' is also distributed in the GDB source directory
-(`gdb-5.2', for version 5.2).
+(`gdb-5.2.1', for version 5.2.1).
`configure' options
remote-adapt.c AMD 29000 "Adapt"
remote-array.c Array Tech RAID controller
- remote-bug.c Motorola BUG monitor
remote-e7000.c Hitachi E7000 ICE
remote-eb.c AMD 29000 "EBMON"
remote-es.c Ericsson 1800 monitor
address "bug-gdb@gnu.org".
When submitting a bug, please include the GDB version number (e.g.,
-gdb-5.2), and how you configured it (e.g., "sun4" or "mach386 host,
+gdb-5.2.1), and how you configured it (e.g., "sun4" or "mach386 host,
i586-intel-synopsys target"). Since GDB now supports so many
different configurations, it is important that you be precise about
this. If at all possible, you should include the actual banner that
Once DejaGNU is installed, you can run the tests in one of the
following ways:
- (1) cd gdb-5.2
+ (1) cd gdb-5.2.1
make check-gdb
or
- (2) cd gdb-5.2/gdb
+ (2) cd gdb-5.2.1/gdb
make check
or
- (3) cd gdb-5.2/gdb/testsuite
+ (3) cd gdb-5.2.1/gdb/testsuite
make site.exp (builds the site specific file)
runtest -tool gdb GDB=../gdb (or GDB=<somepath> as appropriate)
updating *OLD_VECT and *SIZE as necessary. */
void
-grow_vect (old_vect, size, min_size, element_size)
- void** old_vect;
- size_t* size;
- size_t min_size;
- int element_size;
+grow_vect (void** old_vect, size_t* size, size_t min_size, int element_size)
{
if (*size < min_size) {
*size *= 2;
suffix of FIELD_NAME beginning "___" */
static int
-field_name_match (field_name, target)
- const char *field_name;
- const char *target;
+field_name_match (const char *field_name, const char *target)
{
int len = strlen (target);
return
/* The length of the prefix of NAME prior to any "___" suffix. */
int
-ada_name_prefix_len (name)
- const char* name;
+ada_name_prefix_len (const char* name)
{
if (name == NULL)
return 0;
* is non-null, and whose memory address (in the inferior) is
* ADDRESS. */
struct value*
-value_from_contents_and_address (type, valaddr, address)
- struct type* type;
- char* valaddr;
- CORE_ADDR address;
+value_from_contents_and_address (struct type* type, char* valaddr, CORE_ADDR address)
{
struct value* v = allocate_value (type);
if (valaddr == NULL)
value of type TYPE. The result is an lval in memory if VAL is. */
static struct value*
-coerce_unspec_val_to_type (val, offset, type)
- struct value* val;
- long offset;
- struct type *type;
+coerce_unspec_val_to_type (struct value* val, long offset, struct type *type)
{
CHECK_TYPEDEF (type);
if (VALUE_LVAL (val) == lval_memory)
}
static char*
-cond_offset_host (valaddr, offset)
- char* valaddr;
- long offset;
+cond_offset_host (char* valaddr, long offset)
{
if (valaddr == NULL)
return NULL;
}
static CORE_ADDR
-cond_offset_target (address, offset)
- CORE_ADDR address;
- long offset;
+cond_offset_target (CORE_ADDR address, long offset)
{
if (address == 0)
return 0;
MAIN_PST is not used. */
enum language
-ada_update_initial_language (lang, main_pst)
- enum language lang;
- struct partial_symtab* main_pst;
+ada_update_initial_language (enum language lang, struct partial_symtab* main_pst)
{
if (lookup_minimal_symbol ("adainit", (const char*) NULL,
(struct objfile*) NULL) != NULL)
/* True if STR should be suppressed in info listings. */
static int
-is_suppressed_name (str)
- const char* str;
+is_suppressed_name (const char* str)
{
if (STREQN (str, "_ada_", 5))
str += 5;
/* The "mangled" form of DEMANGLED, according to GNAT conventions.
* The result is valid until the next call to ada_mangle. */
char *
-ada_mangle (demangled)
- const char* demangled;
+ada_mangle (const char* demangled)
{
static char* mangling_buffer = NULL;
static size_t mangling_buffer_size = 0;
*/
char *
-ada_demangle (mangled)
- const char* mangled;
+ada_demangle (const char* mangled)
{
int i, j;
int len0;
* either argument is NULL. */
int
-ada_match_name (sym_name, name, wild)
- const char* sym_name;
- const char* name;
- int wild;
+ada_match_name (const char* sym_name, const char* name, int wild)
{
if (sym_name == NULL || name == NULL)
return 0;
suppressed in info listings. */
int
-ada_suppress_symbol_printing (sym)
- struct symbol *sym;
+ada_suppress_symbol_printing (struct symbol *sym)
{
if (SYMBOL_NAMESPACE (sym) == STRUCT_NAMESPACE)
return 1;
/* Like modify_field, but allows bitpos > wordlength. */
static void
-modify_general_field (addr, fieldval, bitpos, bitsize)
- char *addr;
- LONGEST fieldval;
- int bitpos, bitsize;
+modify_general_field (char *addr, LONGEST fieldval, int bitpos, int bitsize)
{
modify_field (addr + sizeof (LONGEST) * bitpos / (8 * sizeof (LONGEST)),
fieldval, bitpos % (8 * sizeof (LONGEST)),
/* The descriptor or array type, if any, indicated by TYPE; removes
level of indirection, if needed. */
static struct type*
-desc_base_type (type)
- struct type* type;
+desc_base_type (struct type* type)
{
if (type == NULL)
return NULL;
/* If TYPE is the type of an array descriptor (fat or thin pointer) or a
pointer to one, the type of its bounds data; otherwise, NULL. */
static struct type*
-desc_bounds_type (type)
- struct type* type;
+desc_bounds_type (struct type* type)
{
struct type* r;
/* If ARR is an array descriptor (fat or thin pointer), or pointer to
one, a pointer to its bounds data. Otherwise NULL. */
static struct value*
-desc_bounds (arr)
- struct value* arr;
+desc_bounds (struct value* arr)
{
struct type* type = check_typedef (VALUE_TYPE (arr));
if (is_thin_pntr (type))
/* If TYPE is the type of an array-descriptor (fat pointer), the bit
position of the field containing the address of the bounds data. */
static int
-fat_pntr_bounds_bitpos (type)
- struct type* type;
+fat_pntr_bounds_bitpos (struct type* type)
{
return TYPE_FIELD_BITPOS (desc_base_type (type), 1);
}
/* If TYPE is the type of an array-descriptor (fat pointer), the bit
size of the field containing the address of the bounds data. */
static int
-fat_pntr_bounds_bitsize (type)
- struct type* type;
+fat_pntr_bounds_bitsize (struct type* type)
{
type = desc_base_type (type);
pointer-to-array-with-no-bounds type); otherwise, NULL. Use
ada_type_of_array to get an array type with bounds data. */
static struct type*
-desc_data_type (type)
- struct type* type;
+desc_data_type (struct type* type)
{
type = desc_base_type (type);
/* If ARR is an array descriptor (fat or thin pointer), a pointer to
its array data. */
static struct value*
-desc_data (arr)
- struct value* arr;
+desc_data (struct value* arr)
{
struct type* type = VALUE_TYPE (arr);
if (is_thin_pntr (type))
/* If TYPE is the type of an array-descriptor (fat pointer), the bit
position of the field containing the address of the data. */
static int
-fat_pntr_data_bitpos (type)
- struct type* type;
+fat_pntr_data_bitpos (struct type* type)
{
return TYPE_FIELD_BITPOS (desc_base_type (type), 0);
}
/* If TYPE is the type of an array-descriptor (fat pointer), the bit
size of the field containing the address of the data. */
static int
-fat_pntr_data_bitsize (type)
- struct type* type;
+fat_pntr_data_bitsize (struct type* type)
{
type = desc_base_type (type);
the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
bound, if WHICH is 1. The first bound is I=1. */
static struct value*
-desc_one_bound (bounds, i, which)
- struct value* bounds;
- int i;
- int which;
+desc_one_bound (struct value* bounds, int i, int which)
{
return value_struct_elt (&bounds, NULL, bound_name[2*i+which-2], NULL,
"Bad GNAT array descriptor bounds");
of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
bound, if WHICH is 1. The first bound is I=1. */
static int
-desc_bound_bitpos (type, i, which)
- struct type* type;
- int i;
- int which;
+desc_bound_bitpos (struct type* type, int i, int which)
{
return TYPE_FIELD_BITPOS (desc_base_type (type), 2*i+which-2);
}
of the Ith lower bound stored in it, if WHICH is 0, and the Ith upper
bound, if WHICH is 1. The first bound is I=1. */
static int
-desc_bound_bitsize (type, i, which)
- struct type* type;
- int i;
- int which;
+desc_bound_bitsize (struct type* type, int i, int which)
{
type = desc_base_type (type);
/* If TYPE is the type of an array-bounds structure, the type of its
Ith bound (numbering from 1). Otherwise, NULL. */
static struct type*
-desc_index_type (type, i)
- struct type* type;
- int i;
+desc_index_type (struct type* type, int i)
{
type = desc_base_type (type);
/* The number of index positions in the array-bounds type TYPE. 0
if TYPE is NULL. */
static int
-desc_arity (type)
- struct type* type;
+desc_arity (struct type* type)
{
type = desc_base_type (type);
/* Non-zero iff type is a simple array type (or pointer to one). */
int
-ada_is_simple_array (type)
- struct type* type;
+ada_is_simple_array (struct type* type)
{
if (type == NULL)
return 0;
/* Non-zero iff type belongs to a GNAT array descriptor. */
int
-ada_is_array_descriptor (type)
- struct type* type;
+ada_is_array_descriptor (struct type* type)
{
struct type* data_type = desc_data_type (type);
debugging output from GNAT. Re-examine periodically to see if it
is still needed. */
int
-ada_is_bogus_array_descriptor (type)
- struct type *type;
+ada_is_bogus_array_descriptor (struct type *type)
{
return
type != NULL
returns NULL. The result is simply the type of ARR if ARR is not
a descriptor. */
struct type*
-ada_type_of_array (arr, bounds)
- struct value* arr;
- int bounds;
+ada_type_of_array (struct value* arr, int bounds)
{
if (ada_is_packed_array_type (VALUE_TYPE (arr)))
return decode_packed_array_type (VALUE_TYPE (arr));
appropriately or, if ARR is a non-null fat pointer, a pointer to a standard
GDB array. Returns NULL if ARR is a null fat pointer. */
struct value*
-ada_coerce_to_simple_array_ptr (arr)
- struct value* arr;
+ada_coerce_to_simple_array_ptr (struct value* arr)
{
if (ada_is_array_descriptor (VALUE_TYPE (arr)))
{
Otherwise, returns a standard GDB array describing ARR (which may
be ARR itself if it already is in the proper form). */
struct value*
-ada_coerce_to_simple_array (arr)
- struct value* arr;
+ada_coerce_to_simple_array (struct value* arr)
{
if (ada_is_array_descriptor (VALUE_TYPE (arr)))
{
ordinary GDB array type (possibly with BITSIZE fields indicating
packing). For other types, is the identity. */
struct type*
-ada_coerce_to_simple_array_type (type)
- struct type* type;
+ada_coerce_to_simple_array_type (struct type*type)
{
struct value* mark = value_mark ();
struct value* dummy = value_from_longest (builtin_type_long, 0);
/* Non-zero iff TYPE represents a standard GNAT packed-array type. */
int
-ada_is_packed_array_type (type)
- struct type* type;
+ada_is_packed_array_type (struct type* type)
{
if (type == NULL)
return 0;
TYPE_FIELD_BITSIZE values, and with *ELT_BITS set to its total size
in bits. */
static struct type*
-packed_array_type (type, elt_bits)
- struct type* type;
- long* elt_bits;
+packed_array_type (struct type* type, long* elt_bits)
{
struct type* new_elt_type;
struct type* new_type;
/* The array type encoded by TYPE, where ada_is_packed_array_type (TYPE).
*/
static struct type*
-decode_packed_array_type (type)
- struct type* type;
+decode_packed_array_type (struct type* type)
{
struct symbol** syms;
struct block** blocks;
type length is set appropriately. */
static struct value*
-decode_packed_array (arr)
- struct value* arr;
+decode_packed_array (struct value* arr)
{
struct type* type = decode_packed_array_type (VALUE_TYPE (arr));
given in IND. ARR must be a simple array. */
static struct value*
-value_subscript_packed (arr, arity, ind)
- struct value* arr;
- int arity;
- struct value** ind;
+value_subscript_packed (struct value* arr, int arity, struct value** ind)
{
int i;
int bits, elt_off, bit_off;
/* Non-zero iff TYPE includes negative integer values. */
static int
-has_negatives (type)
- struct type* type;
+has_negatives (struct type* type)
{
switch (TYPE_CODE (type)) {
default:
Assumes 0 <= BIT_OFFSET < HOST_CHAR_BIT. */
struct value*
-ada_value_primitive_packed_val (obj, valaddr, offset, bit_offset,
- bit_size, type)
- struct value* obj;
- char* valaddr;
- long offset;
- int bit_offset;
- int bit_size;
- struct type* type;
+ada_value_primitive_packed_val (struct value* obj, char* valaddr, long offset, int bit_offset,
+ int bit_size, struct type* type)
{
struct value* v;
int src, /* Index into the source area. */
thereto. */
struct value*
-ada_value_subscript (arr, arity, ind)
- struct value* arr;
- int arity;
- struct value** ind;
+ada_value_subscript (struct value* arr, int arity, struct value** ind)
{
int k;
struct value* elt;
IND. Does not read the entire array into memory. */
struct value*
-ada_value_ptr_subscript (arr, type, arity, ind)
- struct value* arr;
- struct type* type;
- int arity;
- struct value** ind;
+ada_value_ptr_subscript (struct value* arr, struct type* type, int arity, struct value** ind)
{
int k;
type designation. Otherwise, returns 0. */
int
-ada_array_arity (type)
- struct type* type;
+ada_array_arity (struct type* type)
{
int arity;
NINDICES is -1. Otherwise, returns NULL. */
struct type*
-ada_array_element_type (type, nindices)
- struct type* type;
- int nindices;
+ada_array_element_type (struct btype* type, int nindices)
{
type = desc_base_type (type);
not examine memory. */
struct type*
-ada_index_type (type, n)
- struct type* type;
- int n;
+ada_index_type (struct type* type, int n)
{
type = desc_base_type (type);
run-time quantities other than discriminants. */
LONGEST
-ada_array_bound_from_type (arr_type, n, which, typep)
- struct type* arr_type;
- int n;
- int which;
- struct type** typep;
+ada_array_bound_from_type (struct type* arr_type, int n, int which, struct type** typep)
{
struct type* type;
struct type* index_type_desc;
clauses at the moment. */
struct value*
-ada_array_length (arr, n)
- struct value* arr;
- int n;
+ada_array_length (struct value* arr, int n)
{
struct type* arr_type = check_typedef (VALUE_TYPE (arr));
struct type* index_type_desc;
to op. */
static const char*
-ada_op_name (op)
- enum exp_opcode op;
+ada_op_name (enum exp_opcode op)
{
int i;
May change (expand) *EXP. */
void
-ada_resolve (expp, context_type)
- struct expression** expp;
- struct type* context_type;
+ada_resolve (struct expression** expp, struct type* context_type)
{
int pc;
pc = 0;
EXP. The CONTEXT_TYPE functions as in ada_resolve, above. */
static struct value*
-ada_resolve_subexp (expp, pos, deprocedure_p, context_type)
- struct expression** expp;
- int *pos;
- int deprocedure_p;
- struct type* context_type;
+ada_resolve_subexp (struct expression** expp, int *pos, int deprocedure_p, struct type* context_type)
{
int pc = *pos;
int i;
argument function. */
static int
-ada_args_match (func, actuals, n_actuals)
- struct symbol* func;
- struct value** actuals;
- int n_actuals;
+ada_args_match (struct symbol* func, struct value** actuals, int n_actuals)
{
int i;
struct type* func_type = SYMBOL_TYPE (func);
or an enumerated type. A null CONTEXT_TYPE indicates any non-void type. */
static int
-return_match (func_type, context_type)
- struct type* func_type;
- struct type* context_type;
+return_match (struct type* func_type, struct type* context_type)
{
struct type* return_type;
is modified in parallel to SYMS. */
int
-ada_resolve_function (syms, blocks, nsyms, args, nargs, name, context_type)
- struct symbol* syms[];
- struct block* blocks[];
- struct value** args;
- int nsyms, nargs;
- const char* name;
- struct type* context_type;
+ada_resolve_function (struct symbol* syms[], struct block* blocks[], int nsyms,
+ struct value** args, int nargs, const char* name,
+ struct type* context_type)
{
int k;
int m; /* Number of hits */
/* mangled names, rearranging BLOCKS[0..NSYMS-1] according to the same */
/* permutation. */
static void
-sort_choices (syms, blocks, nsyms)
- struct symbol* syms[];
- struct block* blocks[];
- int nsyms;
+sort_choices (struct symbol* syms[], struct block* blocks[], int nsyms)
{
int i, j;
for (i = 1; i < nsyms; i += 1)
to be re-integrated one of these days. */
int
-user_select_syms (syms, blocks, nsyms, max_results)
- struct symbol* syms[];
- struct block* blocks[];
- int nsyms;
- int max_results;
+user_select_syms (struct symbol* syms[], struct block* blocks[], int nsyms,
+ int max_results)
{
int i;
int* chosen = (int*) alloca (sizeof(int) * nsyms);
prompts (for use with the -f switch). */
int
-get_selections (choices, n_choices, max_results, is_all_choice,
- annotation_suffix)
- int* choices;
- int n_choices;
- int max_results;
- int is_all_choice;
- char* annotation_suffix;
+get_selections (int* choices, int n_choices, int max_results,
+ int is_all_choice, char* annotation_suffix)
{
int i;
char* args;
/* arguments. Update *EXPP as needed to hold more space. */
static void
-replace_operator_with_call (expp, pc, nargs, oplen, sym, block)
- struct expression** expp;
- int pc, nargs, oplen;
- struct symbol* sym;
- struct block* block;
+replace_operator_with_call (struct expression** expp, int pc, int nargs,
+ int oplen, struct symbol* sym,
+ struct block* block)
{
/* A new expression, with 6 more elements (3 for funcall, 4 for function
symbol, -oplen for operator being replaced). */
/* FLOAT.) */
static int
-numeric_type_p (type)
- struct type* type;
+numeric_type_p (struct type* type)
{
if (type == NULL)
return 0;
/* True iff TYPE is integral (an INT or RANGE of INTs). */
static int
-integer_type_p (type)
- struct type* type;
+integer_type_p (struct type* type)
{
if (type == NULL)
return 0;
/* True iff TYPE is scalar (INT, RANGE, FLOAT, ENUM). */
static int
-scalar_type_p (type)
- struct type* type;
+scalar_type_p (struct type* type)
{
if (type == NULL)
return 0;
/* True iff TYPE is discrete (INT, RANGE, ENUM). */
static int
-discrete_type_p (type)
- struct type* type;
+discrete_type_p (struct type* type)
{
if (type == NULL)
return 0;
(i.e., result 0). */
static int
-possible_user_operator_p (op, args)
- enum exp_opcode op;
- struct value* args[];
+possible_user_operator_p (enum exp_opcode op, struct value* args[])
{
struct type* type0 = check_typedef (VALUE_TYPE (args[0]));
struct type* type1 =
* an exception renaming, and XRS for a subprogram renaming. Returns
* NULL if NAME encodes none of these. */
const char*
-ada_renaming_type (type)
- struct type* type;
+ada_renaming_type (struct type* type)
{
if (type != NULL && TYPE_CODE (type) == TYPE_CODE_ENUM)
{
/* Return non-zero iff SYM encodes an object renaming. */
int
-ada_is_object_renaming (sym)
- struct symbol* sym;
+ada_is_object_renaming (struct symbol* sym)
{
const char* renaming_type = ada_renaming_type (SYMBOL_TYPE (sym));
return renaming_type != NULL
* name of the renamed entity. The name is good until the end of
* parsing. */
const char*
-ada_simple_renamed_entity (sym)
- struct symbol* sym;
+ada_simple_renamed_entity (struct symbol* sym)
{
struct type* type;
const char* raw_name;
pointer. Return VAL as an lvalue. */
static struct value*
-place_on_stack (val, sp)
- struct value* val;
- CORE_ADDR* sp;
+place_on_stack (struct value* val, CORE_ADDR* sp)
{
CORE_ADDR old_sp = *sp;
values not residing in memory, updating it as needed. */
static struct value*
-convert_actual (actual, formal_type0, sp)
- struct value* actual;
- struct type* formal_type0;
- CORE_ADDR* sp;
+convert_actual (struct value* actual, struct type* formal_type0, CORE_ADDR* sp)
{
struct type* actual_type = check_typedef (VALUE_TYPE (actual));
struct type* formal_type = check_typedef (formal_type0);
representing a pointer to this descriptor. */
static struct value*
-make_array_descriptor (type, arr, sp)
- struct type* type;
- struct value* arr;
- CORE_ADDR* sp;
+make_array_descriptor (struct type* type, struct value* arr, CORE_ADDR* sp)
{
struct type* bounds_type = desc_bounds_type (type);
struct type* desc_type = desc_base_type (type);
value as needed. */
void
-ada_convert_actuals (func, nargs, args, sp)
- struct value* func;
- int nargs;
- struct value* args[];
- CORE_ADDR* sp;
+ada_convert_actuals (struct value* func, int nargs, struct value* args[], CORE_ADDR* sp)
{
int i;
* given NAMESPACE. */
static struct symbol*
-standard_lookup (name, namespace)
- const char* name;
- namespace_enum namespace;
+standard_lookup (const char* name, namespace_enum namespace)
{
struct symbol* sym;
struct symtab* symtab;
/* in SYMS[0..N-1]. We treat enumerals as functions, since they */
/* contend in overloading in the same way. */
static int
-is_nonfunction (syms, n)
- struct symbol* syms[];
- int n;
+is_nonfunction (struct symbol* syms[], int n)
{
int i;
struct types. Otherwise, they may not. */
static int
-equiv_types (type0, type1)
- struct type* type0;
- struct type* type1;
+equiv_types (struct type* type0, struct type* type1)
{
if (type0 == type1)
return 1;
no more defined than that of SYM1. */
static int
-lesseq_defined_than (sym0, sym1)
- struct symbol* sym0;
- struct symbol* sym1;
+lesseq_defined_than (struct symbol* sym0, struct symbol* sym1)
{
if (sym0 == sym1)
return 1;
defn_blocks as needed. Do not include SYM if it is a duplicate. */
static void
-add_defn_to_vec (sym, block)
- struct symbol* sym;
- struct block* block;
+add_defn_to_vec (struct symbol* sym, struct block* block)
{
int i;
size_t tmp;
wild-card match if WILD. */
static struct partial_symbol *
-ada_lookup_partial_symbol (pst, name, global, namespace, wild)
- struct partial_symtab *pst;
- const char *name;
- int global;
- namespace_enum namespace;
- int wild;
+ada_lookup_partial_symbol (struct partial_symtab *pst, const char *name, int global, namespace_enumnamespace, int wild)
{
struct partial_symbol **start;
int name_len = strlen (name);
/* Find a symbol table containing symbol SYM or NULL if none. */
static struct symtab*
-symtab_for_sym (sym)
- struct symbol* sym;
+symtab_for_sym (struct symbol* sym)
{
struct symtab* s;
struct objfile *objfile;
rules. Returns NULL if there is no such minimal symbol. */
struct minimal_symbol*
-ada_lookup_minimal_symbol (name)
- const char* name;
+ada_lookup_minimal_symbol (const char* name)
{
struct objfile* objfile;
struct minimal_symbol* msymbol;
* frame as a static link, and then searches up the call stack for a
* frame with that same local-variable base. */
static void
-add_symbols_from_enclosing_procs (name, namespace, wild_match)
- const char* name;
- namespace_enum namespace;
- int wild_match;
+add_symbols_from_enclosing_procs (const char* name, namespace_enum namespace, int wild_match)
{
#ifdef i386
static struct symbol static_link_sym;
/* True if TYPE is definitely an artificial type supplied to a symbol
* for which no debugging information was given in the symbol file. */
static int
-is_nondebugging_type (type)
- struct type* type;
+is_nondebugging_type (struct type* type)
{
char* name = ada_type_name (type);
return (name != NULL && STREQ (name, "<variable, no debug info>"));
* correspondence between SYMS[i] and BLOCKS[i]. Returns the number
* of symbols in the modified list. */
static int
-remove_extra_symbols (syms, blocks, nsyms)
- struct symbol** syms;
- struct block** blocks;
- int nsyms;
+remove_extra_symbols (struct symbol** syms, struct block** blocks, int nsyms)
{
int i, j;
surrounding BLOCK0, then these alone are returned. */
int
-ada_lookup_symbol_list (name, block0, namespace, syms, blocks)
- const char *name;
- struct block *block0;
- namespace_enum namespace;
- struct symbol*** syms;
- struct block*** blocks;
+ada_lookup_symbol_list (const char *name, struct block *block0,
+ namespace_enum namespace, struct symbol*** syms,
+ struct block*** blocks)
{
struct symbol *sym;
struct symtab *s;
* disambiguated by user query if needed. */
struct symbol*
-ada_lookup_symbol (name, block0, namespace)
- const char *name;
- struct block *block0;
- namespace_enum namespace;
+ada_lookup_symbol (const char *name, struct block *block0, namespace_enum namespace)
{
struct symbol** candidate_syms;
struct block** candidate_blocks;
*
*/
static int
-is_name_suffix (str)
- const char* str;
+is_name_suffix (const char* str)
{
int k;
if (str[0] == 'X')
* informational suffixes of NAME (i.e., for which is_name_suffix is
* true). */
static int
-wild_match (patn, patn_len, name)
- const char* patn;
- int patn_len;
- const char* name;
+wild_match (const char* patn, int patn_len, const char* name)
{
int name_len;
int s, e;
wildcard prefix. OBJFILE is the section containing BLOCK. */
static void
-ada_add_block_symbols (block, name, namespace, objfile, wild)
- struct block* block;
- const char* name;
- namespace_enum namespace;
- struct objfile* objfile;
- int wild;
+ada_add_block_symbols (struct block* block, const char* name,
+ namespace_enum namespace, struct objfile* objfile,
+ int wild)
{
int i;
int name_len = strlen (name);
with prototype information, if it is not already there. */
static void
-fill_in_ada_prototype (func)
- struct symbol* func;
+fill_in_ada_prototype (struct symbol* func)
{
struct block* b;
int nargs, nsyms;
of that name. This is the first ':', ' ', or end of LINE.
*/
char*
-ada_start_decode_line_1 (line)
- char* line;
+ada_start_decode_line_1 (char* line)
{
/* [NOTE: strpbrk would be more elegant, but I am reluctant to be
the first to use such a library function in GDB code.] */
is the caller's responsibility to free them. */
struct symtabs_and_lines
-ada_finish_decode_line_1 (spec, file_table, funfirstline, canonical)
- char** spec;
- struct symtab* file_table;
- int funfirstline;
- char*** canonical;
+ada_finish_decode_line_1 (char** spec, struct symtab* file_table,
+ int funfirstline, char*** canonical)
{
struct symbol** symbols;
struct block** blocks;
with file name FILENAME that occurs in one of the functions listed
in SYMBOLS[0 .. NSYMS-1]. */
static struct symtabs_and_lines
-find_sal_from_funcs_and_line (filename, line_num, symbols, nsyms)
- const char* filename;
- int line_num;
- struct symbol** symbols;
- int nsyms;
+find_sal_from_funcs_and_line (const char* filename, int line_num,
+ struct symbol** symbols, int nsyms)
{
struct symtabs_and_lines sals;
int best_index, best;
pc falls within one of the functions denoted by SYMBOLS[0..NSYMS-1].
Set *EXACTP to the 1 if the match is exact, and 0 otherwise. */
static int
-find_line_in_linetable (linetable, line_num, symbols, nsyms, exactp)
- struct linetable* linetable;
- int line_num;
- struct symbol** symbols;
- int nsyms;
- int* exactp;
+find_line_in_linetable (struct linetable* linetable, int line_num,
+ struct symbol** symbols, int nsyms, int* exactp)
{
int i, len, best_index, best;
LINETABLE, and k falls strictly within a named function that begins at
or before LINE_NUM. Return -1 if there is no such k. */
static int
-nearest_line_number_in_linetable (linetable, line_num)
- struct linetable* linetable;
- int line_num;
+nearest_line_number_in_linetable (struct linetable* linetable, int line_num)
{
int i, len, best;
IND == -1 corresponds to no function. */
static int
-find_next_line_in_linetable (linetable, line_num, starting_line, ind)
- struct linetable* linetable;
- int line_num;
- int starting_line;
- int ind;
+find_next_line_in_linetable (struct linetable* linetable, int line_num,
+ int starting_line, int ind)
{
int i, len;
/* True iff function symbol SYM starts somewhere at or before line #
LINE_NUM. */
static int
-is_plausible_func_for_line (sym, line_num)
- struct symbol* sym;
- int line_num;
+is_plausible_func_for_line (struct symbol* sym, int line_num)
{
struct symtab_and_line start_sal;
}
static void
-debug_print_lines (lt)
- struct linetable* lt;
+debug_print_lines (struct linetable* lt)
{
int i;
}
static void
-debug_print_block (b)
- struct block* b;
+debug_print_block (struct block* b)
{
int i;
struct symbol *i;
}
static void
-debug_print_blocks (bv)
- struct blockvector* bv;
+debug_print_blocks (struct blockvector* bv)
{
int i;
}
static void
-debug_print_symtab (s)
- struct symtab* s;
+debug_print_symtab (struct symtab* s)
{
fprintf (stderr, "Symtab %p\n File: %s; Dir: %s\n", s,
s->filename, s->dirname);
/* Read in all symbol tables corresponding to partial symbol tables
with file name FILENAME. */
static void
-read_all_symtabs (filename)
- const char* filename;
+read_all_symtabs (const char* filename)
{
struct partial_symtab* ps;
struct objfile* objfile;
FILENAME, as filtered by the user. If CANONICAL is not null, set
it to a corresponding array of canonical line specs. */
static struct symtabs_and_lines
-all_sals_for_line (filename, line_num, canonical)
- const char* filename;
- int line_num;
- char*** canonical;
+all_sals_for_line (const char* filename, int line_num, char*** canonical)
{
struct symtabs_and_lines result;
struct objfile* objfile;
allocated. */
static char*
-extended_canonical_line_spec (sal, name)
- struct symtab_and_line sal;
- const char* name;
+extended_canonical_line_spec (struct symtab_and_line sal, const char* name)
{
char* r;
}
static void
-begin_command (args, from_tty)
- char *args;
- int from_tty;
+begin_command (char *args, int from_tty)
{
struct minimal_symbol *msym;
CORE_ADDR main_program_name_addr;
}
int
-is_ada_runtime_file (filename)
- char *filename;
+is_ada_runtime_file (char *filename)
{
return (STREQN (filename, "s-", 2) ||
STREQN (filename, "a-", 2) ||
part of the Ada run-time, starting from fi and moving upward. */
int
-find_printable_frame (fi, level)
- struct frame_info *fi;
- int level;
+find_printable_frame (struct frame_info *fi, int level)
{
struct symtab_and_line sal;
}
void
-ada_report_exception_break (b)
- struct breakpoint *b;
+ada_report_exception_break (struct breakpoint *b)
{
#ifdef UI_OUT
/* FIXME: break_on_exception should be defined in breakpoint.h */
to be invisible to users. */
int
-ada_is_ignored_field (type, field_num)
- struct type *type;
- int field_num;
+ada_is_ignored_field (struct type *type, int field_num)
{
if (field_num < 0 || field_num > TYPE_NFIELDS (type))
return 1;
/* True iff structure type TYPE has a tag field. */
int
-ada_is_tagged_type (type)
- struct type *type;
+ada_is_tagged_type (struct type *type)
{
if (type == NULL || TYPE_CODE (type) != TYPE_CODE_STRUCT)
return 0;
/* The type of the tag on VAL. */
struct type*
-ada_tag_type (val)
- struct value* val;
+ada_tag_type (struct value* val)
{
return ada_lookup_struct_elt_type (VALUE_TYPE (val), "_tag", 0, NULL);
}
/* The value of the tag on VAL. */
struct value*
-ada_value_tag (val)
- struct value* val;
+ada_value_tag (struct value* val)
{
return ada_value_struct_elt (val, "_tag", "record");
}
/* The parent type of TYPE, or NULL if none. */
struct type*
-ada_parent_type (type)
- struct type *type;
+ada_parent_type (struct type *type)
{
int i;
a structure type with at least FIELD_NUM+1 fields. */
int
-ada_is_parent_field (type, field_num)
- struct type *type;
- int field_num;
+ada_is_parent_field (struct type *type, int field_num)
{
const char* name = TYPE_FIELD_NAME (check_typedef (type), field_num);
return (name != NULL &&
structures. */
int
-ada_is_wrapper_field (type, field_num)
- struct type *type;
- int field_num;
+ada_is_wrapper_field (struct type *type, int field_num)
{
const char* name = TYPE_FIELD_NAME (type, field_num);
return (name != NULL
FIELD_NUM+1 fields. */
int
-ada_is_variant_part (type, field_num)
- struct type *type;
- int field_num;
+ada_is_variant_part (struct type *type, int field_num)
{
struct type* field_type = TYPE_FIELD_TYPE (type, field_num);
return (TYPE_CODE (field_type) == TYPE_CODE_UNION
returns the type of the controlling discriminant for the variant. */
struct type*
-ada_variant_discrim_type (var_type, outer_type)
- struct type *var_type;
- struct type *outer_type;
+ada_variant_discrim_type (struct type *var_type, struct type *outer_type)
{
char* name = ada_variant_discrim_name (var_type);
struct type *type =
represents a 'when others' clause; otherwise 0. */
int
-ada_is_others_clause (type, field_num)
- struct type *type;
- int field_num;
+ada_is_others_clause (struct type *type, int field_num)
{
const char* name = TYPE_FIELD_NAME (type, field_num);
return (name != NULL && name[0] == 'O');
value is valid until the next call to ada_variant_discrim_name. */
char *
-ada_variant_discrim_name (type0)
- struct type *type0;
+ada_variant_discrim_name (struct type *type0)
{
static char* result = NULL;
static size_t result_len = 0;
does not occur. */
int
-ada_scan_number (str, k, R, new_k)
- const char str[];
- int k;
- LONGEST *R;
- int *new_k;
+ada_scan_number (const char str[], int k, LONGEST *R, int *new_k)
{
ULONGEST RU;
in the range encoded by field FIELD_NUM of TYPE; otherwise 0. */
int
-ada_in_variant (val, type, field_num)
- LONGEST val;
- struct type *type;
- int field_num;
+ada_in_variant (LONGEST val, struct type *type, int field_num)
{
const char* name = TYPE_FIELD_NAME (type, field_num);
int p;
in that it can handle packed values of arbitrary type. */
struct value*
-ada_value_primitive_field (arg1, offset, fieldno, arg_type)
- struct value* arg1;
- int offset;
- int fieldno;
- struct type *arg_type;
+ada_value_primitive_field (struct value* arg1, int offset, int fieldno,
+ struct type *arg_type)
{
struct value* v;
struct type *type;
Searches recursively through wrapper fields (e.g., '_parent'). */
struct value*
-ada_search_struct_field (name, arg, offset, type)
- char *name;
- struct value* arg;
- int offset;
- struct type *type;
+ada_search_struct_field (char *name, struct value* arg, int offset,
+ struct type *type)
{
int i;
CHECK_TYPEDEF (type);
of entity that ARG is supposed to be. */
struct value*
-ada_value_struct_elt (arg, name, err)
- struct value* arg;
- char *name;
- char *err;
+ada_value_struct_elt (struct value *arg, char *name, char *err)
{
struct type *t;
struct value* v;
If NOERR is nonzero, return NULL if NAME is not suitably defined. */
struct type *
-ada_lookup_struct_elt_type (type, name, noerr, dispp)
- struct type *type;
- char *name;
- int noerr;
- int *dispp;
+ada_lookup_struct_elt_type (struct type *type, char *name, int noerr, int *dispp)
{
int i;
numbering from 0) is applicable. Returns -1 if none are. */
int
-ada_which_variant_applies (var_type, outer_type, outer_valaddr)
- struct type *var_type;
- struct type *outer_type;
- char* outer_valaddr;
+ada_which_variant_applies (struct type *var_type, struct type *outer_type,
+ char* outer_valaddr)
{
int others_clause;
int i;
dynamic-sized types. */
struct value*
-ada_value_ind (val0)
- struct value* val0;
+ada_value_ind (struct value* val0)
{
struct value* val = unwrap_value (value_ind (val0));
return ada_to_fixed_value (VALUE_TYPE (val), 0,
/* The value resulting from dereferencing any "reference to"
* qualifiers on VAL0. */
static struct value*
-ada_coerce_ref (val0)
- struct value* val0;
+ada_coerce_ref (struct value* val0)
{
if (TYPE_CODE (VALUE_TYPE (val0)) == TYPE_CODE_REF) {
struct value* val = val0;
ALIGNMENT (a power of 2). */
static unsigned int
-align_value (off, alignment)
- unsigned int off;
- unsigned int alignment;
+align_value (unsigned int off, unsigned int alignment)
{
return (off + alignment - 1) & ~(alignment - 1);
}
type TYPE. */
static unsigned int
-field_offset (type, f)
- struct type *type;
- int f;
+field_offset (struct type *type, int f)
{
int n = TYPE_FIELD_BITPOS (type, f);
/* Kludge (temporary?) to fix problem with dwarf output. */
/* Return the bit alignment required for field #F of template type TYPE. */
static unsigned int
-field_alignment (type, f)
- struct type *type;
- int f;
+field_alignment (struct type *type, int f)
{
const char* name = TYPE_FIELD_NAME (type, f);
int len = (name == NULL) ? 0 : strlen (name);
/* Find a type named NAME. Ignores ambiguity. */
struct type*
-ada_find_any_type (name)
- const char *name;
+ada_find_any_type (const char *name)
{
struct symbol* sym;
that of TYPE1 for purposes of type printing, return non-zero;
otherwise return 0. */
int
-ada_prefer_type (type0, type1)
- struct type* type0;
- struct type* type1;
+ada_prefer_type (struct type* type0, struct type* type1)
{
if (type1 == NULL)
return 1;
/* The name of TYPE, which is either its TYPE_NAME, or, if that is
null, its TYPE_TAG_NAME. Null if TYPE is null. */
char*
-ada_type_name (type)
- struct type* type;
+ada_type_name (struct type* type)
{
if (type == NULL)
return NULL;
SUFFIX to the name of TYPE. */
struct type*
-ada_find_parallel_type (type, suffix)
- struct type *type;
- const char *suffix;
+ada_find_parallel_type (struct type *type, const char *suffix)
{
static char* name;
static size_t name_len = 0;
type describing its fields. Otherwise, return NULL. */
static struct type*
-dynamic_template_type (type)
- struct type* type;
+dynamic_template_type (struct type* type)
{
CHECK_TYPEDEF (type);
non-zero iff field FIELD_NUM of TEMPL_TYPE has dynamic size. */
static int
-is_dynamic_field (templ_type, field_num)
- struct type* templ_type;
- int field_num;
+is_dynamic_field (struct type* templ_type, int field_num)
{
const char *name = TYPE_FIELD_NAME (templ_type, field_num);
return name != NULL
contains a variant part. */
static int
-contains_variant_part (type)
- struct type* type;
+contains_variant_part (struct type* type)
{
int f;
/* A record type with no fields, . */
static struct type*
-empty_record (objfile)
- struct objfile* objfile;
+empty_record (struct objfile* objfile)
{
struct type* type = alloc_type (objfile);
TYPE_CODE (type) = TYPE_CODE_STRUCT;
* byte-aligned. */
static struct type*
-template_to_fixed_record_type (type, valaddr, address, dval0)
- struct type* type;
- char* valaddr;
- CORE_ADDR address;
- struct value* dval0;
-
+template_to_fixed_record_type (struct type* type, char* valaddr,
+ CORE_ADDR address, struct value* dval0)
{
struct value* mark = value_mark();
struct value* dval;
function in the TYPE_TARGET_TYPE of the template type. */
static struct type*
-template_to_static_fixed_type (templ_type)
- struct type* templ_type;
+template_to_static_fixed_type (struct type* templ_type)
{
struct type *type;
int nfields;
part -- in which the variant part is replaced with the appropriate
branch. */
static struct type*
-to_record_with_fixed_variant_part (type, valaddr, address, dval)
- struct type* type;
- char* valaddr;
- CORE_ADDR address;
- struct value* dval;
+to_record_with_fixed_variant_part (struct type* type, char* valaddr,
+ CORE_ADDR address, struct value* dval)
{
struct value* mark = value_mark();
struct type* rtype;
of the variant. */
static struct type*
-to_fixed_record_type (type0, valaddr, address, dval)
- struct type* type0;
- char* valaddr;
- CORE_ADDR address;
- struct value* dval;
+to_fixed_record_type (struct type* type0, char* valaddr, CORE_ADDR address,
+ struct value* dval)
{
struct type* templ_type;
indicated in the union's type name. */
static struct type*
-to_fixed_variant_branch_type (var_type0, valaddr, address, dval)
- struct type* var_type0;
- char* valaddr;
- CORE_ADDR address;
- struct value* dval;
+to_fixed_variant_branch_type (struct type* var_type0, char* valaddr,
+ CORE_ADDR address, struct value* dval)
{
int which;
struct type* templ_type;
*/
static struct type*
-to_fixed_array_type (type0, dval, ignore_too_big)
- struct type* type0;
- struct value* dval;
- int ignore_too_big;
+to_fixed_array_type (struct type* type0, struct value* dval,
+ int ignore_too_big)
{
struct type* index_type_desc;
struct type* result;
and may be NULL if there are none. */
struct type*
-ada_to_fixed_type (type, valaddr, address, dval)
- struct type* type;
- char* valaddr;
- CORE_ADDR address;
- struct value* dval;
+ada_to_fixed_type (struct type* type, char* valaddr, CORE_ADDR address,
+ struct value* dval)
{
CHECK_TYPEDEF (type);
switch (TYPE_CODE (type)) {
TYPE0, but based on no runtime data. */
static struct type*
-to_static_fixed_type (type0)
- struct type* type0;
+to_static_fixed_type (struct type* type0)
{
struct type* type;
/* A static approximation of TYPE with all type wrappers removed. */
static struct type*
-static_unwrap_type (type)
- struct type* type;
+static_unwrap_type (struct type* type)
{
if (ada_is_aligner_type (type))
{
/* A type equivalent to TYPE that is not a non-record stub, if one
exists, otherwise TYPE. */
struct type*
-ada_completed_type (type)
- struct type* type;
+ada_completed_type (struct type* type)
{
CHECK_TYPEDEF (type);
if (type == NULL || TYPE_CODE (type) != TYPE_CODE_ENUM
creation of struct values]. */
struct value*
-ada_to_fixed_value (type0, valaddr, address, val0)
- struct type* type0;
- char* valaddr;
- CORE_ADDR address;
- struct value* val0;
+ada_to_fixed_value (struct type* type0, char* valaddr, CORE_ADDR address,
+ struct value* val0)
{
struct type* type = ada_to_fixed_type (type0, valaddr, address, NULL);
if (type == type0 && val0 != NULL)
types, therefore, the type of the result is likely to be inaccurate. */
struct value*
-ada_to_static_fixed_value (val)
- struct value* val;
+ada_to_static_fixed_value (struct value* val)
{
struct type *type =
to_static_fixed_type (static_unwrap_type (VALUE_TYPE (val)));
};
const char*
-ada_attribute_name (n)
- int n;
+ada_attribute_name (int n)
{
if (n > 0 && n < (int) ATR_END)
return attribute_names[n];
/* Evaluate the 'POS attribute applied to ARG. */
static struct value*
-value_pos_atr (arg)
- struct value* arg;
+value_pos_atr (struct value* arg)
{
struct type *type = VALUE_TYPE (arg);
/* Evaluate the TYPE'VAL attribute applied to ARG. */
static struct value*
-value_val_atr (type, arg)
- struct type *type;
- struct value* arg;
+value_val_atr (struct type *type, struct value* arg)
{
if (! discrete_type_p (type))
error ("'VAL only defined on discrete types");
* It is a heuristic test that could stand improvement]. */
int
-ada_is_character_type (type)
- struct type* type;
+ada_is_character_type (struct type* type)
{
const char* name = ada_type_name (type);
return
/* True if TYPE appears to be an Ada string type. */
int
-ada_is_string_type (type)
- struct type *type;
+ada_is_string_type (struct type *type)
{
CHECK_TYPEDEF (type);
if (type != NULL
distinctive name. */
int
-ada_is_aligner_type (type)
- struct type *type;
+ada_is_aligner_type (struct type *type)
{
CHECK_TYPEDEF (type);
return (TYPE_CODE (type) == TYPE_CODE_STRUCT
the parallel type. */
struct type*
-ada_get_base_type (raw_type)
- struct type* raw_type;
+ada_get_base_type (struct type* raw_type)
{
struct type* real_type_namer;
struct type* raw_real_type;
/* The type of value designated by TYPE, with all aligners removed. */
struct type*
-ada_aligned_type (type)
- struct type* type;
+ada_aligned_type (struct type* type)
{
if (ada_is_aligner_type (type))
return ada_aligned_type (TYPE_FIELD_TYPE (type, 0));
having type TYPE. Assumes ada_is_aligner_type (TYPE). */
char*
-ada_aligned_value_addr (type, valaddr)
- struct type *type;
- char *valaddr;
+ada_aligned_value_addr (struct type *type, char *valaddr)
{
if (ada_is_aligner_type (type))
return ada_aligned_value_addr (TYPE_FIELD_TYPE (type, 0),
/* The printed representation of an enumeration literal with encoded
name NAME. The value is good to the next call of ada_enum_name. */
const char*
-ada_enum_name (name)
- const char* name;
+ada_enum_name (const char* name)
{
char* tmp;
}
static struct value*
-evaluate_subexp (expect_type, exp, pos, noside)
- struct type *expect_type;
- struct expression *exp;
- int *pos;
- enum noside noside;
+evaluate_subexp (struct type *expect_type, struct expression *exp, int *pos,
+ enum noside noside)
{
return (*exp->language_defn->evaluate_exp) (expect_type, exp, pos, noside);
}
expression. */
static struct value*
-evaluate_subexp_type (exp, pos)
- struct expression* exp;
- int* pos;
+evaluate_subexp_type (struct expression* exp, int* pos)
{
return (*exp->language_defn->evaluate_exp)
(NULL_TYPE, exp, pos, EVAL_AVOID_SIDE_EFFECTS);
value it wraps. */
static struct value*
-unwrap_value (val)
- struct value* val;
+unwrap_value (struct value* val)
{
struct type* type = check_typedef (VALUE_TYPE (val));
if (ada_is_aligner_type (type))
}
static struct value*
-cast_to_fixed (type, arg)
- struct type *type;
- struct value* arg;
+cast_to_fixed (struct type *type, struct value* arg)
{
LONGEST val;
}
static struct value*
-cast_from_fixed_to_double (arg)
- struct value* arg;
+cast_from_fixed_to_double (struct value* arg)
{
DOUBLEST val = ada_fixed_to_float (VALUE_TYPE (arg),
value_as_long (arg));
/* Coerce VAL as necessary for assignment to an lval of type TYPE, and
* return the converted value. */
static struct value*
-coerce_for_assign (type, val)
- struct type* type;
- struct value* val;
+coerce_for_assign (struct type* type, struct value* val)
{
struct type* type2 = VALUE_TYPE (val);
if (type == type2)
}
struct value*
-ada_evaluate_subexp (expect_type, exp, pos, noside)
- struct type *expect_type;
- struct expression *exp;
- int *pos;
- enum noside noside;
+ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
+ int *pos, enum noside noside)
{
enum exp_opcode op;
enum ada_attribute atr;
Otherwise, return NULL. */
static const char*
-fixed_type_info (type)
- struct type *type;
+fixed_type_info (struct type *type)
{
const char* name = ada_type_name (type);
enum type_code code = (type == NULL) ? TYPE_CODE_UNDEF : TYPE_CODE (type);
/* Returns non-zero iff TYPE represents an Ada fixed-point type. */
int
-ada_is_fixed_point_type (type)
- struct type *type;
+ada_is_fixed_point_type (struct type *type)
{
return fixed_type_info (type) != NULL;
}
delta cannot be determined. */
DOUBLEST
-ada_delta (type)
- struct type *type;
+ada_delta (struct type *type)
{
const char *encoding = fixed_type_info (type);
long num, den;
factor ('SMALL value) associated with the type. */
static DOUBLEST
-scaling_factor (type)
- struct type *type;
+scaling_factor (struct type *type)
{
const char *encoding = fixed_type_info (type);
unsigned long num0, den0, num1, den1;
type TYPE, return its floating-point equivalent. */
DOUBLEST
-ada_fixed_to_float (type, x)
- struct type *type;
- LONGEST x;
+ada_fixed_to_float (struct type *type, LONGEST x)
{
return (DOUBLEST) x * scaling_factor (type);
}
corresponding to the value X. */
LONGEST
-ada_float_to_fixed (type, x)
- struct type *type;
- DOUBLEST x;
+ada_float_to_fixed (struct type *type, DOUBLEST x)
{
return (LONGEST) (x / scaling_factor (type) + 0.5);
}
/* Non-zero iff TYPE represents one of the special VAX floating-point
types. */
int
-ada_is_vax_floating_type (type)
- struct type* type;
+ada_is_vax_floating_type (struct type* type)
{
int name_len =
(ada_type_name (type) == NULL) ? 0 : strlen (ada_type_name (type));
/* The type of special VAX floating-point type this is, assuming
ada_is_vax_floating_point */
int
-ada_vax_float_type_suffix (type)
- struct type* type;
+ada_vax_float_type_suffix (struct type* type)
{
return ada_type_name (type)[strlen (ada_type_name (type))-1];
}
VAX floating-point values of the type represented by TYPE. Assumes
ada_is_vax_floating_type (TYPE). */
struct value*
-ada_vax_float_print_function (type)
-
- struct type* type;
+ada_vax_float_print_function (struct type* type)
{
switch (ada_vax_float_type_suffix (type)) {
case 'F':
not alter *PX and *PNEW_K if unsuccessful. */
static int
-scan_discrim_bound (str, k, dval, px, pnew_k)
- char *str;
- int k;
- struct value* dval;
- LONGEST *px;
- int *pnew_k;
+scan_discrim_bound (char *, int k, struct value* dval, LONGEST *px, int *pnew_k)
{
static char *bound_buffer = NULL;
static size_t bound_buffer_len = 0;
no such variable found, then if ERR_MSG is null, returns 0, and
otherwise causes an error with message ERR_MSG. */
static struct value*
-get_var_value (name, err_msg)
- char* name;
- char* err_msg;
+get_var_value (char* name, char* err_msg)
{
struct symbol** syms;
struct block** blocks;
no such variable found, then if ERR_MSG is null, returns 0, and sets
*FLAG to 0. If successful, sets *FLAG to 1. */
LONGEST
-get_int_var_value (name, err_msg, flag)
- char* name;
- char* err_msg;
- int* flag;
+get_int_var_value (char* name, char* err_msg, int* flag)
{
struct value* var_val = get_var_value (name, err_msg);
the named range type. */
static struct type*
-to_fixed_range_type (name, dval, objfile)
- char *name;
- struct value *dval;
- struct objfile *objfile;
+to_fixed_range_type (char *name, struct value *dval, struct objfile *objfile)
{
struct type *raw_type = ada_find_any_type (name);
struct type *base_type;
/* True iff NAME is the name of a range type. */
int
-ada_is_range_type_name (name)
- const char* name;
+ada_is_range_type_name (const char* name)
{
return (name != NULL && strstr (name, "___XD"));
}
/* True iff TYPE is an Ada modular type. */
int
-ada_is_modular_type (type)
- struct type* type;
+ada_is_modular_type (struct type* type)
{
/* FIXME: base_type should be declared in gdbtypes.h, implemented in
valarith.c */
/* Assuming ada_is_modular_type (TYPE), the modulus of TYPE. */
LONGEST
-ada_modulus (type)
- struct type* type;
+ada_modulus (struct type* type)
{
return TYPE_HIGH_BOUND (type) + 1;
}
debugging information supplied by the compiler. fnf@cygnus.com */
static struct type *
-ada_create_fundamental_type (objfile, typeid)
- struct objfile *objfile;
- int typeid;
+ada_create_fundamental_type (struct objfile *objfile, int typeid)
{
struct type *type = NULL;
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "bfd.h" /* Binary File Description */
#include "symtab.h"
#include "gdbtypes.h"
next call. */
static char*
-demangled_type_name (type)
- struct type *type;
+demangled_type_name (struct type *type)
{
if (ada_type_name (type) == NULL)
return NULL;
NEW is the new name for a type TYPE. */
void
-ada_typedef_print (type, new, stream)
- struct type *type;
- struct symbol *new;
- struct ui_file *stream;
+ada_typedef_print (struct type *type, struct symbol *new, struct ui_file *stream)
{
fprintf_filtered (stream, "type %.*s is ",
ada_name_prefix_len (SYMBOL_SOURCE_NAME(new)),
/* Print range type TYPE on STREAM. */
static void
-print_range (type, stream)
- struct type* type;
- struct ui_file* stream;
+print_range (struct type* type, struct ui_file* stream)
{
struct type* target_type;
target_type = TYPE_TARGET_TYPE (type);
set *N past the bound and its delimiter, if any. */
static void
-print_range_bound (type, bounds, n, stream)
- struct type* type;
- char* bounds;
- int* n;
- struct ui_file* stream;
+print_range_bound (struct type* type, char* bounds, int* n, struct ui_file* stream)
{
LONGEST B;
if (ada_scan_number (bounds, *n, &B, n))
"___U") according to the ___XD conventions. */
static void
-print_dynamic_range_bound (type, name, name_len, suffix, stream)
- struct type* type;
- const char* name;
- int name_len;
- const char* suffix;
- struct ui_file* stream;
+print_dynamic_range_bound (struct type* type, const char* name, int name_len, const char* suffix, struct ui_file* stream)
{
static char *name_buf = NULL;
static size_t name_buf_len = 0;
/* Print the range type named NAME. */
static void
-print_range_type_named (name, stream)
- char* name;
- struct ui_file* stream;
+print_range_type_named (char* name, struct ui_file* stream)
{
struct type *raw_type = ada_find_any_type (name);
struct type *base_type;
/* Print enumerated type TYPE on STREAM. */
static void
-print_enum_type (type, stream)
- struct type *type;
- struct ui_file *stream;
+print_enum_type (struct type *type, struct ui_file *stream)
{
int len = TYPE_NFIELDS (type);
int i, lastval;
/* Print representation of Ada fixed-point type TYPE on STREAM. */
static void
-print_fixed_point_type (type, stream)
- struct type *type;
- struct ui_file *stream;
+print_fixed_point_type (struct type *type, struct ui_file *stream)
{
DOUBLEST delta = ada_delta (type);
DOUBLEST small = ada_fixed_to_float (type, 1.0);
/* Print representation of special VAX floating-point type TYPE on STREAM. */
static void
-print_vax_floating_point_type (type, stream)
- struct type *type;
- struct ui_file *stream;
+print_vax_floating_point_type (struct type *type, struct ui_file *stream)
{
fprintf_filtered (stream, "<float format %c>",
ada_vax_float_type_suffix (type));
structure to show (see ada_print_type). */
static void
-print_array_type (type, stream, show, level)
- struct type *type;
- struct ui_file *stream;
- int show;
- int level;
+print_array_type (struct type *type, struct ui_file *stream, int show, int level)
{
int bitsize;
int n_indices;
STREAM, assuming the VAL_TYPE is the type of the values. */
static void
-print_choices (type, field_num, stream, val_type)
- struct type *type;
- int field_num;
- struct ui_file *stream;
- struct type *val_type;
+print_choices (struct type *type, int field_num, struct ui_file *stream, struct type *val_type)
{
int have_output;
int p;
immediately outside the variant part. */
static void
-print_variant_clauses (type, field_num, outer_type, stream, show, level)
- struct type *type;
- int field_num;
- struct type *outer_type;
- struct ui_file *stream;
- int show;
- int level;
+print_variant_clauses (struct type *type, int field_num,
+ struct type *outer_type, struct ui_file *stream,
+ int show, int level)
{
int i;
struct type *var_type;
level as the fields immediately outside the variant part. */
static void
-print_variant_part (type, field_num, outer_type, stream, show, level)
- struct type *type;
- int field_num;
- struct type *outer_type;
- struct ui_file *stream;
- int show;
- int level;
+print_variant_part (struct type *type, int field_num, struct type *outer_type,
+ struct ui_file *stream, int show, int level)
{
fprintf_filtered (stream, "\n%*scase %s is", level + 4, "",
ada_variant_discrim_name
end. */
static int
-print_record_field_types (type, outer_type, stream, show, level)
- struct type *type;
- struct type *outer_type;
- struct ui_file *stream;
- int show;
- int level;
+print_record_field_types (struct type *type, struct type *outer_type,
+ struct ui_file *stream, int show, int level)
{
int len, i, flds;
the number of levels of internal structure to show (see ada_print_type). */
static void
-print_record_type (type0, stream, show, level)
- struct type* type0;
- struct ui_file* stream;
- int show;
- int level;
+print_record_type (struct type* type0, struct ui_file* stream, int show, int level)
{
struct type* parent_type;
struct type* type;
for function or procedure NAME if NAME is not null. */
static void
-print_func_type (type, stream, name)
- struct type *type;
- struct ui_file *stream;
- char* name;
+print_func_type (struct type *type, struct ui_file *stream, char* name)
{
int i, len = TYPE_NFIELDS (type);
LEVEL indicates level of recursion (for nested definitions). */
void
-ada_print_type (type0, varstring, stream, show, level)
- struct type* type0;
- char* varstring;
- struct ui_file* stream;
- int show;
- int level;
+ada_print_type (struct type* type0, char* varstring, struct ui_file* stream,
+ int show, int level)
{
enum type_code code;
int demangled_args;
otherwise 0. */
static int
-print_optional_low_bound (stream, type)
- struct ui_file *stream;
- struct type *type;
+print_optional_low_bound (struct ui_file *stream, struct type *type)
{
struct type *index_type;
long low_bound;
by ada_coerce_to_simple_array). */
static void
-val_print_packed_array_elements (type, valaddr, bitoffset, stream, format,
- recurse, pretty)
- struct type *type;
- char *valaddr;
- int bitoffset;
- struct ui_file *stream;
- int format;
- int recurse;
- enum val_prettyprint pretty;
+val_print_packed_array_elements (struct type *type, char *valaddr,
+ int bitoffset, struct ui_file *stream,
+ int format, int recurse,
+ enum val_prettyprint pretty)
{
unsigned int i;
unsigned int things_printed = 0;
}
static struct type*
-printable_val_type (type, valaddr)
- struct type* type;
- char* valaddr;
+printable_val_type (struct type* type, char* valaddr)
{
return ada_to_fixed_type (ada_aligned_type (type), valaddr, 0, NULL);
}
(1 or 2) of the character. */
void
-ada_emit_char (c, stream, quoter, type_len)
- int c;
- struct ui_file *stream;
- int quoter;
- int type_len;
+ada_emit_char (int c, struct ui_file *stream, int quoter, int type_len)
{
if (type_len != 2)
type_len = 1;
or 2) of a character. */
static int
-char_at (string, i, type_len)
- char* string;
- int i;
- int type_len;
+char_at (char* string, int i, int type_len)
{
if (type_len == 1)
return string[i];
}
void
-ada_printchar (c, stream)
- int c;
- struct ui_file *stream;
+ada_printchar (int c, struct ui_file *stream)
{
fputs_filtered ("'", stream);
ada_emit_char (c, stream, '\'', 1);
form appropriate for TYPE. */
void
-ada_print_scalar (type, val, stream)
- struct type *type;
- LONGEST val;
- struct ui_file *stream;
+ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
{
unsigned int i;
unsigned len;
*/
static void
-printstr (stream, string, length, force_ellipses, type_len)
- struct ui_file *stream;
- char *string;
- unsigned int length;
- int force_ellipses;
- int type_len;
+printstr (struct ui_file *stream, char *string, unsigned int length,
+ int force_ellipses, int type_len)
{
unsigned int i;
unsigned int things_printed = 0;
}
void
-ada_printstr (stream, string, length, force_ellipses, width)
- struct ui_file *stream;
- char *string;
- unsigned int length;
- int force_ellipses;
- int width;
+ada_printstr (struct ui_file *stream, char *string, unsigned int length,
+ int force_ellipses, int width)
{
printstr (stream, string, length, force_ellipses, width);
}
arrays.) */
int
-ada_val_print (type, valaddr0, embedded_offset, address, stream,
- format, deref_ref, recurse, pretty)
- struct type* type;
- char* valaddr0;
- int embedded_offset;
- CORE_ADDR address;
- struct ui_file *stream;
- int format;
- int deref_ref;
- int recurse;
- enum val_prettyprint pretty;
+ada_val_print (struct type* type, char* valaddr0, int embedded_offset,
+ CORE_ADDR address, struct ui_file *stream, int format,
+ int deref_ref, int recurse, enum val_prettyprint pretty)
{
struct ada_val_print_args args;
args.type = type; args.valaddr0 = valaddr0;
* does not catch evaluation errors (leaving that to ada_val_print). */
static int
-ada_val_print_1 (type, valaddr0, embedded_offset, address, stream,
- format, deref_ref, recurse, pretty)
- struct type* type;
- char* valaddr0;
- int embedded_offset;
- CORE_ADDR address;
- struct ui_file *stream;
- int format;
- int deref_ref;
- int recurse;
- enum val_prettyprint pretty;
+ada_val_print_1 (struct type* type, char* valaddr0, int embedded_offset,
+ CORE_ADDR address, struct ui_file *stream, int format,
+ int deref_ref, int recurse, enum val_prettyprint pretty)
{
unsigned int len;
int i;
}
static int
-print_variant_part (type, field_num, valaddr,
- stream, format, recurse, pretty, comma_needed,
- outer_type, outer_valaddr)
- struct type *type;
- int field_num;
- char *valaddr;
- struct ui_file *stream;
- int format;
- int recurse;
- enum val_prettyprint pretty;
- int comma_needed;
- struct type *outer_type;
- char *outer_valaddr;
+print_variant_part (struct type *type, int field_num, char *valaddr,
+ struct ui_file *stream, int format, int recurse,
+ enum val_prettyprint pretty, int comma_needed,
+ struct type *outer_type, char *outer_valaddr)
{
struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
int which =
}
int
-ada_value_print (val0, stream, format, pretty)
- struct value* val0;
- struct ui_file *stream;
- int format;
- enum val_prettyprint pretty;
+ada_value_print (struct value* val0, struct ui_file *stream, int format,
+ enum val_prettyprint pretty)
{
char* valaddr = VALUE_CONTENTS (val0);
CORE_ADDR address = VALUE_ADDRESS (val0) + VALUE_OFFSET (val0);
}
static void
-print_record (type, valaddr, stream, format, recurse, pretty)
- struct type *type;
- char *valaddr;
- struct ui_file *stream;
- int format;
- int recurse;
- enum val_prettyprint pretty;
+print_record (struct type *type, char *valaddr, struct ui_file *stream,
+ int format, int recurse, enum val_prettyprint pretty)
{
CHECK_TYPEDEF (type);
Returns 1 if COMMA_NEEDED or any fields were printed. */
static int
-print_field_values (type, valaddr, stream, format, recurse, pretty,
- comma_needed, outer_type, outer_valaddr)
- struct type *type;
- char *valaddr;
- struct ui_file *stream;
- int format;
- int recurse;
- enum val_prettyprint pretty;
- int comma_needed;
- struct type *outer_type;
- char *outer_valaddr;
+print_field_values (struct type *type, char *valaddr, struct ui_file *stream,
+ int format, int recurse, enum val_prettyprint pretty,
+ int comma_needed, struct type *outer_type,
+ char *outer_valaddr)
{
int i, len;
#include "inferior.h"
#include "regcache.h"
#include "gdbcmd.h"
-
-#if 0
-#include "coff/internal.h" /* for libcoff.h */
-#include "bfd/libcoff.h" /* for xcoff_data */
-#endif
+#include "language.h" /* for local_hex_string() */
+#include "ppc-tdep.h"
#include <procinfo.h>
#include <sys/types.h>
#include <sys/ptrace.h>
#include <sys/reg.h>
-#if 0
-#include <pthread.h>
-#endif
#include <sched.h>
#include <sys/pthdebug.h>
/* This module's target-specific operations, active while pd_able is true. */
-static struct target_ops ops;
+static struct target_ops aix_thread_ops;
/* Copy of the target over which ops is pushed.
This is more convenient than a pointer to child_ops or core_ops,
because they lack current_target's default callbacks. */
-static struct target_ops base_ops;
+static struct target_ops base_target;
/* Address of the function that libpthread will call when libpthdebug
is ready to be initialized. */
{
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "ptrace (%d, %d) = %d (errno = %d)",
+ "ptrace (%d, %d) = %d (errno = %d)\n",
req, id, ret, errno);
return ret == -1 ? 0 : 1;
}
{
errno = 0;
return ptrace_check (req, id,
- ptrace (req, id, (int *)addr, data, buf));
+ ptrace (req, id, (int *) addr, data, buf));
}
/* If *PIDP is a composite process/thread id, convert it to a
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_symbol_addrs (user = %ld, symbols = 0x%lx, count = %d)",
+ "pdc_symbol_addrs (user = %ld, symbols = 0x%lx, count = %d)\n",
user, (long) symbols, count);
for (i = 0; i < count; i++)
name = symbols[i].name;
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- " symbols[%d].name = \"%s\"", i, name);
+ " symbols[%d].name = \"%s\"\n", i, name);
if (!*name)
symbols[i].addr = 0;
if (!(ms = lookup_minimal_symbol (name, NULL, NULL)))
{
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, " returning PDC_FAILURE");
+ fprintf_unfiltered (gdb_stdlog, " returning PDC_FAILURE\n");
return PDC_FAILURE;
}
symbols[i].addr = SYMBOL_VALUE_ADDRESS (ms);
}
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, " symbols[%d].addr = 0x%llx",
- i, symbols[i].addr);
+ fprintf_unfiltered (gdb_stdlog, " symbols[%d].addr = %s\n",
+ i, local_hex_string (symbols[i].addr));
}
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, " returning PDC_SUCCESS");
+ fprintf_unfiltered (gdb_stdlog, " returning PDC_SUCCESS\n");
return PDC_SUCCESS;
}
struct ptsprs sprs32;
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, "pdc_read_regs tid=%d flags=%llx\n",
- (int)tid, flags);
+ fprintf_unfiltered (gdb_stdlog, "pdc_read_regs tid=%d flags=%s\n",
+ (int) tid, local_hex_string (flags));
/* General-purpose registers. */
if (flags & PTHDB_FLAG_GPRS)
however this code is untested. */
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, "pdc_write_regs tid=%d flags=%llx\n",
- (int)tid, flags);
+ fprintf_unfiltered (gdb_stdlog, "pdc_write_regs tid=%d flags=%s\n",
+ (int) tid, local_hex_string (flags));
/* General-purpose registers. */
if (flags & PTHDB_FLAG_GPRS)
{
if (arch64)
ptrace64aix (PTT_WRITE_GPRS, tid,
- (unsigned long)context->gpr, 0, NULL);
+ (unsigned long) context->gpr, 0, NULL);
else
- ptrace32 (PTT_WRITE_GPRS, tid, (int *)context->gpr, 0, NULL);
+ ptrace32 (PTT_WRITE_GPRS, tid, (int *) context->gpr, 0, NULL);
}
/* Floating-point registers. */
if (flags & PTHDB_FLAG_FPRS)
{
- ptrace32 (PTT_WRITE_FPRS, tid, (int *)context->fpr, 0, NULL);
+ ptrace32 (PTT_WRITE_FPRS, tid, (int *) context->fpr, 0, NULL);
}
/* Special-purpose registers. */
}
else
{
- ptrace32 (PTT_WRITE_SPRS, tid, (int *)&context->msr, 0, NULL);
+ ptrace32 (PTT_WRITE_SPRS, tid, (int *) &context->msr, 0, NULL);
}
}
return 0;
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_read_data (user = %ld, buf = 0x%lx, addr = 0x%llx, len = %ld)",
- user, (long) buf, addr, len);
+ "pdc_read_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
+ user, (long) buf, local_hex_string (addr), len);
status = target_read_memory (addr, buf, len);
ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE;
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, " status=%d, returning %s",
+ fprintf_unfiltered (gdb_stdlog, " status=%d, returning %s\n",
status, pd_status2str (ret));
return ret;
}
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_write_data (user = %ld, buf = 0x%lx, addr = 0x%llx, len = %ld)",
- user, (long) buf, addr, len);
+ "pdc_write_data (user = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
+ user, (long) buf, local_hex_string (addr), len);
status = target_write_memory (addr, buf, len);
ret = status == 0 ? PDC_SUCCESS : PDC_FAILURE;
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, " status=%d, returning %s", status,
+ fprintf_unfiltered (gdb_stdlog, " status=%d, returning %s\n", status,
pd_status2str (ret));
return ret;
}
{
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_alloc (user = %ld, len = %ld, bufp = 0x%lx)",
+ "pdc_alloc (user = %ld, len = %ld, bufp = 0x%lx)\n",
user, len, (long) bufp);
*bufp = xmalloc (len);
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- " malloc returned 0x%lx", (long) *bufp);
+ " malloc returned 0x%lx\n", (long) *bufp);
/* Note: xmalloc() can't return 0; therefore PDC_FAILURE will never
be returned. */
{
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_realloc (user = %ld, buf = 0x%lx, len = %ld, bufp = 0x%lx)",
+ "pdc_realloc (user = %ld, buf = 0x%lx, len = %ld, bufp = 0x%lx)\n",
user, (long) buf, len, (long) bufp);
*bufp = xrealloc (buf, len);
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- " realloc returned 0x%lx", (long) *bufp);
+ " realloc returned 0x%lx\n", (long) *bufp);
return *bufp ? PDC_SUCCESS : PDC_FAILURE;
}
{
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "pdc_free (user = %ld, buf = 0x%lx)", user,
+ "pdc_free (user = %ld, buf = 0x%lx)\n", user,
(long) buf);
xfree (buf);
return PDC_SUCCESS;
return;
/* Prepare for thread debugging. */
- base_ops = current_target;
- push_target (&ops);
+ base_target = current_target;
+ push_target (&aix_thread_ops);
pd_able = 1;
/* If we're debugging a core file or an attached inferior, the
if (pd_active)
pd_deactivate ();
pd_able = 0;
- unpush_target (&ops);
+ unpush_target (&aix_thread_ops);
}
/* target_new_objfile_hook callback.
/* Attach to process specified by ARGS. */
static void
-ops_attach (char *args, int from_tty)
+aix_thread_attach (char *args, int from_tty)
{
- base_ops.to_attach (args, from_tty);
+ base_target.to_attach (args, from_tty);
pd_activate (1);
}
-/* Detach from the process attached to by ops_attach(). */
+/* Detach from the process attached to by aix_thread_attach(). */
static void
-ops_detach (char *args, int from_tty)
+aix_thread_detach (char *args, int from_tty)
{
pd_deactivate ();
- base_ops.to_detach (args, from_tty);
+ base_target.to_detach (args, from_tty);
}
/* Tell the inferior process to continue running thread PID if != -1
and all threads otherwise. */
static void
-ops_resume (ptid_t ptid, int step, enum target_signal sig)
+aix_thread_resume (ptid_t ptid, int step, enum target_signal sig)
{
struct thread_info *thread;
pthdb_tid_t tid[2];
{
struct cleanup *cleanup = save_inferior_ptid ();
inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid));
- base_ops.to_resume (ptid, step, sig);
+ base_target.to_resume (ptid, step, sig);
do_cleanups (cleanup);
}
else
if (arch64)
ptrace64aix (PTT_CONTINUE, tid[0], 1,
- target_signal_to_host (sig), (int *)tid);
+ target_signal_to_host (sig), (int *) tid);
else
ptrace32 (PTT_CONTINUE, tid[0], (int *) 1,
- target_signal_to_host (sig), (int *)tid);
+ target_signal_to_host (sig), (int *) tid);
}
}
thread. */
static ptid_t
-ops_wait (ptid_t ptid, struct target_waitstatus *status)
+aix_thread_wait (ptid_t ptid, struct target_waitstatus *status)
{
struct cleanup *cleanup = save_inferior_ptid ();
pid_to_prc (&ptid);
inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid));
- ptid = base_ops.to_wait (ptid, status);
+ ptid = base_target.to_wait (ptid, status);
do_cleanups (cleanup);
if (PIDGET (ptid) == -1)
supply_register (regno + FP0_REGNUM, (char *) (vals + regno));
}
+/* Predicate to test whether given register number is a "special" register. */
+static int
+special_register_p (int regno)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ return regno == PC_REGNUM
+ || regno == tdep->ppc_ps_regnum
+ || regno == tdep->ppc_cr_regnum
+ || regno == tdep->ppc_lr_regnum
+ || regno == tdep->ppc_ctr_regnum
+ || regno == tdep->ppc_xer_regnum
+ || regno == tdep->ppc_fpscr_regnum
+ || (tdep->ppc_mq_regnum >= 0 && regno == tdep->ppc_mq_regnum);
+}
+
+
/* Record that the special registers contain the specified 64-bit and
32-bit values. */
static void
supply_sprs64 (uint64_t iar, uint64_t msr, uint32_t cr,
- uint64_t lr, uint64_t ctr, uint32_t xer)
+ uint64_t lr, uint64_t ctr, uint32_t xer,
+ uint32_t fpscr)
{
- int regno = FIRST_UISA_SP_REGNUM;
-
- supply_register (regno, (char *) &iar);
- supply_register (regno + 1, (char *) &msr);
- supply_register (regno + 2, (char *) &cr);
- supply_register (regno + 3, (char *) &lr);
- supply_register (regno + 4, (char *) &ctr);
- supply_register (regno + 5, (char *) &xer);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ supply_register (PC_REGNUM, (char *) &iar);
+ supply_register (tdep->ppc_ps_regnum, (char *) &msr);
+ supply_register (tdep->ppc_cr_regnum, (char *) &cr);
+ supply_register (tdep->ppc_lr_regnum, (char *) &lr);
+ supply_register (tdep->ppc_ctr_regnum, (char *) &ctr);
+ supply_register (tdep->ppc_xer_regnum, (char *) &xer);
+ supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
}
/* Record that the special registers contain the specified 32-bit
static void
supply_sprs32 (uint32_t iar, uint32_t msr, uint32_t cr,
- uint32_t lr, uint32_t ctr, uint32_t xer)
+ uint32_t lr, uint32_t ctr, uint32_t xer,
+ uint32_t fpscr)
{
- int regno = FIRST_UISA_SP_REGNUM;
-
- supply_register (regno, (char *) &iar);
- supply_register (regno + 1, (char *) &msr);
- supply_register (regno + 2, (char *) &cr);
- supply_register (regno + 3, (char *) &lr);
- supply_register (regno + 4, (char *) &ctr);
- supply_register (regno + 5, (char *) &xer);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ supply_register (PC_REGNUM, (char *) &iar);
+ supply_register (tdep->ppc_ps_regnum, (char *) &msr);
+ supply_register (tdep->ppc_cr_regnum, (char *) &cr);
+ supply_register (tdep->ppc_lr_regnum, (char *) &lr);
+ supply_register (tdep->ppc_ctr_regnum, (char *) &ctr);
+ supply_register (tdep->ppc_xer_regnum, (char *) &xer);
+ supply_register (tdep->ppc_fpscr_regnum, (char *) &fpscr);
}
/* Fetch all registers from pthread PDTID, which doesn't have a kernel
function. */
static void
-fetch_regs_lib (pthdb_pthread_t pdtid)
+fetch_regs_user_thread (pthdb_pthread_t pdtid)
{
int status, i;
pthdb_context_t ctx;
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, "fetch_regs_lib %lx\n", (long)pdtid);
+ fprintf_unfiltered (gdb_stdlog,
+ "fetch_regs_user_thread %lx\n", (long) pdtid);
status = pthdb_pthread_context (pd_session, pdtid, &ctx);
if (status != PTHDB_SUCCESS)
error ("aix-thread: fetch_registers: pthdb_pthread_context returned %s",
/* Special registers. */
if (arch64)
- supply_sprs64 (ctx.iar, ctx.msr, ctx.cr, ctx.lr, ctx.ctr, ctx.xer);
+ supply_sprs64 (ctx.iar, ctx.msr, ctx.cr, ctx.lr, ctx.ctr, ctx.xer,
+ ctx.fpscr);
else
- supply_sprs32 (ctx.iar, ctx.msr, ctx.cr, ctx.lr, ctx.ctr, ctx.xer);
+ supply_sprs32 (ctx.iar, ctx.msr, ctx.cr, ctx.lr, ctx.ctr, ctx.xer,
+ ctx.fpscr);
}
/* Fetch register REGNO if != -1 or all registers otherwise from
be retrieved. */
static void
-fetch_regs_kern (int regno, pthdb_tid_t tid)
+fetch_regs_kernel_thread (int regno, pthdb_tid_t tid)
{
uint64_t gprs64[32];
uint32_t gprs32[32];
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "fetch_regs_kern tid=%lx regno=%d arch64=%d\n",
- (long)tid, regno, arch64);
+ "fetch_regs_kernel_thread tid=%lx regno=%d arch64=%d\n",
+ (long) tid, regno, arch64);
/* General-purpose registers. */
if (regno == -1 || regno < FP0_REGNUM)
/* Special-purpose registers. */
- if (regno == -1 ||
- (regno > FPLAST_REGNUM && regno <= LAST_UISA_SP_REGNUM))
+ if (regno == -1 || special_register_p (regno))
{
if (arch64)
{
(unsigned long) &sprs64, 0, NULL))
memset (&sprs64, 0, sizeof (sprs64));
supply_sprs64 (sprs64.pt_iar, sprs64.pt_msr, sprs64.pt_cr,
- sprs64.pt_lr, sprs64.pt_ctr, sprs64.pt_xer);
+ sprs64.pt_lr, sprs64.pt_ctr, sprs64.pt_xer,
+ sprs64.pt_fpscr);
}
else
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
if (!ptrace32 (PTT_READ_SPRS, tid, (int *) &sprs32, 0, NULL))
memset (&sprs32, 0, sizeof (sprs32));
supply_sprs32 (sprs32.pt_iar, sprs32.pt_msr, sprs32.pt_cr,
- sprs32.pt_lr, sprs32.pt_ctr, sprs32.pt_xer);
+ sprs32.pt_lr, sprs32.pt_ctr, sprs32.pt_xer,
+ sprs32.pt_fpscr);
- if (REGISTER_RAW_SIZE (LAST_UISA_SP_REGNUM))
- supply_register (LAST_UISA_SP_REGNUM, (char *) &sprs32.pt_mq);
+ if (tdep->ppc_mq_regnum >= 0)
+ supply_register (tdep->ppc_mq_regnum, (char *) &sprs32.pt_mq);
}
}
}
thread/process specified by inferior_ptid. */
static void
-ops_fetch_registers (int regno)
+aix_thread_fetch_registers (int regno)
{
struct thread_info *thread;
pthdb_tid_t tid;
if (!PD_TID (inferior_ptid))
- base_ops.to_fetch_registers (regno);
+ base_target.to_fetch_registers (regno);
else
{
thread = find_thread_pid (inferior_ptid);
tid = thread->private->tid;
if (tid == PTHDB_INVALID_TID)
- fetch_regs_lib (thread->private->pdtid);
+ fetch_regs_user_thread (thread->private->pdtid);
else
- fetch_regs_kern (regno, tid);
+ fetch_regs_kernel_thread (regno, tid);
}
}
int regno;
for (regno = 0; regno < FP0_REGNUM; regno++)
- regcache_collect (regno, vals + regno);
+ if (register_cached (regno))
+ regcache_collect (regno, vals + regno);
}
static void
int regno;
for (regno = 0; regno < FP0_REGNUM; regno++)
- regcache_collect (regno, vals + regno);
+ if (register_cached (regno))
+ regcache_collect (regno, vals + regno);
}
/* Store the floating point registers into a double array. */
int regno;
for (regno = FP0_REGNUM; regno < FPLAST_REGNUM; regno++)
- regcache_collect (regno, vals + regno);
+ if (register_cached (regno))
+ regcache_collect (regno, vals + regno);
}
/* Store the special registers into the specified 64-bit and 32-bit
static void
fill_sprs64 (uint64_t *iar, uint64_t *msr, uint32_t *cr,
- uint64_t *lr, uint64_t *ctr, uint32_t *xer)
+ uint64_t *lr, uint64_t *ctr, uint32_t *xer,
+ uint32_t *fpscr)
{
- int regno = FIRST_UISA_SP_REGNUM;
-
- gdb_assert (sizeof (*iar) == REGISTER_RAW_SIZE (regno));
-
- regcache_collect (regno, iar);
- regcache_collect (regno + 1, msr);
- regcache_collect (regno + 2, cr);
- regcache_collect (regno + 3, lr);
- regcache_collect (regno + 4, ctr);
- regcache_collect (regno + 5, xer);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ /* Verify that the size of the size of the IAR buffer is the
+ same as the raw size of the PC (in the register cache). If
+ they're not, then either GDB has been built incorrectly, or
+ there's some other kind of internal error. To be really safe,
+ we should check all of the sizes. */
+ gdb_assert (sizeof (*iar) == REGISTER_RAW_SIZE (PC_REGNUM));
+
+ if (register_cached (PC_REGNUM))
+ regcache_collect (PC_REGNUM, iar);
+ if (register_cached (tdep->ppc_ps_regnum))
+ regcache_collect (tdep->ppc_ps_regnum, msr);
+ if (register_cached (tdep->ppc_cr_regnum))
+ regcache_collect (tdep->ppc_cr_regnum, cr);
+ if (register_cached (tdep->ppc_lr_regnum))
+ regcache_collect (tdep->ppc_lr_regnum, lr);
+ if (register_cached (tdep->ppc_ctr_regnum))
+ regcache_collect (tdep->ppc_ctr_regnum, ctr);
+ if (register_cached (tdep->ppc_xer_regnum))
+ regcache_collect (tdep->ppc_xer_regnum, xer);
+ if (register_cached (tdep->ppc_fpscr_regnum))
+ regcache_collect (tdep->ppc_fpscr_regnum, fpscr);
}
static void
fill_sprs32 (unsigned long *iar, unsigned long *msr, unsigned long *cr,
- unsigned long *lr, unsigned long *ctr, unsigned long *xer)
+ unsigned long *lr, unsigned long *ctr, unsigned long *xer,
+ unsigned long *fpscr)
{
- int regno = FIRST_UISA_SP_REGNUM;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- /* If this assert() fails, the most likely reason is that GDB was
+ /* Verify that the size of the size of the IAR buffer is the
+ same as the raw size of the PC (in the register cache). If
+ they're not, then either GDB has been built incorrectly, or
+ there's some other kind of internal error. To be really safe,
+ we should check all of the sizes.
+
+ If this assert() fails, the most likely reason is that GDB was
built incorrectly. In order to make use of many of the header
files in /usr/include/sys, GDB needs to be configured so that
sizeof (long) == 4). */
- gdb_assert (sizeof (*iar) == REGISTER_RAW_SIZE (regno));
-
- regcache_collect (regno, iar);
- regcache_collect (regno + 1, msr);
- regcache_collect (regno + 2, cr);
- regcache_collect (regno + 3, lr);
- regcache_collect (regno + 4, ctr);
- regcache_collect (regno + 5, xer);
+ gdb_assert (sizeof (*iar) == REGISTER_RAW_SIZE (PC_REGNUM));
+
+ if (register_cached (PC_REGNUM))
+ regcache_collect (PC_REGNUM, iar);
+ if (register_cached (tdep->ppc_ps_regnum))
+ regcache_collect (tdep->ppc_ps_regnum, msr);
+ if (register_cached (tdep->ppc_cr_regnum))
+ regcache_collect (tdep->ppc_cr_regnum, cr);
+ if (register_cached (tdep->ppc_lr_regnum))
+ regcache_collect (tdep->ppc_lr_regnum, lr);
+ if (register_cached (tdep->ppc_ctr_regnum))
+ regcache_collect (tdep->ppc_ctr_regnum, ctr);
+ if (register_cached (tdep->ppc_xer_regnum))
+ regcache_collect (tdep->ppc_xer_regnum, xer);
+ if (register_cached (tdep->ppc_fpscr_regnum))
+ regcache_collect (tdep->ppc_fpscr_regnum, fpscr);
}
/* Store all registers into pthread PDTID, which doesn't have a kernel
but I doubt it's worth the effort. */
static void
-store_regs_lib (pthdb_pthread_t pdtid)
+store_regs_user_thread (pthdb_pthread_t pdtid)
{
int status, i;
pthdb_context_t ctx;
if (debug_aix_thread)
fprintf_unfiltered (gdb_stdlog,
- "store_regs_lib %lx\n", (long)pdtid);
+ "store_regs_user_thread %lx\n", (long) pdtid);
/* Retrieve the thread's current context for its non-register
values. */
/* Collect general-purpose register values from the regcache. */
for (i = 0; i < 32; i++)
- {
- if (arch64)
- {
- regcache_collect (i, (void *) &int64);
- ctx.gpr[i] = int64;
- }
- else
- {
- regcache_collect (i, (void *) &int32);
- ctx.gpr[i] = int32;
- }
- }
+ if (register_cached (i))
+ {
+ if (arch64)
+ {
+ regcache_collect (i, (void *) &int64);
+ ctx.gpr[i] = int64;
+ }
+ else
+ {
+ regcache_collect (i, (void *) &int32);
+ ctx.gpr[i] = int32;
+ }
+ }
/* Collect floating-point register values from the regcache. */
fill_fprs (ctx.fpr);
/* Special registers (always kept in ctx as 64 bits). */
if (arch64)
{
- fill_sprs64 (&ctx.iar, &ctx.msr, &ctx.cr, &ctx.lr, &ctx.ctr, &ctx.xer);
+ fill_sprs64 (&ctx.iar, &ctx.msr, &ctx.cr, &ctx.lr, &ctx.ctr, &ctx.xer,
+ &ctx.fpscr);
}
else
{
Solution: use 32-bit temp variables. (The assert() in fill_sprs32()
will fail if the size of an unsigned long is incorrect. If this
happens, GDB needs to be reconfigured so that longs are 32-bits.) */
- unsigned long tmp_iar, tmp_msr, tmp_cr, tmp_lr, tmp_ctr, tmp_xer;
-
- fill_sprs32 (&tmp_iar, &tmp_msr, &tmp_cr, &tmp_lr, &tmp_ctr, &tmp_xer);
- ctx.iar = tmp_iar;
- ctx.msr = tmp_msr;
- ctx.cr = tmp_cr;
- ctx.lr = tmp_lr;
- ctx.ctr = tmp_ctr;
- ctx.xer = tmp_xer;
+ unsigned long tmp_iar, tmp_msr, tmp_cr, tmp_lr, tmp_ctr, tmp_xer,
+ tmp_fpscr;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ fill_sprs32 (&tmp_iar, &tmp_msr, &tmp_cr, &tmp_lr, &tmp_ctr, &tmp_xer,
+ &tmp_fpscr);
+ if (register_cached (PC_REGNUM))
+ ctx.iar = tmp_iar;
+ if (register_cached (tdep->ppc_ps_regnum))
+ ctx.msr = tmp_msr;
+ if (register_cached (tdep->ppc_cr_regnum))
+ ctx.cr = tmp_cr;
+ if (register_cached (tdep->ppc_lr_regnum))
+ ctx.lr = tmp_lr;
+ if (register_cached (tdep->ppc_ctr_regnum))
+ ctx.ctr = tmp_ctr;
+ if (register_cached (tdep->ppc_xer_regnum))
+ ctx.xer = tmp_xer;
+ if (register_cached (tdep->ppc_xer_regnum))
+ ctx.fpscr = tmp_fpscr;
}
status = pthdb_pthread_setcontext (pd_session, pdtid, &ctx);
group. */
static void
-store_regs_kern (int regno, pthdb_tid_t tid)
+store_regs_kernel_thread (int regno, pthdb_tid_t tid)
{
uint64_t gprs64[32];
uint32_t gprs32[32];
struct ptxsprs sprs64;
struct ptsprs sprs32;
int i;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (debug_aix_thread)
- fprintf_unfiltered (gdb_stdlog, "store_regs_kern tid=%lx regno=%d\n",
- (long)tid, regno);
+ fprintf_unfiltered (gdb_stdlog,
+ "store_regs_kernel_thread tid=%lx regno=%d\n",
+ (long) tid, regno);
/* General-purpose registers. */
if (regno == -1 || regno < FP0_REGNUM)
{
if (arch64)
{
+ /* Pre-fetch: some regs may not be in the cache. */
+ ptrace64aix (PTT_READ_GPRS, tid, (unsigned long) gprs64, 0, NULL);
fill_gprs64 (gprs64);
ptrace64aix (PTT_WRITE_GPRS, tid, (unsigned long) gprs64, 0, NULL);
}
else
{
+ /* Pre-fetch: some regs may not be in the cache. */
+ ptrace32 (PTT_READ_GPRS, tid, gprs32, 0, NULL);
fill_gprs32 (gprs32);
ptrace32 (PTT_WRITE_GPRS, tid, gprs32, 0, NULL);
}
if (regno == -1 || (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM))
{
+ /* Pre-fetch: some regs may not be in the cache. */
+ ptrace32 (PTT_READ_FPRS, tid, (int *) fprs, 0, NULL);
fill_fprs (fprs);
ptrace32 (PTT_WRITE_FPRS, tid, (int *) fprs, 0, NULL);
}
/* Special-purpose registers. */
- if (regno == -1 ||
- (regno > FPLAST_REGNUM && regno <= LAST_UISA_SP_REGNUM))
+ if (regno == -1 || special_register_p (regno))
{
if (arch64)
{
- /* Must read first, not all of it's in the cache. */
+ /* Pre-fetch: some registers won't be in the cache. */
ptrace64aix (PTT_READ_SPRS, tid,
(unsigned long) &sprs64, 0, NULL);
fill_sprs64 (&sprs64.pt_iar, &sprs64.pt_msr, &sprs64.pt_cr,
- &sprs64.pt_lr, &sprs64.pt_ctr, &sprs64.pt_xer);
+ &sprs64.pt_lr, &sprs64.pt_ctr, &sprs64.pt_xer,
+ &sprs64.pt_fpscr);
ptrace64aix (PTT_WRITE_SPRS, tid,
(unsigned long) &sprs64, 0, NULL);
}
else
{
- /* Must read first, not all of it's in the cache. */
+ /* Pre-fetch: some registers won't be in the cache. */
ptrace32 (PTT_READ_SPRS, tid, (int *) &sprs32, 0, NULL);
fill_sprs32 (&sprs32.pt_iar, &sprs32.pt_msr, &sprs32.pt_cr,
- &sprs32.pt_lr, &sprs32.pt_ctr, &sprs32.pt_xer);
+ &sprs32.pt_lr, &sprs32.pt_ctr, &sprs32.pt_xer,
+ &sprs32.pt_fpscr);
- if (REGISTER_RAW_SIZE (LAST_UISA_SP_REGNUM))
- regcache_collect (LAST_UISA_SP_REGNUM, &sprs32.pt_mq);
+ if (tdep->ppc_mq_regnum >= 0)
+ if (register_cached (tdep->ppc_mq_regnum))
+ regcache_collect (tdep->ppc_mq_regnum, &sprs32.pt_mq);
ptrace32 (PTT_WRITE_SPRS, tid, (int *) &sprs32, 0, NULL);
}
thread/process specified by inferior_ptid. */
static void
-ops_store_registers (int regno)
+aix_thread_store_registers (int regno)
{
struct thread_info *thread;
pthdb_tid_t tid;
if (!PD_TID (inferior_ptid))
- base_ops.to_store_registers (regno);
+ base_target.to_store_registers (regno);
else
{
thread = find_thread_pid (inferior_ptid);
tid = thread->private->tid;
if (tid == PTHDB_INVALID_TID)
- store_regs_lib (thread->private->pdtid);
+ store_regs_user_thread (thread->private->pdtid);
else
- store_regs_kern (regno, tid);
+ store_regs_kernel_thread (regno, tid);
}
}
-/* Prepare to copy the register cache to the child:
- The register cache must be fully fetched and up to date. */
-
-static void
-ops_prepare_to_store (void)
-{
- int regno;
-
- if (!PD_TID (inferior_ptid))
- base_ops.to_prepare_to_store ();
- else
- for (regno = 0; regno < NUM_REGS; regno++)
- if (!register_cached (regno))
- target_fetch_registers (regno);
-}
-
/* Transfer LEN bytes of memory from GDB address MYADDR to target
address MEMADDR if WRITE and vice versa otherwise. */
static int
-ops_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib,
- struct target_ops *target)
+aix_thread_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+ struct mem_attrib *attrib,
+ struct target_ops *target)
{
int n;
struct cleanup *cleanup = save_inferior_ptid ();
inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid));
- n = base_ops.to_xfer_memory (memaddr, myaddr, len,
- write, attrib, &base_ops);
+ n = base_target.to_xfer_memory (memaddr, myaddr, len,
+ write, attrib, &base_target);
do_cleanups (cleanup);
return n;
/* Kill and forget about the inferior process. */
static void
-ops_kill (void)
+aix_thread_kill (void)
{
struct cleanup *cleanup = save_inferior_ptid ();
inferior_ptid = pid_to_ptid (PIDGET (inferior_ptid));
- base_ops.to_kill ();
+ base_target.to_kill ();
do_cleanups (cleanup);
}
/* Clean up after the inferior exits. */
static void
-ops_mourn_inferior (void)
+aix_thread_mourn_inferior (void)
{
pd_deactivate ();
- base_ops.to_mourn_inferior ();
+ base_target.to_mourn_inferior ();
}
/* Return whether thread PID is still valid. */
static int
-ops_thread_alive (ptid_t ptid)
+aix_thread_thread_alive (ptid_t ptid)
{
if (!PD_TID (ptid))
- return base_ops.to_thread_alive (ptid);
+ return base_target.to_thread_alive (ptid);
/* We update the thread list every time the child stops, so all
valid threads should be in the thread list. */
"info threads" output. */
static char *
-ops_pid_to_str (ptid_t ptid)
+aix_thread_pid_to_str (ptid_t ptid)
{
static char *ret = NULL;
if (!PD_TID (ptid))
- return base_ops.to_pid_to_str (ptid);
+ return base_target.to_pid_to_str (ptid);
/* Free previous return value; a new one will be allocated by
xasprintf(). */
THREAD, for use in "info threads" output. */
static char *
-ops_extra_thread_info (struct thread_info *thread)
+aix_thread_extra_thread_info (struct thread_info *thread)
{
struct ui_file *buf;
int status;
return ret;
}
-/* Initialize target ops. */
+/* Initialize target aix_thread_ops. */
static void
-init_ops (void)
+init_aix_thread_ops (void)
{
- ops.to_shortname = "aix-threads";
- ops.to_longname = "AIX pthread support";
- ops.to_doc = "AIX pthread support";
-
- ops.to_attach = ops_attach;
- ops.to_detach = ops_detach;
- ops.to_resume = ops_resume;
- ops.to_wait = ops_wait;
- ops.to_fetch_registers = ops_fetch_registers;
- ops.to_store_registers = ops_store_registers;
- ops.to_prepare_to_store = ops_prepare_to_store;
- ops.to_xfer_memory = ops_xfer_memory;
- /* No need for ops.to_create_inferior, because we activate thread
+ aix_thread_ops.to_shortname = "aix-threads";
+ aix_thread_ops.to_longname = "AIX pthread support";
+ aix_thread_ops.to_doc = "AIX pthread support";
+
+ aix_thread_ops.to_attach = aix_thread_attach;
+ aix_thread_ops.to_detach = aix_thread_detach;
+ aix_thread_ops.to_resume = aix_thread_resume;
+ aix_thread_ops.to_wait = aix_thread_wait;
+ aix_thread_ops.to_fetch_registers = aix_thread_fetch_registers;
+ aix_thread_ops.to_store_registers = aix_thread_store_registers;
+ aix_thread_ops.to_xfer_memory = aix_thread_xfer_memory;
+ /* No need for aix_thread_ops.to_create_inferior, because we activate thread
debugging when the inferior reaches pd_brk_addr. */
- ops.to_kill = ops_kill;
- ops.to_mourn_inferior = ops_mourn_inferior;
- ops.to_thread_alive = ops_thread_alive;
- ops.to_pid_to_str = ops_pid_to_str;
- ops.to_extra_thread_info = ops_extra_thread_info;
- ops.to_stratum = thread_stratum;
- ops.to_magic = OPS_MAGIC;
+ aix_thread_ops.to_kill = aix_thread_kill;
+ aix_thread_ops.to_mourn_inferior = aix_thread_mourn_inferior;
+ aix_thread_ops.to_thread_alive = aix_thread_thread_alive;
+ aix_thread_ops.to_pid_to_str = aix_thread_pid_to_str;
+ aix_thread_ops.to_extra_thread_info = aix_thread_extra_thread_info;
+ aix_thread_ops.to_stratum = thread_stratum;
+ aix_thread_ops.to_magic = OPS_MAGIC;
}
/* Module startup initialization function, automagically called by
void
_initialize_aix_thread (void)
{
- init_ops ();
- add_target (&ops);
+ init_aix_thread_ops ();
+ add_target (&aix_thread_ops);
/* Notice when object files get loaded and unloaded. */
target_new_objfile_chain = target_new_objfile_hook;
-/* ARC target-dependent stuff.
- Copyright 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "floatformat.h"
-#include "symtab.h"
-#include "gdbcmd.h"
-#include "regcache.h"
-
-/* Local functions */
-
-static int arc_set_cpu_type (char *str);
-
-/* Current CPU, set with the "set cpu" command. */
-static int arc_bfd_mach_type;
-char *arc_cpu_type;
-char *tmp_arc_cpu_type;
-
-/* Table of cpu names. */
-struct
- {
- char *name;
- int value;
- }
-arc_cpu_type_table[] =
-{
- { "arc5", bfd_mach_arc_5 },
- { "arc6", bfd_mach_arc_6 },
- { "arc7", bfd_mach_arc_7 },
- { "arc8", bfd_mach_arc_8 },
- { NULL, 0 }
-};
-
-/* Used by simulator. */
-int display_pipeline_p;
-int cpu_timer;
-/* This one must have the same type as used in the emulator.
- It's currently an enum so this should be ok for now. */
-int debug_pipeline_p;
-
-#define ARC_CALL_SAVED_REG(r) ((r) >= 16 && (r) < 24)
-
-#define OPMASK 0xf8000000
-
-/* Instruction field accessor macros.
- See the Programmer's Reference Manual. */
-#define X_OP(i) (((i) >> 27) & 0x1f)
-#define X_A(i) (((i) >> 21) & 0x3f)
-#define X_B(i) (((i) >> 15) & 0x3f)
-#define X_C(i) (((i) >> 9) & 0x3f)
-#define X_D(i) ((((i) & 0x1ff) ^ 0x100) - 0x100)
-#define X_L(i) (((((i) >> 5) & 0x3ffffc) ^ 0x200000) - 0x200000)
-#define X_N(i) (((i) >> 5) & 3)
-#define X_Q(i) ((i) & 0x1f)
-
-/* Return non-zero if X is a short immediate data indicator. */
-#define SHIMM_P(x) ((x) == 61 || (x) == 63)
-
-/* Return non-zero if X is a "long" (32 bit) immediate data indicator. */
-#define LIMM_P(x) ((x) == 62)
-
-/* Build a simple instruction. */
-#define BUILD_INSN(op, a, b, c, d) \
- ((((op) & 31) << 27) \
- | (((a) & 63) << 21) \
- | (((b) & 63) << 15) \
- | (((c) & 63) << 9) \
- | ((d) & 511))
-\f
-/* Codestream stuff. */
-static void codestream_read (unsigned int *, int);
-static void codestream_seek (CORE_ADDR);
-static unsigned int codestream_fill (int);
-
-#define CODESTREAM_BUFSIZ 16
-static CORE_ADDR codestream_next_addr;
-static CORE_ADDR codestream_addr;
-/* FIXME assumes sizeof (int) == 32? */
-static unsigned int codestream_buf[CODESTREAM_BUFSIZ];
-static int codestream_off;
-static int codestream_cnt;
-
-#define codestream_tell() \
- (codestream_addr + codestream_off * sizeof (codestream_buf[0]))
-#define codestream_peek() \
- (codestream_cnt == 0 \
- ? codestream_fill (1) \
- : codestream_buf[codestream_off])
-#define codestream_get() \
- (codestream_cnt-- == 0 \
- ? codestream_fill (0) \
- : codestream_buf[codestream_off++])
-
-static unsigned int
-codestream_fill (int peek_flag)
-{
- codestream_addr = codestream_next_addr;
- codestream_next_addr += CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]);
- codestream_off = 0;
- codestream_cnt = CODESTREAM_BUFSIZ;
- read_memory (codestream_addr, (char *) codestream_buf,
- CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]));
- /* FIXME: check return code? */
-
-
- /* Handle byte order differences -> convert to host byte ordering. */
- {
- int i;
- for (i = 0; i < CODESTREAM_BUFSIZ; i++)
- codestream_buf[i] =
- extract_unsigned_integer (&codestream_buf[i],
- sizeof (codestream_buf[i]));
- }
-
- if (peek_flag)
- return codestream_peek ();
- else
- return codestream_get ();
-}
-
-static void
-codestream_seek (CORE_ADDR place)
-{
- codestream_next_addr = place / CODESTREAM_BUFSIZ;
- codestream_next_addr *= CODESTREAM_BUFSIZ;
- codestream_cnt = 0;
- codestream_fill (1);
- while (codestream_tell () != place)
- codestream_get ();
-}
-
-/* This function is currently unused but leave in for now. */
-
-static void
-codestream_read (unsigned int *buf, int count)
-{
- unsigned int *p;
- int i;
- p = buf;
- for (i = 0; i < count; i++)
- *p++ = codestream_get ();
-}
-\f
-/* Set up prologue scanning and return the first insn. */
-
-static unsigned int
-setup_prologue_scan (CORE_ADDR pc)
-{
- unsigned int insn;
-
- codestream_seek (pc);
- insn = codestream_get ();
-
- return insn;
-}
-
-/*
- * Find & return amount a local space allocated, and advance codestream to
- * first register push (if any).
- * If entry sequence doesn't make sense, return -1, and leave
- * codestream pointer random.
- */
-
-static long
-arc_get_frame_setup (CORE_ADDR pc)
-{
- unsigned int insn;
- /* Size of frame or -1 if unrecognizable prologue. */
- int frame_size = -1;
- /* An initial "sub sp,sp,N" may or may not be for a stdarg fn. */
- int maybe_stdarg_decr = -1;
-
- insn = setup_prologue_scan (pc);
-
- /* The authority for what appears here is the home-grown ABI.
- The most recent version is 1.2. */
-
- /* First insn may be "sub sp,sp,N" if stdarg fn. */
- if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
- == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, SHIMM_REGNUM, 0))
- {
- maybe_stdarg_decr = X_D (insn);
- insn = codestream_get ();
- }
-
- if ((insn & BUILD_INSN (-1, 0, -1, -1, -1)) /* st blink,[sp,4] */
- == BUILD_INSN (2, 0, SP_REGNUM, BLINK_REGNUM, 4))
- {
- insn = codestream_get ();
- /* Frame may not be necessary, even though blink is saved.
- At least this is something we recognize. */
- frame_size = 0;
- }
-
- if ((insn & BUILD_INSN (-1, 0, -1, -1, -1)) /* st fp,[sp] */
- == BUILD_INSN (2, 0, SP_REGNUM, FP_REGNUM, 0))
- {
- insn = codestream_get ();
- if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
- != BUILD_INSN (12, FP_REGNUM, SP_REGNUM, SP_REGNUM, 0))
- return -1;
-
- /* Check for stack adjustment sub sp,sp,N. */
- insn = codestream_peek ();
- if ((insn & BUILD_INSN (-1, -1, -1, 0, 0))
- == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, 0, 0))
- {
- if (LIMM_P (X_C (insn)))
- frame_size = codestream_get ();
- else if (SHIMM_P (X_C (insn)))
- frame_size = X_D (insn);
- else
- return -1;
- if (frame_size < 0)
- return -1;
-
- codestream_get ();
-
- /* This sequence is used to get the address of the return
- buffer for a function that returns a structure. */
- insn = codestream_peek ();
- if ((insn & OPMASK) == 0x60000000)
- codestream_get ();
- }
- /* Frameless fn. */
- else
- {
- frame_size = 0;
- }
- }
-
- /* If we found a "sub sp,sp,N" and nothing else, it may or may not be a
- stdarg fn. The stdarg decrement is not treated as part of the frame size,
- so we have a dilemma: what do we return? For now, if we get a
- "sub sp,sp,N" and nothing else assume this isn't a stdarg fn. One way
- to fix this completely would be to add a bit to the function descriptor
- that says the function is a stdarg function. */
-
- if (frame_size < 0 && maybe_stdarg_decr > 0)
- return maybe_stdarg_decr;
- return frame_size;
-}
-
-/* Given a pc value, skip it forward past the function prologue by
- disassembling instructions that appear to be a prologue.
-
- If FRAMELESS_P is set, we are only testing to see if the function
- is frameless. If it is a frameless function, return PC unchanged.
- This allows a quicker answer. */
-
-CORE_ADDR
-arc_skip_prologue (CORE_ADDR pc, int frameless_p)
-{
- unsigned int insn;
- int i, frame_size;
-
- if ((frame_size = arc_get_frame_setup (pc)) < 0)
- return (pc);
-
- if (frameless_p)
- return frame_size == 0 ? pc : codestream_tell ();
-
- /* Skip over register saves. */
- for (i = 0; i < 8; i++)
- {
- insn = codestream_peek ();
- if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
- != BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
- break; /* not st insn */
- if (!ARC_CALL_SAVED_REG (X_C (insn)))
- break;
- codestream_get ();
- }
-
- return codestream_tell ();
-}
-
-/* Is the prologue at PC frameless? */
-
-int
-arc_prologue_frameless_p (CORE_ADDR pc)
-{
- return (pc == arc_skip_prologue (pc, 1));
-}
-
-/* Return the return address for a frame.
- This is used to implement FRAME_SAVED_PC.
- This is taken from frameless_look_for_prologue. */
-
-CORE_ADDR
-arc_frame_saved_pc (struct frame_info *frame)
-{
- CORE_ADDR func_start;
- unsigned int insn;
-
- func_start = get_pc_function_start (frame->pc) + FUNCTION_START_OFFSET;
- if (func_start == 0)
- {
- /* Best guess. */
- return ARC_PC_TO_REAL_ADDRESS (read_memory_integer (FRAME_FP (frame) + 4, 4));
- }
-
- /* The authority for what appears here is the home-grown ABI.
- The most recent version is 1.2. */
-
- insn = setup_prologue_scan (func_start);
-
- /* First insn may be "sub sp,sp,N" if stdarg fn. */
- if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
- == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, SHIMM_REGNUM, 0))
- insn = codestream_get ();
-
- /* If the next insn is "st blink,[sp,4]" we can get blink from there.
- Otherwise this is a leaf function and we can use blink. Note that
- this still allows for the case where a leaf function saves/clobbers/
- restores blink. */
-
- if ((insn & BUILD_INSN (-1, 0, -1, -1, -1)) /* st blink,[sp,4] */
- != BUILD_INSN (2, 0, SP_REGNUM, BLINK_REGNUM, 4))
- return ARC_PC_TO_REAL_ADDRESS (read_register (BLINK_REGNUM));
- else
- return ARC_PC_TO_REAL_ADDRESS (read_memory_integer (FRAME_FP (frame) + 4, 4));
-}
-
-/*
- * Parse the first few instructions of the function to see
- * what registers were stored.
- *
- * The startup sequence can be at the start of the function.
- * 'st blink,[sp+4], st fp,[sp], mov fp,sp'
- *
- * Local space is allocated just below by sub sp,sp,nnn.
- * Next, the registers used by this function are stored (as offsets from sp).
- */
-
-void
-frame_find_saved_regs (struct frame_info *fip, struct frame_saved_regs *fsrp)
-{
- long locals;
- unsigned int insn;
- CORE_ADDR dummy_bottom;
- CORE_ADDR adr;
- int i, regnum, offset;
-
- memset (fsrp, 0, sizeof *fsrp);
-
- /* If frame is the end of a dummy, compute where the beginning would be. */
- dummy_bottom = fip->frame - 4 - REGISTER_BYTES - CALL_DUMMY_LENGTH;
-
- /* Check if the PC is in the stack, in a dummy frame. */
- if (dummy_bottom <= fip->pc && fip->pc <= fip->frame)
- {
- /* all regs were saved by push_call_dummy () */
- adr = fip->frame;
- for (i = 0; i < NUM_REGS; i++)
- {
- adr -= REGISTER_RAW_SIZE (i);
- fsrp->regs[i] = adr;
- }
- return;
- }
-
- locals = arc_get_frame_setup (get_pc_function_start (fip->pc));
-
- if (locals >= 0)
- {
- /* Set `adr' to the value of `sp'. */
- adr = fip->frame - locals;
- for (i = 0; i < 8; i++)
- {
- insn = codestream_get ();
- if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
- != BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
- break;
- regnum = X_C (insn);
- offset = X_D (insn);
- fsrp->regs[regnum] = adr + offset;
- }
- }
-
- fsrp->regs[PC_REGNUM] = fip->frame + 4;
- fsrp->regs[FP_REGNUM] = fip->frame;
-}
-
-void
-arc_push_dummy_frame (void)
-{
- CORE_ADDR sp = read_register (SP_REGNUM);
- int regnum;
- char regbuf[MAX_REGISTER_RAW_SIZE];
-
- read_register_gen (PC_REGNUM, regbuf);
- write_memory (sp + 4, regbuf, REGISTER_SIZE);
- read_register_gen (FP_REGNUM, regbuf);
- write_memory (sp, regbuf, REGISTER_SIZE);
- write_register (FP_REGNUM, sp);
- for (regnum = 0; regnum < NUM_REGS; regnum++)
- {
- read_register_gen (regnum, regbuf);
- sp = push_bytes (sp, regbuf, REGISTER_RAW_SIZE (regnum));
- }
- sp += (2 * REGISTER_SIZE);
- write_register (SP_REGNUM, sp);
-}
-
-void
-arc_pop_frame (void)
-{
- struct frame_info *frame = get_current_frame ();
- CORE_ADDR fp;
- int regnum;
- struct frame_saved_regs fsr;
- char regbuf[MAX_REGISTER_RAW_SIZE];
-
- fp = FRAME_FP (frame);
- get_frame_saved_regs (frame, &fsr);
- for (regnum = 0; regnum < NUM_REGS; regnum++)
- {
- CORE_ADDR adr;
- adr = fsr.regs[regnum];
- if (adr)
- {
- read_memory (adr, regbuf, REGISTER_RAW_SIZE (regnum));
- write_register_bytes (REGISTER_BYTE (regnum), regbuf,
- REGISTER_RAW_SIZE (regnum));
- }
- }
- write_register (FP_REGNUM, read_memory_integer (fp, 4));
- write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
- write_register (SP_REGNUM, fp + 8);
- flush_cached_frames ();
-}
-\f
-/* Simulate single-step. */
-
-typedef enum
-{
- NORMAL4, /* a normal 4 byte insn */
- NORMAL8, /* a normal 8 byte insn */
- BRANCH4, /* a 4 byte branch insn, including ones without delay slots */
- BRANCH8, /* an 8 byte branch insn, including ones with delay slots */
-}
-insn_type;
-
-/* Return the type of INSN and store in TARGET the destination address of a
- branch if this is one. */
-/* ??? Need to verify all cases are properly handled. */
-
-static insn_type
-get_insn_type (unsigned long insn, CORE_ADDR pc, CORE_ADDR *target)
-{
- unsigned long limm;
-
- switch (insn >> 27)
- {
- case 0:
- case 1:
- case 2: /* load/store insns */
- if (LIMM_P (X_A (insn))
- || LIMM_P (X_B (insn))
- || LIMM_P (X_C (insn)))
- return NORMAL8;
- return NORMAL4;
- case 4:
- case 5:
- case 6: /* branch insns */
- *target = pc + 4 + X_L (insn);
- /* ??? It isn't clear that this is always the right answer.
- The problem occurs when the next insn is an 8 byte insn. If the
- branch is conditional there's no worry as there shouldn't be an 8
- byte insn following. The programmer may be cheating if s/he knows
- the branch will never be taken, but we don't deal with that.
- Note that the programmer is also allowed to play games by putting
- an insn with long immediate data in the delay slot and then duplicate
- the long immediate data at the branch target. Ugh! */
- if (X_N (insn) == 0)
- return BRANCH4;
- return BRANCH8;
- case 7: /* jump insns */
- if (LIMM_P (X_B (insn)))
- {
- limm = read_memory_integer (pc + 4, 4);
- *target = ARC_PC_TO_REAL_ADDRESS (limm);
- return BRANCH8;
- }
- if (SHIMM_P (X_B (insn)))
- *target = ARC_PC_TO_REAL_ADDRESS (X_D (insn));
- else
- *target = ARC_PC_TO_REAL_ADDRESS (read_register (X_B (insn)));
- if (X_Q (insn) == 0 && X_N (insn) == 0)
- return BRANCH4;
- return BRANCH8;
- default: /* arithmetic insns, etc. */
- if (LIMM_P (X_A (insn))
- || LIMM_P (X_B (insn))
- || LIMM_P (X_C (insn)))
- return NORMAL8;
- return NORMAL4;
- }
-}
-
-/* single_step() is called just before we want to resume the inferior, if we
- want to single-step it but there is no hardware or kernel single-step
- support. We find all the possible targets of the coming instruction and
- breakpoint them.
-
- single_step is also called just after the inferior stops. If we had
- set up a simulated single-step, we undo our damage. */
-
-void
-arc_software_single_step (enum target_signal ignore, /* sig but we don't need it */
- int insert_breakpoints_p)
-{
- static CORE_ADDR next_pc, target;
- static int brktrg_p;
- typedef char binsn_quantum[BREAKPOINT_MAX];
- static binsn_quantum break_mem[2];
-
- if (insert_breakpoints_p)
- {
- insn_type type;
- CORE_ADDR pc;
- unsigned long insn;
-
- pc = read_register (PC_REGNUM);
- insn = read_memory_integer (pc, 4);
- type = get_insn_type (insn, pc, &target);
-
- /* Always set a breakpoint for the insn after the branch. */
- next_pc = pc + ((type == NORMAL8 || type == BRANCH8) ? 8 : 4);
- target_insert_breakpoint (next_pc, break_mem[0]);
-
- brktrg_p = 0;
-
- if ((type == BRANCH4 || type == BRANCH8)
- /* Watch out for branches to the following location.
- We just stored a breakpoint there and another call to
- target_insert_breakpoint will think the real insn is the
- breakpoint we just stored there. */
- && target != next_pc)
- {
- brktrg_p = 1;
- target_insert_breakpoint (target, break_mem[1]);
- }
-
- }
- else
- {
- /* Remove breakpoints. */
- target_remove_breakpoint (next_pc, break_mem[0]);
-
- if (brktrg_p)
- target_remove_breakpoint (target, break_mem[1]);
-
- /* Fix the pc. */
- stop_pc -= DECR_PC_AFTER_BREAK;
- write_pc (stop_pc);
- }
-}
-\f
-/* Because of Multi-arch, GET_LONGJMP_TARGET is always defined. So test
- for a definition of JB_PC. */
-#ifdef JB_PC
-/* Figure out where the longjmp will land. Slurp the args out of the stack.
- We expect the first arg to be a pointer to the jmp_buf structure from which
- we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
- This routine returns true on success. */
-
-int
-get_longjmp_target (CORE_ADDR *pc)
-{
- char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
- CORE_ADDR sp, jb_addr;
-
- sp = read_register (SP_REGNUM);
-
- if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack */
- buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
- return 0;
-
- jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
- if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
- TARGET_PTR_BIT / TARGET_CHAR_BIT))
- return 0;
-
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
- return 1;
-}
-#endif /* GET_LONGJMP_TARGET */
-\f
-/* Disassemble one instruction. */
-
-static int
-arc_print_insn (bfd_vma vma, disassemble_info *info)
-{
- static int current_mach;
- static int current_endian;
- static disassembler_ftype current_disasm;
-
- if (current_disasm == NULL
- || arc_bfd_mach_type != current_mach
- || TARGET_BYTE_ORDER != current_endian)
- {
- current_mach = arc_bfd_mach_type;
- current_endian = TARGET_BYTE_ORDER;
- current_disasm = arc_get_disassembler (NULL);
- }
-
- return (*current_disasm) (vma, info);
-}
-\f
-/* Command to set cpu type. */
-
-void
-arc_set_cpu_type_command (char *args, int from_tty)
-{
- int i;
-
- if (tmp_arc_cpu_type == NULL || *tmp_arc_cpu_type == '\0')
- {
- printf_unfiltered ("The known ARC cpu types are as follows:\n");
- for (i = 0; arc_cpu_type_table[i].name != NULL; ++i)
- printf_unfiltered ("%s\n", arc_cpu_type_table[i].name);
-
- /* Restore the value. */
- tmp_arc_cpu_type = xstrdup (arc_cpu_type);
-
- return;
- }
-
- if (!arc_set_cpu_type (tmp_arc_cpu_type))
- {
- error ("Unknown cpu type `%s'.", tmp_arc_cpu_type);
- /* Restore its value. */
- tmp_arc_cpu_type = xstrdup (arc_cpu_type);
- }
-}
-
-static void
-arc_show_cpu_type_command (char *args, int from_tty)
-{
-}
-
-/* Modify the actual cpu type.
- Result is a boolean indicating success. */
-
-static int
-arc_set_cpu_type (char *str)
-{
- int i, j;
-
- if (str == NULL)
- return 0;
-
- for (i = 0; arc_cpu_type_table[i].name != NULL; ++i)
- {
- if (strcasecmp (str, arc_cpu_type_table[i].name) == 0)
- {
- arc_cpu_type = str;
- arc_bfd_mach_type = arc_cpu_type_table[i].value;
- return 1;
- }
- }
-
- return 0;
-}
-\f
-void
-_initialize_arc_tdep (void)
-{
- struct cmd_list_element *c;
-
- c = add_set_cmd ("cpu", class_support, var_string_noescape,
- (char *) &tmp_arc_cpu_type,
- "Set the type of ARC cpu in use.\n\
-This command has two purposes. In a multi-cpu system it lets one\n\
-change the cpu being debugged. It also gives one access to\n\
-cpu-type-specific registers and recognize cpu-type-specific instructions.\
-",
- &setlist);
- set_cmd_cfunc (c, arc_set_cpu_type_command);
- c = add_show_from_set (c, &showlist);
- set_cmd_cfunc (c, arc_show_cpu_type_command);
-
- /* We have to use xstrdup() here because the `set' command frees it
- before setting a new value. */
- tmp_arc_cpu_type = xstrdup (DEFAULT_ARC_CPU_TYPE);
- arc_set_cpu_type (tmp_arc_cpu_type);
-
- c = add_set_cmd ("displaypipeline", class_support, var_zinteger,
- (char *) &display_pipeline_p,
- "Set pipeline display (simulator only).\n\
-When enabled, the state of the pipeline after each cycle is displayed.",
- &setlist);
- c = add_show_from_set (c, &showlist);
-
- c = add_set_cmd ("debugpipeline", class_support, var_zinteger,
- (char *) &debug_pipeline_p,
- "Set pipeline debug display (simulator only).\n\
-When enabled, debugging information about the pipeline is displayed.",
- &setlist);
- c = add_show_from_set (c, &showlist);
-
- c = add_set_cmd ("cputimer", class_support, var_zinteger,
- (char *) &cpu_timer,
- "Set maximum cycle count (simulator only).\n\
-Control will return to gdb if the timer expires.\n\
-A negative value disables the timer.",
- &setlist);
- c = add_show_from_set (c, &showlist);
-
- tm_print_insn = arc_print_insn;
-}
+// OBSOLETE /* ARC target-dependent stuff.
+// OBSOLETE Copyright 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE #include "floatformat.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "gdbcmd.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE
+// OBSOLETE /* Local functions */
+// OBSOLETE
+// OBSOLETE static int arc_set_cpu_type (char *str);
+// OBSOLETE
+// OBSOLETE /* Current CPU, set with the "set cpu" command. */
+// OBSOLETE static int arc_bfd_mach_type;
+// OBSOLETE char *arc_cpu_type;
+// OBSOLETE char *tmp_arc_cpu_type;
+// OBSOLETE
+// OBSOLETE /* Table of cpu names. */
+// OBSOLETE struct
+// OBSOLETE {
+// OBSOLETE char *name;
+// OBSOLETE int value;
+// OBSOLETE }
+// OBSOLETE arc_cpu_type_table[] =
+// OBSOLETE {
+// OBSOLETE { "arc5", bfd_mach_arc_5 },
+// OBSOLETE { "arc6", bfd_mach_arc_6 },
+// OBSOLETE { "arc7", bfd_mach_arc_7 },
+// OBSOLETE { "arc8", bfd_mach_arc_8 },
+// OBSOLETE { NULL, 0 }
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE /* Used by simulator. */
+// OBSOLETE int display_pipeline_p;
+// OBSOLETE int cpu_timer;
+// OBSOLETE /* This one must have the same type as used in the emulator.
+// OBSOLETE It's currently an enum so this should be ok for now. */
+// OBSOLETE int debug_pipeline_p;
+// OBSOLETE
+// OBSOLETE #define ARC_CALL_SAVED_REG(r) ((r) >= 16 && (r) < 24)
+// OBSOLETE
+// OBSOLETE #define OPMASK 0xf8000000
+// OBSOLETE
+// OBSOLETE /* Instruction field accessor macros.
+// OBSOLETE See the Programmer's Reference Manual. */
+// OBSOLETE #define X_OP(i) (((i) >> 27) & 0x1f)
+// OBSOLETE #define X_A(i) (((i) >> 21) & 0x3f)
+// OBSOLETE #define X_B(i) (((i) >> 15) & 0x3f)
+// OBSOLETE #define X_C(i) (((i) >> 9) & 0x3f)
+// OBSOLETE #define X_D(i) ((((i) & 0x1ff) ^ 0x100) - 0x100)
+// OBSOLETE #define X_L(i) (((((i) >> 5) & 0x3ffffc) ^ 0x200000) - 0x200000)
+// OBSOLETE #define X_N(i) (((i) >> 5) & 3)
+// OBSOLETE #define X_Q(i) ((i) & 0x1f)
+// OBSOLETE
+// OBSOLETE /* Return non-zero if X is a short immediate data indicator. */
+// OBSOLETE #define SHIMM_P(x) ((x) == 61 || (x) == 63)
+// OBSOLETE
+// OBSOLETE /* Return non-zero if X is a "long" (32 bit) immediate data indicator. */
+// OBSOLETE #define LIMM_P(x) ((x) == 62)
+// OBSOLETE
+// OBSOLETE /* Build a simple instruction. */
+// OBSOLETE #define BUILD_INSN(op, a, b, c, d) \
+// OBSOLETE ((((op) & 31) << 27) \
+// OBSOLETE | (((a) & 63) << 21) \
+// OBSOLETE | (((b) & 63) << 15) \
+// OBSOLETE | (((c) & 63) << 9) \
+// OBSOLETE | ((d) & 511))
+// OBSOLETE \f
+// OBSOLETE /* Codestream stuff. */
+// OBSOLETE static void codestream_read (unsigned int *, int);
+// OBSOLETE static void codestream_seek (CORE_ADDR);
+// OBSOLETE static unsigned int codestream_fill (int);
+// OBSOLETE
+// OBSOLETE #define CODESTREAM_BUFSIZ 16
+// OBSOLETE static CORE_ADDR codestream_next_addr;
+// OBSOLETE static CORE_ADDR codestream_addr;
+// OBSOLETE /* FIXME assumes sizeof (int) == 32? */
+// OBSOLETE static unsigned int codestream_buf[CODESTREAM_BUFSIZ];
+// OBSOLETE static int codestream_off;
+// OBSOLETE static int codestream_cnt;
+// OBSOLETE
+// OBSOLETE #define codestream_tell() \
+// OBSOLETE (codestream_addr + codestream_off * sizeof (codestream_buf[0]))
+// OBSOLETE #define codestream_peek() \
+// OBSOLETE (codestream_cnt == 0 \
+// OBSOLETE ? codestream_fill (1) \
+// OBSOLETE : codestream_buf[codestream_off])
+// OBSOLETE #define codestream_get() \
+// OBSOLETE (codestream_cnt-- == 0 \
+// OBSOLETE ? codestream_fill (0) \
+// OBSOLETE : codestream_buf[codestream_off++])
+// OBSOLETE
+// OBSOLETE static unsigned int
+// OBSOLETE codestream_fill (int peek_flag)
+// OBSOLETE {
+// OBSOLETE codestream_addr = codestream_next_addr;
+// OBSOLETE codestream_next_addr += CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]);
+// OBSOLETE codestream_off = 0;
+// OBSOLETE codestream_cnt = CODESTREAM_BUFSIZ;
+// OBSOLETE read_memory (codestream_addr, (char *) codestream_buf,
+// OBSOLETE CODESTREAM_BUFSIZ * sizeof (codestream_buf[0]));
+// OBSOLETE /* FIXME: check return code? */
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Handle byte order differences -> convert to host byte ordering. */
+// OBSOLETE {
+// OBSOLETE int i;
+// OBSOLETE for (i = 0; i < CODESTREAM_BUFSIZ; i++)
+// OBSOLETE codestream_buf[i] =
+// OBSOLETE extract_unsigned_integer (&codestream_buf[i],
+// OBSOLETE sizeof (codestream_buf[i]));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (peek_flag)
+// OBSOLETE return codestream_peek ();
+// OBSOLETE else
+// OBSOLETE return codestream_get ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE codestream_seek (CORE_ADDR place)
+// OBSOLETE {
+// OBSOLETE codestream_next_addr = place / CODESTREAM_BUFSIZ;
+// OBSOLETE codestream_next_addr *= CODESTREAM_BUFSIZ;
+// OBSOLETE codestream_cnt = 0;
+// OBSOLETE codestream_fill (1);
+// OBSOLETE while (codestream_tell () != place)
+// OBSOLETE codestream_get ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* This function is currently unused but leave in for now. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE codestream_read (unsigned int *buf, int count)
+// OBSOLETE {
+// OBSOLETE unsigned int *p;
+// OBSOLETE int i;
+// OBSOLETE p = buf;
+// OBSOLETE for (i = 0; i < count; i++)
+// OBSOLETE *p++ = codestream_get ();
+// OBSOLETE }
+// OBSOLETE \f
+// OBSOLETE /* Set up prologue scanning and return the first insn. */
+// OBSOLETE
+// OBSOLETE static unsigned int
+// OBSOLETE setup_prologue_scan (CORE_ADDR pc)
+// OBSOLETE {
+// OBSOLETE unsigned int insn;
+// OBSOLETE
+// OBSOLETE codestream_seek (pc);
+// OBSOLETE insn = codestream_get ();
+// OBSOLETE
+// OBSOLETE return insn;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE * Find & return amount a local space allocated, and advance codestream to
+// OBSOLETE * first register push (if any).
+// OBSOLETE * If entry sequence doesn't make sense, return -1, and leave
+// OBSOLETE * codestream pointer random.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE static long
+// OBSOLETE arc_get_frame_setup (CORE_ADDR pc)
+// OBSOLETE {
+// OBSOLETE unsigned int insn;
+// OBSOLETE /* Size of frame or -1 if unrecognizable prologue. */
+// OBSOLETE int frame_size = -1;
+// OBSOLETE /* An initial "sub sp,sp,N" may or may not be for a stdarg fn. */
+// OBSOLETE int maybe_stdarg_decr = -1;
+// OBSOLETE
+// OBSOLETE insn = setup_prologue_scan (pc);
+// OBSOLETE
+// OBSOLETE /* The authority for what appears here is the home-grown ABI.
+// OBSOLETE The most recent version is 1.2. */
+// OBSOLETE
+// OBSOLETE /* First insn may be "sub sp,sp,N" if stdarg fn. */
+// OBSOLETE if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
+// OBSOLETE == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, SHIMM_REGNUM, 0))
+// OBSOLETE {
+// OBSOLETE maybe_stdarg_decr = X_D (insn);
+// OBSOLETE insn = codestream_get ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if ((insn & BUILD_INSN (-1, 0, -1, -1, -1)) /* st blink,[sp,4] */
+// OBSOLETE == BUILD_INSN (2, 0, SP_REGNUM, BLINK_REGNUM, 4))
+// OBSOLETE {
+// OBSOLETE insn = codestream_get ();
+// OBSOLETE /* Frame may not be necessary, even though blink is saved.
+// OBSOLETE At least this is something we recognize. */
+// OBSOLETE frame_size = 0;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if ((insn & BUILD_INSN (-1, 0, -1, -1, -1)) /* st fp,[sp] */
+// OBSOLETE == BUILD_INSN (2, 0, SP_REGNUM, FP_REGNUM, 0))
+// OBSOLETE {
+// OBSOLETE insn = codestream_get ();
+// OBSOLETE if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
+// OBSOLETE != BUILD_INSN (12, FP_REGNUM, SP_REGNUM, SP_REGNUM, 0))
+// OBSOLETE return -1;
+// OBSOLETE
+// OBSOLETE /* Check for stack adjustment sub sp,sp,N. */
+// OBSOLETE insn = codestream_peek ();
+// OBSOLETE if ((insn & BUILD_INSN (-1, -1, -1, 0, 0))
+// OBSOLETE == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, 0, 0))
+// OBSOLETE {
+// OBSOLETE if (LIMM_P (X_C (insn)))
+// OBSOLETE frame_size = codestream_get ();
+// OBSOLETE else if (SHIMM_P (X_C (insn)))
+// OBSOLETE frame_size = X_D (insn);
+// OBSOLETE else
+// OBSOLETE return -1;
+// OBSOLETE if (frame_size < 0)
+// OBSOLETE return -1;
+// OBSOLETE
+// OBSOLETE codestream_get ();
+// OBSOLETE
+// OBSOLETE /* This sequence is used to get the address of the return
+// OBSOLETE buffer for a function that returns a structure. */
+// OBSOLETE insn = codestream_peek ();
+// OBSOLETE if ((insn & OPMASK) == 0x60000000)
+// OBSOLETE codestream_get ();
+// OBSOLETE }
+// OBSOLETE /* Frameless fn. */
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE frame_size = 0;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* If we found a "sub sp,sp,N" and nothing else, it may or may not be a
+// OBSOLETE stdarg fn. The stdarg decrement is not treated as part of the frame size,
+// OBSOLETE so we have a dilemma: what do we return? For now, if we get a
+// OBSOLETE "sub sp,sp,N" and nothing else assume this isn't a stdarg fn. One way
+// OBSOLETE to fix this completely would be to add a bit to the function descriptor
+// OBSOLETE that says the function is a stdarg function. */
+// OBSOLETE
+// OBSOLETE if (frame_size < 0 && maybe_stdarg_decr > 0)
+// OBSOLETE return maybe_stdarg_decr;
+// OBSOLETE return frame_size;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Given a pc value, skip it forward past the function prologue by
+// OBSOLETE disassembling instructions that appear to be a prologue.
+// OBSOLETE
+// OBSOLETE If FRAMELESS_P is set, we are only testing to see if the function
+// OBSOLETE is frameless. If it is a frameless function, return PC unchanged.
+// OBSOLETE This allows a quicker answer. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE arc_skip_prologue (CORE_ADDR pc, int frameless_p)
+// OBSOLETE {
+// OBSOLETE unsigned int insn;
+// OBSOLETE int i, frame_size;
+// OBSOLETE
+// OBSOLETE if ((frame_size = arc_get_frame_setup (pc)) < 0)
+// OBSOLETE return (pc);
+// OBSOLETE
+// OBSOLETE if (frameless_p)
+// OBSOLETE return frame_size == 0 ? pc : codestream_tell ();
+// OBSOLETE
+// OBSOLETE /* Skip over register saves. */
+// OBSOLETE for (i = 0; i < 8; i++)
+// OBSOLETE {
+// OBSOLETE insn = codestream_peek ();
+// OBSOLETE if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
+// OBSOLETE != BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
+// OBSOLETE break; /* not st insn */
+// OBSOLETE if (!ARC_CALL_SAVED_REG (X_C (insn)))
+// OBSOLETE break;
+// OBSOLETE codestream_get ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE return codestream_tell ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Is the prologue at PC frameless? */
+// OBSOLETE
+// OBSOLETE int
+// OBSOLETE arc_prologue_frameless_p (CORE_ADDR pc)
+// OBSOLETE {
+// OBSOLETE return (pc == arc_skip_prologue (pc, 1));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Return the return address for a frame.
+// OBSOLETE This is used to implement FRAME_SAVED_PC.
+// OBSOLETE This is taken from frameless_look_for_prologue. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE arc_frame_saved_pc (struct frame_info *frame)
+// OBSOLETE {
+// OBSOLETE CORE_ADDR func_start;
+// OBSOLETE unsigned int insn;
+// OBSOLETE
+// OBSOLETE func_start = get_pc_function_start (frame->pc) + FUNCTION_START_OFFSET;
+// OBSOLETE if (func_start == 0)
+// OBSOLETE {
+// OBSOLETE /* Best guess. */
+// OBSOLETE return ARC_PC_TO_REAL_ADDRESS (read_memory_integer (FRAME_FP (frame) + 4, 4));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* The authority for what appears here is the home-grown ABI.
+// OBSOLETE The most recent version is 1.2. */
+// OBSOLETE
+// OBSOLETE insn = setup_prologue_scan (func_start);
+// OBSOLETE
+// OBSOLETE /* First insn may be "sub sp,sp,N" if stdarg fn. */
+// OBSOLETE if ((insn & BUILD_INSN (-1, -1, -1, -1, 0))
+// OBSOLETE == BUILD_INSN (10, SP_REGNUM, SP_REGNUM, SHIMM_REGNUM, 0))
+// OBSOLETE insn = codestream_get ();
+// OBSOLETE
+// OBSOLETE /* If the next insn is "st blink,[sp,4]" we can get blink from there.
+// OBSOLETE Otherwise this is a leaf function and we can use blink. Note that
+// OBSOLETE this still allows for the case where a leaf function saves/clobbers/
+// OBSOLETE restores blink. */
+// OBSOLETE
+// OBSOLETE if ((insn & BUILD_INSN (-1, 0, -1, -1, -1)) /* st blink,[sp,4] */
+// OBSOLETE != BUILD_INSN (2, 0, SP_REGNUM, BLINK_REGNUM, 4))
+// OBSOLETE return ARC_PC_TO_REAL_ADDRESS (read_register (BLINK_REGNUM));
+// OBSOLETE else
+// OBSOLETE return ARC_PC_TO_REAL_ADDRESS (read_memory_integer (FRAME_FP (frame) + 4, 4));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE * Parse the first few instructions of the function to see
+// OBSOLETE * what registers were stored.
+// OBSOLETE *
+// OBSOLETE * The startup sequence can be at the start of the function.
+// OBSOLETE * 'st blink,[sp+4], st fp,[sp], mov fp,sp'
+// OBSOLETE *
+// OBSOLETE * Local space is allocated just below by sub sp,sp,nnn.
+// OBSOLETE * Next, the registers used by this function are stored (as offsets from sp).
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE frame_find_saved_regs (struct frame_info *fip, struct frame_saved_regs *fsrp)
+// OBSOLETE {
+// OBSOLETE long locals;
+// OBSOLETE unsigned int insn;
+// OBSOLETE CORE_ADDR dummy_bottom;
+// OBSOLETE CORE_ADDR adr;
+// OBSOLETE int i, regnum, offset;
+// OBSOLETE
+// OBSOLETE memset (fsrp, 0, sizeof *fsrp);
+// OBSOLETE
+// OBSOLETE /* If frame is the end of a dummy, compute where the beginning would be. */
+// OBSOLETE dummy_bottom = fip->frame - 4 - REGISTER_BYTES - CALL_DUMMY_LENGTH;
+// OBSOLETE
+// OBSOLETE /* Check if the PC is in the stack, in a dummy frame. */
+// OBSOLETE if (dummy_bottom <= fip->pc && fip->pc <= fip->frame)
+// OBSOLETE {
+// OBSOLETE /* all regs were saved by push_call_dummy () */
+// OBSOLETE adr = fip->frame;
+// OBSOLETE for (i = 0; i < NUM_REGS; i++)
+// OBSOLETE {
+// OBSOLETE adr -= REGISTER_RAW_SIZE (i);
+// OBSOLETE fsrp->regs[i] = adr;
+// OBSOLETE }
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE locals = arc_get_frame_setup (get_pc_function_start (fip->pc));
+// OBSOLETE
+// OBSOLETE if (locals >= 0)
+// OBSOLETE {
+// OBSOLETE /* Set `adr' to the value of `sp'. */
+// OBSOLETE adr = fip->frame - locals;
+// OBSOLETE for (i = 0; i < 8; i++)
+// OBSOLETE {
+// OBSOLETE insn = codestream_get ();
+// OBSOLETE if ((insn & BUILD_INSN (-1, 0, -1, 0, 0))
+// OBSOLETE != BUILD_INSN (2, 0, SP_REGNUM, 0, 0))
+// OBSOLETE break;
+// OBSOLETE regnum = X_C (insn);
+// OBSOLETE offset = X_D (insn);
+// OBSOLETE fsrp->regs[regnum] = adr + offset;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE fsrp->regs[PC_REGNUM] = fip->frame + 4;
+// OBSOLETE fsrp->regs[FP_REGNUM] = fip->frame;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE arc_push_dummy_frame (void)
+// OBSOLETE {
+// OBSOLETE CORE_ADDR sp = read_register (SP_REGNUM);
+// OBSOLETE int regnum;
+// OBSOLETE char regbuf[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE
+// OBSOLETE read_register_gen (PC_REGNUM, regbuf);
+// OBSOLETE write_memory (sp + 4, regbuf, REGISTER_SIZE);
+// OBSOLETE read_register_gen (FP_REGNUM, regbuf);
+// OBSOLETE write_memory (sp, regbuf, REGISTER_SIZE);
+// OBSOLETE write_register (FP_REGNUM, sp);
+// OBSOLETE for (regnum = 0; regnum < NUM_REGS; regnum++)
+// OBSOLETE {
+// OBSOLETE read_register_gen (regnum, regbuf);
+// OBSOLETE sp = push_bytes (sp, regbuf, REGISTER_RAW_SIZE (regnum));
+// OBSOLETE }
+// OBSOLETE sp += (2 * REGISTER_SIZE);
+// OBSOLETE write_register (SP_REGNUM, sp);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE arc_pop_frame (void)
+// OBSOLETE {
+// OBSOLETE struct frame_info *frame = get_current_frame ();
+// OBSOLETE CORE_ADDR fp;
+// OBSOLETE int regnum;
+// OBSOLETE struct frame_saved_regs fsr;
+// OBSOLETE char regbuf[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE
+// OBSOLETE fp = FRAME_FP (frame);
+// OBSOLETE get_frame_saved_regs (frame, &fsr);
+// OBSOLETE for (regnum = 0; regnum < NUM_REGS; regnum++)
+// OBSOLETE {
+// OBSOLETE CORE_ADDR adr;
+// OBSOLETE adr = fsr.regs[regnum];
+// OBSOLETE if (adr)
+// OBSOLETE {
+// OBSOLETE read_memory (adr, regbuf, REGISTER_RAW_SIZE (regnum));
+// OBSOLETE write_register_bytes (REGISTER_BYTE (regnum), regbuf,
+// OBSOLETE REGISTER_RAW_SIZE (regnum));
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE write_register (FP_REGNUM, read_memory_integer (fp, 4));
+// OBSOLETE write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
+// OBSOLETE write_register (SP_REGNUM, fp + 8);
+// OBSOLETE flush_cached_frames ();
+// OBSOLETE }
+// OBSOLETE \f
+// OBSOLETE /* Simulate single-step. */
+// OBSOLETE
+// OBSOLETE typedef enum
+// OBSOLETE {
+// OBSOLETE NORMAL4, /* a normal 4 byte insn */
+// OBSOLETE NORMAL8, /* a normal 8 byte insn */
+// OBSOLETE BRANCH4, /* a 4 byte branch insn, including ones without delay slots */
+// OBSOLETE BRANCH8, /* an 8 byte branch insn, including ones with delay slots */
+// OBSOLETE }
+// OBSOLETE insn_type;
+// OBSOLETE
+// OBSOLETE /* Return the type of INSN and store in TARGET the destination address of a
+// OBSOLETE branch if this is one. */
+// OBSOLETE /* ??? Need to verify all cases are properly handled. */
+// OBSOLETE
+// OBSOLETE static insn_type
+// OBSOLETE get_insn_type (unsigned long insn, CORE_ADDR pc, CORE_ADDR *target)
+// OBSOLETE {
+// OBSOLETE unsigned long limm;
+// OBSOLETE
+// OBSOLETE switch (insn >> 27)
+// OBSOLETE {
+// OBSOLETE case 0:
+// OBSOLETE case 1:
+// OBSOLETE case 2: /* load/store insns */
+// OBSOLETE if (LIMM_P (X_A (insn))
+// OBSOLETE || LIMM_P (X_B (insn))
+// OBSOLETE || LIMM_P (X_C (insn)))
+// OBSOLETE return NORMAL8;
+// OBSOLETE return NORMAL4;
+// OBSOLETE case 4:
+// OBSOLETE case 5:
+// OBSOLETE case 6: /* branch insns */
+// OBSOLETE *target = pc + 4 + X_L (insn);
+// OBSOLETE /* ??? It isn't clear that this is always the right answer.
+// OBSOLETE The problem occurs when the next insn is an 8 byte insn. If the
+// OBSOLETE branch is conditional there's no worry as there shouldn't be an 8
+// OBSOLETE byte insn following. The programmer may be cheating if s/he knows
+// OBSOLETE the branch will never be taken, but we don't deal with that.
+// OBSOLETE Note that the programmer is also allowed to play games by putting
+// OBSOLETE an insn with long immediate data in the delay slot and then duplicate
+// OBSOLETE the long immediate data at the branch target. Ugh! */
+// OBSOLETE if (X_N (insn) == 0)
+// OBSOLETE return BRANCH4;
+// OBSOLETE return BRANCH8;
+// OBSOLETE case 7: /* jump insns */
+// OBSOLETE if (LIMM_P (X_B (insn)))
+// OBSOLETE {
+// OBSOLETE limm = read_memory_integer (pc + 4, 4);
+// OBSOLETE *target = ARC_PC_TO_REAL_ADDRESS (limm);
+// OBSOLETE return BRANCH8;
+// OBSOLETE }
+// OBSOLETE if (SHIMM_P (X_B (insn)))
+// OBSOLETE *target = ARC_PC_TO_REAL_ADDRESS (X_D (insn));
+// OBSOLETE else
+// OBSOLETE *target = ARC_PC_TO_REAL_ADDRESS (read_register (X_B (insn)));
+// OBSOLETE if (X_Q (insn) == 0 && X_N (insn) == 0)
+// OBSOLETE return BRANCH4;
+// OBSOLETE return BRANCH8;
+// OBSOLETE default: /* arithmetic insns, etc. */
+// OBSOLETE if (LIMM_P (X_A (insn))
+// OBSOLETE || LIMM_P (X_B (insn))
+// OBSOLETE || LIMM_P (X_C (insn)))
+// OBSOLETE return NORMAL8;
+// OBSOLETE return NORMAL4;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* single_step() is called just before we want to resume the inferior, if we
+// OBSOLETE want to single-step it but there is no hardware or kernel single-step
+// OBSOLETE support. We find all the possible targets of the coming instruction and
+// OBSOLETE breakpoint them.
+// OBSOLETE
+// OBSOLETE single_step is also called just after the inferior stops. If we had
+// OBSOLETE set up a simulated single-step, we undo our damage. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE arc_software_single_step (enum target_signal ignore, /* sig but we don't need it */
+// OBSOLETE int insert_breakpoints_p)
+// OBSOLETE {
+// OBSOLETE static CORE_ADDR next_pc, target;
+// OBSOLETE static int brktrg_p;
+// OBSOLETE typedef char binsn_quantum[BREAKPOINT_MAX];
+// OBSOLETE static binsn_quantum break_mem[2];
+// OBSOLETE
+// OBSOLETE if (insert_breakpoints_p)
+// OBSOLETE {
+// OBSOLETE insn_type type;
+// OBSOLETE CORE_ADDR pc;
+// OBSOLETE unsigned long insn;
+// OBSOLETE
+// OBSOLETE pc = read_register (PC_REGNUM);
+// OBSOLETE insn = read_memory_integer (pc, 4);
+// OBSOLETE type = get_insn_type (insn, pc, &target);
+// OBSOLETE
+// OBSOLETE /* Always set a breakpoint for the insn after the branch. */
+// OBSOLETE next_pc = pc + ((type == NORMAL8 || type == BRANCH8) ? 8 : 4);
+// OBSOLETE target_insert_breakpoint (next_pc, break_mem[0]);
+// OBSOLETE
+// OBSOLETE brktrg_p = 0;
+// OBSOLETE
+// OBSOLETE if ((type == BRANCH4 || type == BRANCH8)
+// OBSOLETE /* Watch out for branches to the following location.
+// OBSOLETE We just stored a breakpoint there and another call to
+// OBSOLETE target_insert_breakpoint will think the real insn is the
+// OBSOLETE breakpoint we just stored there. */
+// OBSOLETE && target != next_pc)
+// OBSOLETE {
+// OBSOLETE brktrg_p = 1;
+// OBSOLETE target_insert_breakpoint (target, break_mem[1]);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE /* Remove breakpoints. */
+// OBSOLETE target_remove_breakpoint (next_pc, break_mem[0]);
+// OBSOLETE
+// OBSOLETE if (brktrg_p)
+// OBSOLETE target_remove_breakpoint (target, break_mem[1]);
+// OBSOLETE
+// OBSOLETE /* Fix the pc. */
+// OBSOLETE stop_pc -= DECR_PC_AFTER_BREAK;
+// OBSOLETE write_pc (stop_pc);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE \f
+// OBSOLETE /* Because of Multi-arch, GET_LONGJMP_TARGET is always defined. So test
+// OBSOLETE for a definition of JB_PC. */
+// OBSOLETE #ifdef JB_PC
+// OBSOLETE /* Figure out where the longjmp will land. Slurp the args out of the stack.
+// OBSOLETE We expect the first arg to be a pointer to the jmp_buf structure from which
+// OBSOLETE we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
+// OBSOLETE This routine returns true on success. */
+// OBSOLETE
+// OBSOLETE int
+// OBSOLETE get_longjmp_target (CORE_ADDR *pc)
+// OBSOLETE {
+// OBSOLETE char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+// OBSOLETE CORE_ADDR sp, jb_addr;
+// OBSOLETE
+// OBSOLETE sp = read_register (SP_REGNUM);
+// OBSOLETE
+// OBSOLETE if (target_read_memory (sp + SP_ARG0, /* Offset of first arg on stack */
+// OBSOLETE buf,
+// OBSOLETE TARGET_PTR_BIT / TARGET_CHAR_BIT))
+// OBSOLETE return 0;
+// OBSOLETE
+// OBSOLETE jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+// OBSOLETE
+// OBSOLETE if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
+// OBSOLETE TARGET_PTR_BIT / TARGET_CHAR_BIT))
+// OBSOLETE return 0;
+// OBSOLETE
+// OBSOLETE *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+// OBSOLETE
+// OBSOLETE return 1;
+// OBSOLETE }
+// OBSOLETE #endif /* GET_LONGJMP_TARGET */
+// OBSOLETE \f
+// OBSOLETE /* Disassemble one instruction. */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE arc_print_insn (bfd_vma vma, disassemble_info *info)
+// OBSOLETE {
+// OBSOLETE static int current_mach;
+// OBSOLETE static int current_endian;
+// OBSOLETE static disassembler_ftype current_disasm;
+// OBSOLETE
+// OBSOLETE if (current_disasm == NULL
+// OBSOLETE || arc_bfd_mach_type != current_mach
+// OBSOLETE || TARGET_BYTE_ORDER != current_endian)
+// OBSOLETE {
+// OBSOLETE current_mach = arc_bfd_mach_type;
+// OBSOLETE current_endian = TARGET_BYTE_ORDER;
+// OBSOLETE current_disasm = arc_get_disassembler (NULL);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE return (*current_disasm) (vma, info);
+// OBSOLETE }
+// OBSOLETE \f
+// OBSOLETE /* Command to set cpu type. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE arc_set_cpu_type_command (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE int i;
+// OBSOLETE
+// OBSOLETE if (tmp_arc_cpu_type == NULL || *tmp_arc_cpu_type == '\0')
+// OBSOLETE {
+// OBSOLETE printf_unfiltered ("The known ARC cpu types are as follows:\n");
+// OBSOLETE for (i = 0; arc_cpu_type_table[i].name != NULL; ++i)
+// OBSOLETE printf_unfiltered ("%s\n", arc_cpu_type_table[i].name);
+// OBSOLETE
+// OBSOLETE /* Restore the value. */
+// OBSOLETE tmp_arc_cpu_type = xstrdup (arc_cpu_type);
+// OBSOLETE
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (!arc_set_cpu_type (tmp_arc_cpu_type))
+// OBSOLETE {
+// OBSOLETE error ("Unknown cpu type `%s'.", tmp_arc_cpu_type);
+// OBSOLETE /* Restore its value. */
+// OBSOLETE tmp_arc_cpu_type = xstrdup (arc_cpu_type);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE arc_show_cpu_type_command (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Modify the actual cpu type.
+// OBSOLETE Result is a boolean indicating success. */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE arc_set_cpu_type (char *str)
+// OBSOLETE {
+// OBSOLETE int i, j;
+// OBSOLETE
+// OBSOLETE if (str == NULL)
+// OBSOLETE return 0;
+// OBSOLETE
+// OBSOLETE for (i = 0; arc_cpu_type_table[i].name != NULL; ++i)
+// OBSOLETE {
+// OBSOLETE if (strcasecmp (str, arc_cpu_type_table[i].name) == 0)
+// OBSOLETE {
+// OBSOLETE arc_cpu_type = str;
+// OBSOLETE arc_bfd_mach_type = arc_cpu_type_table[i].value;
+// OBSOLETE return 1;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE \f
+// OBSOLETE void
+// OBSOLETE _initialize_arc_tdep (void)
+// OBSOLETE {
+// OBSOLETE struct cmd_list_element *c;
+// OBSOLETE
+// OBSOLETE c = add_set_cmd ("cpu", class_support, var_string_noescape,
+// OBSOLETE (char *) &tmp_arc_cpu_type,
+// OBSOLETE "Set the type of ARC cpu in use.\n\
+// OBSOLETE This command has two purposes. In a multi-cpu system it lets one\n\
+// OBSOLETE change the cpu being debugged. It also gives one access to\n\
+// OBSOLETE cpu-type-specific registers and recognize cpu-type-specific instructions.\
+// OBSOLETE ",
+// OBSOLETE &setlist);
+// OBSOLETE set_cmd_cfunc (c, arc_set_cpu_type_command);
+// OBSOLETE c = add_show_from_set (c, &showlist);
+// OBSOLETE set_cmd_cfunc (c, arc_show_cpu_type_command);
+// OBSOLETE
+// OBSOLETE /* We have to use xstrdup() here because the `set' command frees it
+// OBSOLETE before setting a new value. */
+// OBSOLETE tmp_arc_cpu_type = xstrdup (DEFAULT_ARC_CPU_TYPE);
+// OBSOLETE arc_set_cpu_type (tmp_arc_cpu_type);
+// OBSOLETE
+// OBSOLETE c = add_set_cmd ("displaypipeline", class_support, var_zinteger,
+// OBSOLETE (char *) &display_pipeline_p,
+// OBSOLETE "Set pipeline display (simulator only).\n\
+// OBSOLETE When enabled, the state of the pipeline after each cycle is displayed.",
+// OBSOLETE &setlist);
+// OBSOLETE c = add_show_from_set (c, &showlist);
+// OBSOLETE
+// OBSOLETE c = add_set_cmd ("debugpipeline", class_support, var_zinteger,
+// OBSOLETE (char *) &debug_pipeline_p,
+// OBSOLETE "Set pipeline debug display (simulator only).\n\
+// OBSOLETE When enabled, debugging information about the pipeline is displayed.",
+// OBSOLETE &setlist);
+// OBSOLETE c = add_show_from_set (c, &showlist);
+// OBSOLETE
+// OBSOLETE c = add_set_cmd ("cputimer", class_support, var_zinteger,
+// OBSOLETE (char *) &cpu_timer,
+// OBSOLETE "Set maximum cycle count (simulator only).\n\
+// OBSOLETE Control will return to gdb if the timer expires.\n\
+// OBSOLETE A negative value disables the timer.",
+// OBSOLETE &setlist);
+// OBSOLETE c = add_show_from_set (c, &showlist);
+// OBSOLETE
+// OBSOLETE tm_print_insn = arc_print_insn;
+// OBSOLETE }
#else
/* Just include everything in sight so that the every old definition
of macro is visible. */
-#include "gdb_string.h"
#include "symtab.h"
#include "frame.h"
#include "inferior.h"
#include "target.h"
#include "annotate.h"
#endif
+#include "gdb_string.h"
#include "regcache.h"
#include "gdb_assert.h"
#include "sim-regno.h"
#include "symfile.h"
#include "arch-utils.h"
#include "regcache.h"
+#include "gdb_string.h"
/* AVR Background:
{
sal = find_pc_line (func_addr, 0);
- if (sal.line != 0 && sal.end < func_end)
+ /* troth/2002-08-05: For some very simple functions, gcc doesn't
+ generate a prologue and the sal.end ends up being the 2-byte ``ret''
+ instruction at the end of the function, but func_end ends up being
+ the address of the first instruction of the _next_ function. By
+ adjusting func_end by 2 bytes, we can catch these functions and not
+ return sal.end if it is the ``ret'' instruction. */
+
+ if (sal.line != 0 && sal.end < (func_end-2))
return sal.end;
}
#include "ax.h"
#include "value.h"
+#include "gdb_string.h"
static void grow_expr (struct agent_expr *x, int n);
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "bcache.h"
#include "gdb_string.h" /* For memcpy declaration */
struct regcache *dummy_regs = generic_find_dummy_frame (pc, fp);
if (dummy_regs)
- return regcache_read_as_address (dummy_regs, regno);
+ return regcache_raw_read_as_address (dummy_regs, regno);
else
return 0;
}
gdbarch_register_read() method so that it, on the fly,
constructs either a raw or pseudo register from the raw
register cache. */
- regcache_read (registers, regnum, bufferp);
+ regcache_raw_read (registers, regnum, bufferp);
}
}
gdbarch_register_read() method so that it, on the fly,
constructs either a raw or pseudo register from the raw
register cache. */
- regcache_read (generic_find_dummy_frame (frame->pc, frame->frame),
- regnum, raw_buffer);
+ regcache_raw_read (generic_find_dummy_frame (frame->pc,
+ frame->frame),
+ regnum, raw_buffer);
return;
}
#include "defs.h"
#include "bfd.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "symtab.h"
#include "symfile.h" /* Needed for "struct complaint" */
#include "objfiles.h"
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "bfd.h" /* Binary File Description */
#include "symtab.h"
#include "gdbtypes.h"
-/* Parser for GNU CHILL (CCITT High-Level Language) -*- C -*-
- Copyright 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Parse a Chill expression from text in a string,
- and return the result as a struct expression pointer.
- That structure contains arithmetic operations in reverse polish,
- with constants represented by operations that are followed by special data.
- See expression.h for the details of the format.
- What is important here is that it can be built up sequentially
- during the process of parsing; the lower levels of the tree always
- come first in the result.
-
- Note that the language accepted by this parser is more liberal
- than the one accepted by an actual Chill compiler. For example, the
- language rule that a simple name string can not be one of the reserved
- simple name strings is not enforced (e.g "case" is not treated as a
- reserved name). Another example is that Chill is a strongly typed
- language, and certain expressions that violate the type constraints
- may still be evaluated if gdb can do so in a meaningful manner, while
- such expressions would be rejected by the compiler. The reason for
- this more liberal behavior is the philosophy that the debugger
- is intended to be a tool that is used by the programmer when things
- go wrong, and as such, it should provide as few artificial barriers
- to it's use as possible. If it can do something meaningful, even
- something that violates language contraints that are enforced by the
- compiler, it should do so without complaint.
-
- */
-
-#include "defs.h"
-#include "gdb_string.h"
-#include <ctype.h>
-#include "expression.h"
-#include "language.h"
-#include "value.h"
-#include "parser-defs.h"
-#include "ch-lang.h"
-#include "bfd.h" /* Required by objfiles.h. */
-#include "symfile.h" /* Required by objfiles.h. */
-#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
-
-#ifdef __GNUC__
-#define INLINE __inline__
-#endif
-
-typedef union
-
- {
- LONGEST lval;
- ULONGEST ulval;
- struct
- {
- LONGEST val;
- struct type *type;
- }
- typed_val;
- double dval;
- struct symbol *sym;
- struct type *tval;
- struct stoken sval;
- struct ttype tsym;
- struct symtoken ssym;
- }
-YYSTYPE;
-
-enum ch_terminal
- {
- END_TOKEN = 0,
- /* '\001' ... '\xff' come first. */
- OPEN_PAREN = '(',
- TOKEN_NOT_READ = 999,
- INTEGER_LITERAL,
- BOOLEAN_LITERAL,
- CHARACTER_LITERAL,
- FLOAT_LITERAL,
- GENERAL_PROCEDURE_NAME,
- LOCATION_NAME,
- EMPTINESS_LITERAL,
- CHARACTER_STRING_LITERAL,
- BIT_STRING_LITERAL,
- TYPENAME,
- DOT_FIELD_NAME, /* '.' followed by <field name> */
- CASE,
- OF,
- ESAC,
- LOGIOR,
- ORIF,
- LOGXOR,
- LOGAND,
- ANDIF,
- NOTEQUAL,
- GEQ,
- LEQ,
- IN,
- SLASH_SLASH,
- MOD,
- REM,
- NOT,
- POINTER,
- RECEIVE,
- UP,
- IF,
- THEN,
- ELSE,
- FI,
- ELSIF,
- ILLEGAL_TOKEN,
- NUM,
- PRED,
- SUCC,
- ABS,
- CARD,
- MAX_TOKEN,
- MIN_TOKEN,
- ADDR_TOKEN,
- SIZE,
- UPPER,
- LOWER,
- LENGTH,
- ARRAY,
- GDB_VARIABLE,
- GDB_ASSIGNMENT
- };
-
-/* Forward declarations. */
-
-static void write_lower_upper_value (enum exp_opcode, struct type *);
-static enum ch_terminal match_bitstring_literal (void);
-static enum ch_terminal match_integer_literal (void);
-static enum ch_terminal match_character_literal (void);
-static enum ch_terminal match_string_literal (void);
-static enum ch_terminal match_float_literal (void);
-static int decode_integer_literal (LONGEST *, char **);
-static int decode_integer_value (int, char **, LONGEST *);
-static char *match_simple_name_string (void);
-static void growbuf_by_size (int);
-static void parse_case_label (void);
-static void parse_untyped_expr (void);
-static void parse_if_expression (void);
-static void parse_if_expression_body (void);
-static void parse_else_alternative (void);
-static void parse_then_alternative (void);
-static void parse_expr (void);
-static void parse_operand0 (void);
-static void parse_operand1 (void);
-static void parse_operand2 (void);
-static void parse_operand3 (void);
-static void parse_operand4 (void);
-static void parse_operand5 (void);
-static void parse_operand6 (void);
-static void parse_primval (void);
-static void parse_tuple (struct type *);
-static void parse_opt_element_list (struct type *);
-static void parse_tuple_element (struct type *);
-static void parse_named_record_element (void);
-static void parse_call (void);
-static struct type *parse_mode_or_normal_call (void);
-#if 0
-static struct type *parse_mode_call (void);
-#endif
-static void parse_unary_call (void);
-static int parse_opt_untyped_expr (void);
-static int expect (enum ch_terminal, char *);
-static enum ch_terminal ch_lex (void);
-INLINE static enum ch_terminal PEEK_TOKEN (void);
-static enum ch_terminal peek_token_ (int);
-static void forward_token_ (void);
-static void require (enum ch_terminal);
-static int check_token (enum ch_terminal);
-
-#define MAX_LOOK_AHEAD 2
-static enum ch_terminal terminal_buffer[MAX_LOOK_AHEAD + 1] =
-{
- TOKEN_NOT_READ, TOKEN_NOT_READ, TOKEN_NOT_READ};
-static YYSTYPE yylval;
-static YYSTYPE val_buffer[MAX_LOOK_AHEAD + 1];
-
-/*int current_token, lookahead_token; */
-
-INLINE static enum ch_terminal
-PEEK_TOKEN (void)
-{
- if (terminal_buffer[0] == TOKEN_NOT_READ)
- {
- terminal_buffer[0] = ch_lex ();
- val_buffer[0] = yylval;
- }
- return terminal_buffer[0];
-}
-#define PEEK_LVAL() val_buffer[0]
-#define PEEK_TOKEN1() peek_token_(1)
-#define PEEK_TOKEN2() peek_token_(2)
-static enum ch_terminal
-peek_token_ (int i)
-{
- if (i > MAX_LOOK_AHEAD)
- internal_error (__FILE__, __LINE__,
- "too much lookahead");
- if (terminal_buffer[i] == TOKEN_NOT_READ)
- {
- terminal_buffer[i] = ch_lex ();
- val_buffer[i] = yylval;
- }
- return terminal_buffer[i];
-}
-
-#if 0
-
-static void
-pushback_token (enum ch_terminal code, YYSTYPE node)
-{
- int i;
- if (terminal_buffer[MAX_LOOK_AHEAD] != TOKEN_NOT_READ)
- internal_error (__FILE__, __LINE__,
- "cannot pushback token");
- for (i = MAX_LOOK_AHEAD; i > 0; i--)
- {
- terminal_buffer[i] = terminal_buffer[i - 1];
- val_buffer[i] = val_buffer[i - 1];
- }
- terminal_buffer[0] = code;
- val_buffer[0] = node;
-}
-
-#endif
-
-static void
-forward_token_ (void)
-{
- int i;
- for (i = 0; i < MAX_LOOK_AHEAD; i++)
- {
- terminal_buffer[i] = terminal_buffer[i + 1];
- val_buffer[i] = val_buffer[i + 1];
- }
- terminal_buffer[MAX_LOOK_AHEAD] = TOKEN_NOT_READ;
-}
-#define FORWARD_TOKEN() forward_token_()
-
-/* Skip the next token.
- if it isn't TOKEN, the parser is broken. */
-
-static void
-require (enum ch_terminal token)
-{
- if (PEEK_TOKEN () != token)
- {
- internal_error (__FILE__, __LINE__,
- "expected token %d", (int) token);
- }
- FORWARD_TOKEN ();
-}
-
-static int
-check_token (enum ch_terminal token)
-{
- if (PEEK_TOKEN () != token)
- return 0;
- FORWARD_TOKEN ();
- return 1;
-}
-
-/* return 0 if expected token was not found,
- else return 1.
- */
-static int
-expect (enum ch_terminal token, char *message)
-{
- if (PEEK_TOKEN () != token)
- {
- if (message)
- error (message);
- else if (token < 256)
- error ("syntax error - expected a '%c' here \"%s\"", token, lexptr);
- else
- error ("syntax error");
- return 0;
- }
- else
- FORWARD_TOKEN ();
- return 1;
-}
-
-#if 0
-/* Parse a name string. If ALLOW_ALL is 1, ALL is allowed as a postfix. */
-
-static tree
-parse_opt_name_string (int allow_all)
-{
- int token = PEEK_TOKEN ();
- tree name;
- if (token != NAME)
- {
- if (token == ALL && allow_all)
- {
- FORWARD_TOKEN ();
- return ALL_POSTFIX;
- }
- return NULL_TREE;
- }
- name = PEEK_LVAL ();
- for (;;)
- {
- FORWARD_TOKEN ();
- token = PEEK_TOKEN ();
- if (token != '!')
- return name;
- FORWARD_TOKEN ();
- token = PEEK_TOKEN ();
- if (token == ALL && allow_all)
- return get_identifier3 (IDENTIFIER_POINTER (name), "!", "*");
- if (token != NAME)
- {
- if (pass == 1)
- error ("'%s!' is not followed by an identifier",
- IDENTIFIER_POINTER (name));
- return name;
- }
- name = get_identifier3 (IDENTIFIER_POINTER (name),
- "!", IDENTIFIER_POINTER (PEEK_LVAL ()));
- }
-}
-
-static tree
-parse_simple_name_string (void)
-{
- int token = PEEK_TOKEN ();
- tree name;
- if (token != NAME)
- {
- error ("expected a name here");
- return error_mark_node;
- }
- name = PEEK_LVAL ();
- FORWARD_TOKEN ();
- return name;
-}
-
-static tree
-parse_name_string (void)
-{
- tree name = parse_opt_name_string (0);
- if (name)
- return name;
- if (pass == 1)
- error ("expected a name string here");
- return error_mark_node;
-}
-
-/* Matches: <name_string>
- Returns if pass 1: the identifier.
- Returns if pass 2: a decl or value for identifier. */
-
-static tree
-parse_name (void)
-{
- tree name = parse_name_string ();
- if (pass == 1 || ignoring)
- return name;
- else
- {
- tree decl = lookup_name (name);
- if (decl == NULL_TREE)
- {
- error ("`%s' undeclared", IDENTIFIER_POINTER (name));
- return error_mark_node;
- }
- else if (TREE_CODE (TREE_TYPE (decl)) == ERROR_MARK)
- return error_mark_node;
- else if (TREE_CODE (decl) == CONST_DECL)
- return DECL_INITIAL (decl);
- else if (TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE)
- return convert_from_reference (decl);
- else
- return decl;
- }
-}
-#endif
-
-#if 0
-static void
-pushback_paren_expr (tree expr)
-{
- if (pass == 1 && !ignoring)
- expr = build1 (PAREN_EXPR, NULL_TREE, expr);
- pushback_token (EXPR, expr);
-}
-#endif
-
-/* Matches: <case label> */
-
-static void
-parse_case_label (void)
-{
- if (check_token (ELSE))
- error ("ELSE in tuples labels not implemented");
- /* Does not handle the case of a mode name. FIXME */
- parse_expr ();
- if (check_token (':'))
- {
- parse_expr ();
- write_exp_elt_opcode (BINOP_RANGE);
- }
-}
-
-static int
-parse_opt_untyped_expr (void)
-{
- switch (PEEK_TOKEN ())
- {
- case ',':
- case ':':
- case ')':
- return 0;
- default:
- parse_untyped_expr ();
- return 1;
- }
-}
-
-static void
-parse_unary_call (void)
-{
- FORWARD_TOKEN ();
- expect ('(', NULL);
- parse_expr ();
- expect (')', NULL);
-}
-
-/* Parse NAME '(' MODENAME ')'. */
-
-#if 0
-
-static struct type *
-parse_mode_call (void)
-{
- struct type *type;
- FORWARD_TOKEN ();
- expect ('(', NULL);
- if (PEEK_TOKEN () != TYPENAME)
- error ("expect MODENAME here `%s'", lexptr);
- type = PEEK_LVAL ().tsym.type;
- FORWARD_TOKEN ();
- expect (')', NULL);
- return type;
-}
-
-#endif
-
-static struct type *
-parse_mode_or_normal_call (void)
-{
- struct type *type;
- FORWARD_TOKEN ();
- expect ('(', NULL);
- if (PEEK_TOKEN () == TYPENAME)
- {
- type = PEEK_LVAL ().tsym.type;
- FORWARD_TOKEN ();
- }
- else
- {
- parse_expr ();
- type = NULL;
- }
- expect (')', NULL);
- return type;
-}
-
-/* Parse something that looks like a function call.
- Assume we have parsed the function, and are at the '('. */
-
-static void
-parse_call (void)
-{
- int arg_count;
- require ('(');
- /* This is to save the value of arglist_len
- being accumulated for each dimension. */
- start_arglist ();
- if (parse_opt_untyped_expr ())
- {
- int tok = PEEK_TOKEN ();
- arglist_len = 1;
- if (tok == UP || tok == ':')
- {
- FORWARD_TOKEN ();
- parse_expr ();
- expect (')', "expected ')' to terminate slice");
- end_arglist ();
- write_exp_elt_opcode (tok == UP ? TERNOP_SLICE_COUNT
- : TERNOP_SLICE);
- return;
- }
- while (check_token (','))
- {
- parse_untyped_expr ();
- arglist_len++;
- }
- }
- else
- arglist_len = 0;
- expect (')', NULL);
- arg_count = end_arglist ();
- write_exp_elt_opcode (MULTI_SUBSCRIPT);
- write_exp_elt_longcst (arg_count);
- write_exp_elt_opcode (MULTI_SUBSCRIPT);
-}
-
-static void
-parse_named_record_element (void)
-{
- struct stoken label;
- char buf[256];
-
- label = PEEK_LVAL ().sval;
- sprintf (buf, "expected a field name here `%s'", lexptr);
- expect (DOT_FIELD_NAME, buf);
- if (check_token (','))
- parse_named_record_element ();
- else if (check_token (':'))
- parse_expr ();
- else
- error ("syntax error near `%s' in named record tuple element", lexptr);
- write_exp_elt_opcode (OP_LABELED);
- write_exp_string (label);
- write_exp_elt_opcode (OP_LABELED);
-}
-
-/* Returns one or more TREE_LIST nodes, in reverse order. */
-
-static void
-parse_tuple_element (struct type *type)
-{
- if (PEEK_TOKEN () == DOT_FIELD_NAME)
- {
- /* Parse a labelled structure tuple. */
- parse_named_record_element ();
- return;
- }
-
- if (check_token ('('))
- {
- if (check_token ('*'))
- {
- expect (')', "missing ')' after '*' case label list");
- if (type)
- {
- if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
- {
- /* do this as a range from low to high */
- struct type *range_type = TYPE_FIELD_TYPE (type, 0);
- LONGEST low_bound, high_bound;
- if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
- error ("cannot determine bounds for (*)");
- /* lower bound */
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (range_type);
- write_exp_elt_longcst (low_bound);
- write_exp_elt_opcode (OP_LONG);
- /* upper bound */
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (range_type);
- write_exp_elt_longcst (high_bound);
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_opcode (BINOP_RANGE);
- }
- else
- error ("(*) in invalid context");
- }
- else
- error ("(*) only possible with modename in front of tuple (mode[..])");
- }
- else
- {
- parse_case_label ();
- while (check_token (','))
- {
- parse_case_label ();
- write_exp_elt_opcode (BINOP_COMMA);
- }
- expect (')', NULL);
- }
- }
- else
- parse_untyped_expr ();
- if (check_token (':'))
- {
- /* A powerset range or a labeled Array. */
- parse_untyped_expr ();
- write_exp_elt_opcode (BINOP_RANGE);
- }
-}
-
-/* Matches: a COMMA-separated list of tuple elements.
- Returns a list (of TREE_LIST nodes). */
-static void
-parse_opt_element_list (struct type *type)
-{
- arglist_len = 0;
- if (PEEK_TOKEN () == ']')
- return;
- for (;;)
- {
- parse_tuple_element (type);
- arglist_len++;
- if (PEEK_TOKEN () == ']')
- break;
- if (!check_token (','))
- error ("bad syntax in tuple");
- }
-}
-
-/* Parses: '[' elements ']'
- If modename is non-NULL it prefixed the tuple. */
-
-static void
-parse_tuple (struct type *mode)
-{
- struct type *type;
- if (mode)
- type = check_typedef (mode);
- else
- type = 0;
- require ('[');
- start_arglist ();
- parse_opt_element_list (type);
- expect (']', "missing ']' after tuple");
- write_exp_elt_opcode (OP_ARRAY);
- write_exp_elt_longcst ((LONGEST) 0);
- write_exp_elt_longcst ((LONGEST) end_arglist () - 1);
- write_exp_elt_opcode (OP_ARRAY);
- if (type)
- {
- if (TYPE_CODE (type) != TYPE_CODE_ARRAY
- && TYPE_CODE (type) != TYPE_CODE_STRUCT
- && TYPE_CODE (type) != TYPE_CODE_SET)
- error ("invalid tuple mode");
- write_exp_elt_opcode (UNOP_CAST);
- write_exp_elt_type (mode);
- write_exp_elt_opcode (UNOP_CAST);
- }
-}
-
-static void
-parse_primval (void)
-{
- struct type *type;
- enum exp_opcode op;
- char *op_name;
- switch (PEEK_TOKEN ())
- {
- case INTEGER_LITERAL:
- case CHARACTER_LITERAL:
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (PEEK_LVAL ().typed_val.type);
- write_exp_elt_longcst (PEEK_LVAL ().typed_val.val);
- write_exp_elt_opcode (OP_LONG);
- FORWARD_TOKEN ();
- break;
- case BOOLEAN_LITERAL:
- write_exp_elt_opcode (OP_BOOL);
- write_exp_elt_longcst ((LONGEST) PEEK_LVAL ().ulval);
- write_exp_elt_opcode (OP_BOOL);
- FORWARD_TOKEN ();
- break;
- case FLOAT_LITERAL:
- write_exp_elt_opcode (OP_DOUBLE);
- write_exp_elt_type (builtin_type_double);
- write_exp_elt_dblcst (PEEK_LVAL ().dval);
- write_exp_elt_opcode (OP_DOUBLE);
- FORWARD_TOKEN ();
- break;
- case EMPTINESS_LITERAL:
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (lookup_pointer_type (builtin_type_void));
- write_exp_elt_longcst (0);
- write_exp_elt_opcode (OP_LONG);
- FORWARD_TOKEN ();
- break;
- case CHARACTER_STRING_LITERAL:
- write_exp_elt_opcode (OP_STRING);
- write_exp_string (PEEK_LVAL ().sval);
- write_exp_elt_opcode (OP_STRING);
- FORWARD_TOKEN ();
- break;
- case BIT_STRING_LITERAL:
- write_exp_elt_opcode (OP_BITSTRING);
- write_exp_bitstring (PEEK_LVAL ().sval);
- write_exp_elt_opcode (OP_BITSTRING);
- FORWARD_TOKEN ();
- break;
- case ARRAY:
- FORWARD_TOKEN ();
- /* This is pseudo-Chill, similar to C's '(TYPE[])EXPR'
- which casts to an artificial array. */
- expect ('(', NULL);
- expect (')', NULL);
- if (PEEK_TOKEN () != TYPENAME)
- error ("missing MODENAME after ARRAY()");
- type = PEEK_LVAL ().tsym.type;
- FORWARD_TOKEN ();
- expect ('(', NULL);
- parse_expr ();
- expect (')', "missing right parenthesis");
- type = create_array_type ((struct type *) NULL, type,
- create_range_type ((struct type *) NULL,
- builtin_type_int, 0, 0));
- TYPE_ARRAY_UPPER_BOUND_TYPE (type) = BOUND_CANNOT_BE_DETERMINED;
- write_exp_elt_opcode (UNOP_CAST);
- write_exp_elt_type (type);
- write_exp_elt_opcode (UNOP_CAST);
- break;
-#if 0
- case CONST:
- case EXPR:
- val = PEEK_LVAL ();
- FORWARD_TOKEN ();
- break;
-#endif
- case '(':
- FORWARD_TOKEN ();
- parse_expr ();
- expect (')', "missing right parenthesis");
- break;
- case '[':
- parse_tuple (NULL);
- break;
- case GENERAL_PROCEDURE_NAME:
- case LOCATION_NAME:
- write_exp_elt_opcode (OP_VAR_VALUE);
- write_exp_elt_block (NULL);
- write_exp_elt_sym (PEEK_LVAL ().ssym.sym);
- write_exp_elt_opcode (OP_VAR_VALUE);
- FORWARD_TOKEN ();
- break;
- case GDB_VARIABLE: /* gdb specific */
- FORWARD_TOKEN ();
- break;
- case NUM:
- parse_unary_call ();
- write_exp_elt_opcode (UNOP_CAST);
- write_exp_elt_type (builtin_type_int);
- write_exp_elt_opcode (UNOP_CAST);
- break;
- case CARD:
- parse_unary_call ();
- write_exp_elt_opcode (UNOP_CARD);
- break;
- case MAX_TOKEN:
- parse_unary_call ();
- write_exp_elt_opcode (UNOP_CHMAX);
- break;
- case MIN_TOKEN:
- parse_unary_call ();
- write_exp_elt_opcode (UNOP_CHMIN);
- break;
- case PRED:
- op_name = "PRED";
- goto unimplemented_unary_builtin;
- case SUCC:
- op_name = "SUCC";
- goto unimplemented_unary_builtin;
- case ABS:
- op_name = "ABS";
- goto unimplemented_unary_builtin;
- unimplemented_unary_builtin:
- parse_unary_call ();
- error ("not implemented: %s builtin function", op_name);
- break;
- case ADDR_TOKEN:
- parse_unary_call ();
- write_exp_elt_opcode (UNOP_ADDR);
- break;
- case SIZE:
- type = parse_mode_or_normal_call ();
- if (type)
- {
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (builtin_type_int);
- CHECK_TYPEDEF (type);
- write_exp_elt_longcst ((LONGEST) TYPE_LENGTH (type));
- write_exp_elt_opcode (OP_LONG);
- }
- else
- write_exp_elt_opcode (UNOP_SIZEOF);
- break;
- case LOWER:
- op = UNOP_LOWER;
- goto lower_upper;
- case UPPER:
- op = UNOP_UPPER;
- goto lower_upper;
- lower_upper:
- type = parse_mode_or_normal_call ();
- write_lower_upper_value (op, type);
- break;
- case LENGTH:
- parse_unary_call ();
- write_exp_elt_opcode (UNOP_LENGTH);
- break;
- case TYPENAME:
- type = PEEK_LVAL ().tsym.type;
- FORWARD_TOKEN ();
- switch (PEEK_TOKEN ())
- {
- case '[':
- parse_tuple (type);
- break;
- case '(':
- FORWARD_TOKEN ();
- parse_expr ();
- expect (')', "missing right parenthesis");
- write_exp_elt_opcode (UNOP_CAST);
- write_exp_elt_type (type);
- write_exp_elt_opcode (UNOP_CAST);
- break;
- default:
- error ("typename in invalid context");
- }
- break;
-
- default:
- error ("invalid expression syntax at `%s'", lexptr);
- }
- for (;;)
- {
- switch (PEEK_TOKEN ())
- {
- case DOT_FIELD_NAME:
- write_exp_elt_opcode (STRUCTOP_STRUCT);
- write_exp_string (PEEK_LVAL ().sval);
- write_exp_elt_opcode (STRUCTOP_STRUCT);
- FORWARD_TOKEN ();
- continue;
- case POINTER:
- FORWARD_TOKEN ();
- if (PEEK_TOKEN () == TYPENAME)
- {
- type = PEEK_LVAL ().tsym.type;
- write_exp_elt_opcode (UNOP_CAST);
- write_exp_elt_type (lookup_pointer_type (type));
- write_exp_elt_opcode (UNOP_CAST);
- FORWARD_TOKEN ();
- }
- write_exp_elt_opcode (UNOP_IND);
- continue;
- case OPEN_PAREN:
- parse_call ();
- continue;
- case CHARACTER_STRING_LITERAL:
- case CHARACTER_LITERAL:
- case BIT_STRING_LITERAL:
- /* Handle string repetition. (See comment in parse_operand5.) */
- parse_primval ();
- write_exp_elt_opcode (MULTI_SUBSCRIPT);
- write_exp_elt_longcst (1);
- write_exp_elt_opcode (MULTI_SUBSCRIPT);
- continue;
- case END_TOKEN:
- case TOKEN_NOT_READ:
- case INTEGER_LITERAL:
- case BOOLEAN_LITERAL:
- case FLOAT_LITERAL:
- case GENERAL_PROCEDURE_NAME:
- case LOCATION_NAME:
- case EMPTINESS_LITERAL:
- case TYPENAME:
- case CASE:
- case OF:
- case ESAC:
- case LOGIOR:
- case ORIF:
- case LOGXOR:
- case LOGAND:
- case ANDIF:
- case NOTEQUAL:
- case GEQ:
- case LEQ:
- case IN:
- case SLASH_SLASH:
- case MOD:
- case REM:
- case NOT:
- case RECEIVE:
- case UP:
- case IF:
- case THEN:
- case ELSE:
- case FI:
- case ELSIF:
- case ILLEGAL_TOKEN:
- case NUM:
- case PRED:
- case SUCC:
- case ABS:
- case CARD:
- case MAX_TOKEN:
- case MIN_TOKEN:
- case ADDR_TOKEN:
- case SIZE:
- case UPPER:
- case LOWER:
- case LENGTH:
- case ARRAY:
- case GDB_VARIABLE:
- case GDB_ASSIGNMENT:
- break;
- }
- break;
- }
- return;
-}
-
-static void
-parse_operand6 (void)
-{
- if (check_token (RECEIVE))
- {
- parse_primval ();
- error ("not implemented: RECEIVE expression");
- }
- else if (check_token (POINTER))
- {
- parse_primval ();
- write_exp_elt_opcode (UNOP_ADDR);
- }
- else
- parse_primval ();
-}
-
-static void
-parse_operand5 (void)
-{
- enum exp_opcode op;
- /* We are supposed to be looking for a <string repetition operator>,
- but in general we can't distinguish that from a parenthesized
- expression. This is especially difficult if we allow the
- string operand to be a constant expression (as requested by
- some users), and not just a string literal.
- Consider: LPRN expr RPRN LPRN expr RPRN
- Is that a function call or string repetition?
- Instead, we handle string repetition in parse_primval,
- and build_generalized_call. */
- switch (PEEK_TOKEN ())
- {
- case NOT:
- op = UNOP_LOGICAL_NOT;
- break;
- case '-':
- op = UNOP_NEG;
- break;
- default:
- op = OP_NULL;
- }
- if (op != OP_NULL)
- FORWARD_TOKEN ();
- parse_operand6 ();
- if (op != OP_NULL)
- write_exp_elt_opcode (op);
-}
-
-static void
-parse_operand4 (void)
-{
- enum exp_opcode op;
- parse_operand5 ();
- for (;;)
- {
- switch (PEEK_TOKEN ())
- {
- case '*':
- op = BINOP_MUL;
- break;
- case '/':
- op = BINOP_DIV;
- break;
- case MOD:
- op = BINOP_MOD;
- break;
- case REM:
- op = BINOP_REM;
- break;
- default:
- return;
- }
- FORWARD_TOKEN ();
- parse_operand5 ();
- write_exp_elt_opcode (op);
- }
-}
-
-static void
-parse_operand3 (void)
-{
- enum exp_opcode op;
- parse_operand4 ();
- for (;;)
- {
- switch (PEEK_TOKEN ())
- {
- case '+':
- op = BINOP_ADD;
- break;
- case '-':
- op = BINOP_SUB;
- break;
- case SLASH_SLASH:
- op = BINOP_CONCAT;
- break;
- default:
- return;
- }
- FORWARD_TOKEN ();
- parse_operand4 ();
- write_exp_elt_opcode (op);
- }
-}
-
-static void
-parse_operand2 (void)
-{
- enum exp_opcode op;
- parse_operand3 ();
- for (;;)
- {
- if (check_token (IN))
- {
- parse_operand3 ();
- write_exp_elt_opcode (BINOP_IN);
- }
- else
- {
- switch (PEEK_TOKEN ())
- {
- case '>':
- op = BINOP_GTR;
- break;
- case GEQ:
- op = BINOP_GEQ;
- break;
- case '<':
- op = BINOP_LESS;
- break;
- case LEQ:
- op = BINOP_LEQ;
- break;
- case '=':
- op = BINOP_EQUAL;
- break;
- case NOTEQUAL:
- op = BINOP_NOTEQUAL;
- break;
- default:
- return;
- }
- FORWARD_TOKEN ();
- parse_operand3 ();
- write_exp_elt_opcode (op);
- }
- }
-}
-
-static void
-parse_operand1 (void)
-{
- enum exp_opcode op;
- parse_operand2 ();
- for (;;)
- {
- switch (PEEK_TOKEN ())
- {
- case LOGAND:
- op = BINOP_BITWISE_AND;
- break;
- case ANDIF:
- op = BINOP_LOGICAL_AND;
- break;
- default:
- return;
- }
- FORWARD_TOKEN ();
- parse_operand2 ();
- write_exp_elt_opcode (op);
- }
-}
-
-static void
-parse_operand0 (void)
-{
- enum exp_opcode op;
- parse_operand1 ();
- for (;;)
- {
- switch (PEEK_TOKEN ())
- {
- case LOGIOR:
- op = BINOP_BITWISE_IOR;
- break;
- case LOGXOR:
- op = BINOP_BITWISE_XOR;
- break;
- case ORIF:
- op = BINOP_LOGICAL_OR;
- break;
- default:
- return;
- }
- FORWARD_TOKEN ();
- parse_operand1 ();
- write_exp_elt_opcode (op);
- }
-}
-
-static void
-parse_expr (void)
-{
- parse_operand0 ();
- if (check_token (GDB_ASSIGNMENT))
- {
- parse_expr ();
- write_exp_elt_opcode (BINOP_ASSIGN);
- }
-}
-
-static void
-parse_then_alternative (void)
-{
- expect (THEN, "missing 'THEN' in 'IF' expression");
- parse_expr ();
-}
-
-static void
-parse_else_alternative (void)
-{
- if (check_token (ELSIF))
- parse_if_expression_body ();
- else if (check_token (ELSE))
- parse_expr ();
- else
- error ("missing ELSE/ELSIF in IF expression");
-}
-
-/* Matches: <boolean expression> <then alternative> <else alternative> */
-
-static void
-parse_if_expression_body (void)
-{
- parse_expr ();
- parse_then_alternative ();
- parse_else_alternative ();
- write_exp_elt_opcode (TERNOP_COND);
-}
-
-static void
-parse_if_expression (void)
-{
- require (IF);
- parse_if_expression_body ();
- expect (FI, "missing 'FI' at end of conditional expression");
-}
-
-/* An <untyped_expr> is a superset of <expr>. It also includes
- <conditional expressions> and untyped <tuples>, whose types
- are not given by their constituents. Hence, these are only
- allowed in certain contexts that expect a certain type.
- You should call convert() to fix up the <untyped_expr>. */
-
-static void
-parse_untyped_expr (void)
-{
- switch (PEEK_TOKEN ())
- {
- case IF:
- parse_if_expression ();
- return;
- case CASE:
- error ("not implemented: CASE expression");
- case '(':
- switch (PEEK_TOKEN1 ())
- {
- case IF:
- case CASE:
- goto skip_lprn;
- case '[':
- skip_lprn:
- FORWARD_TOKEN ();
- parse_untyped_expr ();
- expect (')', "missing ')'");
- return;
- default:;
- /* fall through */
- }
- default:
- parse_operand0 ();
- }
-}
-
-int
-chill_parse (void)
-{
- terminal_buffer[0] = TOKEN_NOT_READ;
- if (PEEK_TOKEN () == TYPENAME && PEEK_TOKEN1 () == END_TOKEN)
- {
- write_exp_elt_opcode (OP_TYPE);
- write_exp_elt_type (PEEK_LVAL ().tsym.type);
- write_exp_elt_opcode (OP_TYPE);
- FORWARD_TOKEN ();
- }
- else
- parse_expr ();
- if (terminal_buffer[0] != END_TOKEN)
- {
- if (comma_terminates && terminal_buffer[0] == ',')
- lexptr--; /* Put the comma back. */
- else
- error ("Junk after end of expression.");
- }
- return 0;
-}
-
-
-/* Implementation of a dynamically expandable buffer for processing input
- characters acquired through lexptr and building a value to return in
- yylval. */
-
-static char *tempbuf; /* Current buffer contents */
-static int tempbufsize; /* Size of allocated buffer */
-static int tempbufindex; /* Current index into buffer */
-
-#define GROWBY_MIN_SIZE 64 /* Minimum amount to grow buffer by */
-
-#define CHECKBUF(size) \
- do { \
- if (tempbufindex + (size) >= tempbufsize) \
- { \
- growbuf_by_size (size); \
- } \
- } while (0);
-
-/* Grow the static temp buffer if necessary, including allocating the first one
- on demand. */
-
-static void
-growbuf_by_size (int count)
-{
- int growby;
-
- growby = max (count, GROWBY_MIN_SIZE);
- tempbufsize += growby;
- if (tempbuf == NULL)
- {
- tempbuf = (char *) xmalloc (tempbufsize);
- }
- else
- {
- tempbuf = (char *) xrealloc (tempbuf, tempbufsize);
- }
-}
-
-/* Try to consume a simple name string token. If successful, returns
- a pointer to a nullbyte terminated copy of the name that can be used
- in symbol table lookups. If not successful, returns NULL. */
-
-static char *
-match_simple_name_string (void)
-{
- char *tokptr = lexptr;
-
- if (isalpha (*tokptr) || *tokptr == '_')
- {
- char *result;
- do
- {
- tokptr++;
- }
- while (isalnum (*tokptr) || (*tokptr == '_'));
- yylval.sval.ptr = lexptr;
- yylval.sval.length = tokptr - lexptr;
- lexptr = tokptr;
- result = copy_name (yylval.sval);
- return result;
- }
- return (NULL);
-}
-
-/* Start looking for a value composed of valid digits as set by the base
- in use. Note that '_' characters are valid anywhere, in any quantity,
- and are simply ignored. Since we must find at least one valid digit,
- or reject this token as an integer literal, we keep track of how many
- digits we have encountered. */
-
-static int
-decode_integer_value (int base, char **tokptrptr, LONGEST *ivalptr)
-{
- char *tokptr = *tokptrptr;
- int temp;
- int digits = 0;
-
- while (*tokptr != '\0')
- {
- temp = *tokptr;
- if (isupper (temp))
- temp = tolower (temp);
- tokptr++;
- switch (temp)
- {
- case '_':
- continue;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- temp -= '0';
- break;
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- temp -= 'a';
- temp += 10;
- break;
- default:
- temp = base;
- break;
- }
- if (temp < base)
- {
- digits++;
- *ivalptr *= base;
- *ivalptr += temp;
- }
- else
- {
- /* Found something not in domain for current base. */
- tokptr--; /* Unconsume what gave us indigestion. */
- break;
- }
- }
-
- /* If we didn't find any digits, then we don't have a valid integer
- value, so reject the entire token. Otherwise, update the lexical
- scan pointer, and return non-zero for success. */
-
- if (digits == 0)
- {
- return (0);
- }
- else
- {
- *tokptrptr = tokptr;
- return (1);
- }
-}
-
-static int
-decode_integer_literal (LONGEST *valptr, char **tokptrptr)
-{
- char *tokptr = *tokptrptr;
- int base = 0;
- LONGEST ival = 0;
- int explicit_base = 0;
-
- /* Look for an explicit base specifier, which is optional. */
-
- switch (*tokptr)
- {
- case 'd':
- case 'D':
- explicit_base++;
- base = 10;
- tokptr++;
- break;
- case 'b':
- case 'B':
- explicit_base++;
- base = 2;
- tokptr++;
- break;
- case 'h':
- case 'H':
- explicit_base++;
- base = 16;
- tokptr++;
- break;
- case 'o':
- case 'O':
- explicit_base++;
- base = 8;
- tokptr++;
- break;
- default:
- base = 10;
- break;
- }
-
- /* If we found an explicit base ensure that the character after the
- explicit base is a single quote. */
-
- if (explicit_base && (*tokptr++ != '\''))
- {
- return (0);
- }
-
- /* Attempt to decode whatever follows as an integer value in the
- indicated base, updating the token pointer in the process and
- computing the value into ival. Also, if we have an explicit
- base, then the next character must not be a single quote, or we
- have a bitstring literal, so reject the entire token in this case.
- Otherwise, update the lexical scan pointer, and return non-zero
- for success. */
-
- if (!decode_integer_value (base, &tokptr, &ival))
- {
- return (0);
- }
- else if (explicit_base && (*tokptr == '\''))
- {
- return (0);
- }
- else
- {
- *valptr = ival;
- *tokptrptr = tokptr;
- return (1);
- }
-}
-
-/* If it wasn't for the fact that floating point values can contain '_'
- characters, we could just let strtod do all the hard work by letting it
- try to consume as much of the current token buffer as possible and
- find a legal conversion. Unfortunately we need to filter out the '_'
- characters before calling strtod, which we do by copying the other
- legal chars to a local buffer to be converted. However since we also
- need to keep track of where the last unconsumed character in the input
- buffer is, we have transfer only as many characters as may compose a
- legal floating point value. */
-
-static enum ch_terminal
-match_float_literal (void)
-{
- char *tokptr = lexptr;
- char *buf;
- char *copy;
- double dval;
- extern double strtod ();
-
- /* Make local buffer in which to build the string to convert. This is
- required because underscores are valid in chill floating point numbers
- but not in the string passed to strtod to convert. The string will be
- no longer than our input string. */
-
- copy = buf = (char *) alloca (strlen (tokptr) + 1);
-
- /* Transfer all leading digits to the conversion buffer, discarding any
- underscores. */
-
- while (isdigit (*tokptr) || *tokptr == '_')
- {
- if (*tokptr != '_')
- {
- *copy++ = *tokptr;
- }
- tokptr++;
- }
-
- /* Now accept either a '.', or one of [eEdD]. Dot is legal regardless
- of whether we found any leading digits, and we simply accept it and
- continue on to look for the fractional part and/or exponent. One of
- [eEdD] is legal only if we have seen digits, and means that there
- is no fractional part. If we find neither of these, then this is
- not a floating point number, so return failure. */
-
- switch (*tokptr++)
- {
- case '.':
- /* Accept and then look for fractional part and/or exponent. */
- *copy++ = '.';
- break;
-
- case 'e':
- case 'E':
- case 'd':
- case 'D':
- if (copy == buf)
- {
- return (0);
- }
- *copy++ = 'e';
- goto collect_exponent;
- break;
-
- default:
- return (0);
- break;
- }
-
- /* We found a '.', copy any fractional digits to the conversion buffer, up
- to the first nondigit, non-underscore character. */
-
- while (isdigit (*tokptr) || *tokptr == '_')
- {
- if (*tokptr != '_')
- {
- *copy++ = *tokptr;
- }
- tokptr++;
- }
-
- /* Look for an exponent, which must start with one of [eEdD]. If none
- is found, jump directly to trying to convert what we have collected
- so far. */
-
- switch (*tokptr)
- {
- case 'e':
- case 'E':
- case 'd':
- case 'D':
- *copy++ = 'e';
- tokptr++;
- break;
- default:
- goto convert_float;
- break;
- }
-
- /* Accept an optional '-' or '+' following one of [eEdD]. */
-
-collect_exponent:
- if (*tokptr == '+' || *tokptr == '-')
- {
- *copy++ = *tokptr++;
- }
-
- /* Now copy an exponent into the conversion buffer. Note that at the
- moment underscores are *not* allowed in exponents. */
-
- while (isdigit (*tokptr))
- {
- *copy++ = *tokptr++;
- }
-
- /* If we transfered any chars to the conversion buffer, try to interpret its
- contents as a floating point value. If any characters remain, then we
- must not have a valid floating point string. */
-
-convert_float:
- *copy = '\0';
- if (copy != buf)
- {
- dval = strtod (buf, ©);
- if (*copy == '\0')
- {
- yylval.dval = dval;
- lexptr = tokptr;
- return (FLOAT_LITERAL);
- }
- }
- return (0);
-}
-
-/* Recognize a string literal. A string literal is a sequence
- of characters enclosed in matching single or double quotes, except that
- a single character inside single quotes is a character literal, which
- we reject as a string literal. To embed the terminator character inside
- a string, it is simply doubled (I.E. "this""is""one""string") */
-
-static enum ch_terminal
-match_string_literal (void)
-{
- char *tokptr = lexptr;
- int in_ctrlseq = 0;
- LONGEST ival;
-
- for (tempbufindex = 0, tokptr++; *tokptr != '\0'; tokptr++)
- {
- CHECKBUF (1);
- tryagain:;
- if (in_ctrlseq)
- {
- /* skip possible whitespaces */
- while ((*tokptr == ' ' || *tokptr == '\t') && *tokptr)
- tokptr++;
- if (*tokptr == ')')
- {
- in_ctrlseq = 0;
- tokptr++;
- goto tryagain;
- }
- else if (*tokptr != ',')
- error ("Invalid control sequence");
- tokptr++;
- /* skip possible whitespaces */
- while ((*tokptr == ' ' || *tokptr == '\t') && *tokptr)
- tokptr++;
- if (!decode_integer_literal (&ival, &tokptr))
- error ("Invalid control sequence");
- tokptr--;
- }
- else if (*tokptr == *lexptr)
- {
- if (*(tokptr + 1) == *lexptr)
- {
- ival = *tokptr++;
- }
- else
- {
- break;
- }
- }
- else if (*tokptr == '^')
- {
- if (*(tokptr + 1) == '(')
- {
- in_ctrlseq = 1;
- tokptr += 2;
- if (!decode_integer_literal (&ival, &tokptr))
- error ("Invalid control sequence");
- tokptr--;
- }
- else if (*(tokptr + 1) == '^')
- ival = *tokptr++;
- else
- error ("Invalid control sequence");
- }
- else
- ival = *tokptr;
- tempbuf[tempbufindex++] = ival;
- }
- if (in_ctrlseq)
- error ("Invalid control sequence");
-
- if (*tokptr == '\0' /* no terminator */
- || (tempbufindex == 1 && *tokptr == '\'')) /* char literal */
- {
- return (0);
- }
- else
- {
- tempbuf[tempbufindex] = '\0';
- yylval.sval.ptr = tempbuf;
- yylval.sval.length = tempbufindex;
- lexptr = ++tokptr;
- return (CHARACTER_STRING_LITERAL);
- }
-}
-
-/* Recognize a character literal. A character literal is single character
- or a control sequence, enclosed in single quotes. A control sequence
- is a comma separated list of one or more integer literals, enclosed
- in parenthesis and introduced with a circumflex character.
-
- EX: 'a' '^(7)' '^(7,8)'
-
- As a GNU chill extension, the syntax C'xx' is also recognized as a
- character literal, where xx is a hex value for the character.
-
- Note that more than a single character, enclosed in single quotes, is
- a string literal.
-
- Returns CHARACTER_LITERAL if a match is found.
- */
-
-static enum ch_terminal
-match_character_literal (void)
-{
- char *tokptr = lexptr;
- LONGEST ival = 0;
-
- if ((*tokptr == 'c' || *tokptr == 'C') && (*(tokptr + 1) == '\''))
- {
- /* We have a GNU chill extension form, so skip the leading "C'",
- decode the hex value, and then ensure that we have a trailing
- single quote character. */
- tokptr += 2;
- if (!decode_integer_value (16, &tokptr, &ival) || (*tokptr != '\''))
- {
- return (0);
- }
- tokptr++;
- }
- else if (*tokptr == '\'')
- {
- tokptr++;
-
- /* Determine which form we have, either a control sequence or the
- single character form. */
-
- if (*tokptr == '^')
- {
- if (*(tokptr + 1) == '(')
- {
- /* Match and decode a control sequence. Return zero if we don't
- find a valid integer literal, or if the next unconsumed character
- after the integer literal is not the trailing ')'. */
- tokptr += 2;
- if (!decode_integer_literal (&ival, &tokptr) || (*tokptr++ != ')'))
- {
- return (0);
- }
- }
- else if (*(tokptr + 1) == '^')
- {
- ival = *tokptr;
- tokptr += 2;
- }
- else
- /* fail */
- error ("Invalid control sequence");
- }
- else if (*tokptr == '\'')
- {
- /* this must be duplicated */
- ival = *tokptr;
- tokptr += 2;
- }
- else
- {
- ival = *tokptr++;
- }
-
- /* The trailing quote has not yet been consumed. If we don't find
- it, then we have no match. */
-
- if (*tokptr++ != '\'')
- {
- return (0);
- }
- }
- else
- {
- /* Not a character literal. */
- return (0);
- }
- yylval.typed_val.val = ival;
- yylval.typed_val.type = builtin_type_chill_char;
- lexptr = tokptr;
- return (CHARACTER_LITERAL);
-}
-
-/* Recognize an integer literal, as specified in Z.200 sec 5.2.4.2.
- Note that according to 5.2.4.2, a single "_" is also a valid integer
- literal, however GNU-chill requires there to be at least one "digit"
- in any integer literal. */
-
-static enum ch_terminal
-match_integer_literal (void)
-{
- char *tokptr = lexptr;
- LONGEST ival;
-
- if (!decode_integer_literal (&ival, &tokptr))
- {
- return (0);
- }
- else
- {
- yylval.typed_val.val = ival;
-#if defined(CC_HAS_LONG_LONG)
- if (ival > (LONGEST) 2147483647U || ival < -(LONGEST) 2147483648U)
- yylval.typed_val.type = builtin_type_long_long;
- else
-#endif
- yylval.typed_val.type = builtin_type_int;
- lexptr = tokptr;
- return (INTEGER_LITERAL);
- }
-}
-
-/* Recognize a bit-string literal, as specified in Z.200 sec 5.2.4.8
- Note that according to 5.2.4.8, a single "_" is also a valid bit-string
- literal, however GNU-chill requires there to be at least one "digit"
- in any bit-string literal. */
-
-static enum ch_terminal
-match_bitstring_literal (void)
-{
- register char *tokptr = lexptr;
- int bitoffset = 0;
- int bitcount = 0;
- int bits_per_char;
- int digit;
-
- tempbufindex = 0;
- CHECKBUF (1);
- tempbuf[0] = 0;
-
- /* Look for the required explicit base specifier. */
-
- switch (*tokptr++)
- {
- case 'b':
- case 'B':
- bits_per_char = 1;
- break;
- case 'o':
- case 'O':
- bits_per_char = 3;
- break;
- case 'h':
- case 'H':
- bits_per_char = 4;
- break;
- default:
- return (0);
- break;
- }
-
- /* Ensure that the character after the explicit base is a single quote. */
-
- if (*tokptr++ != '\'')
- {
- return (0);
- }
-
- while (*tokptr != '\0' && *tokptr != '\'')
- {
- digit = *tokptr;
- if (isupper (digit))
- digit = tolower (digit);
- tokptr++;
- switch (digit)
- {
- case '_':
- continue;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- digit -= '0';
- break;
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- digit -= 'a';
- digit += 10;
- break;
- default:
- /* this is not a bitstring literal, probably an integer */
- return 0;
- }
- if (digit >= 1 << bits_per_char)
- {
- /* Found something not in domain for current base. */
- error ("Too-large digit in bitstring or integer.");
- }
- else
- {
- /* Extract bits from digit, packing them into the bitstring byte. */
- int k = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? bits_per_char - 1 : 0;
- for (; TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k >= 0 : k < bits_per_char;
- TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k-- : k++)
- {
- bitcount++;
- if (digit & (1 << k))
- {
- tempbuf[tempbufindex] |=
- (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- ? (1 << (HOST_CHAR_BIT - 1 - bitoffset))
- : (1 << bitoffset);
- }
- bitoffset++;
- if (bitoffset == HOST_CHAR_BIT)
- {
- bitoffset = 0;
- tempbufindex++;
- CHECKBUF (1);
- tempbuf[tempbufindex] = 0;
- }
- }
- }
- }
-
- /* Verify that we consumed everything up to the trailing single quote,
- and that we found some bits (IE not just underbars). */
-
- if (*tokptr++ != '\'')
- {
- return (0);
- }
- else
- {
- yylval.sval.ptr = tempbuf;
- yylval.sval.length = bitcount;
- lexptr = tokptr;
- return (BIT_STRING_LITERAL);
- }
-}
-
-struct token
-{
- char *operator;
- int token;
-};
-
-static const struct token idtokentab[] =
-{
- {"array", ARRAY},
- {"length", LENGTH},
- {"lower", LOWER},
- {"upper", UPPER},
- {"andif", ANDIF},
- {"pred", PRED},
- {"succ", SUCC},
- {"card", CARD},
- {"size", SIZE},
- {"orif", ORIF},
- {"num", NUM},
- {"abs", ABS},
- {"max", MAX_TOKEN},
- {"min", MIN_TOKEN},
- {"mod", MOD},
- {"rem", REM},
- {"not", NOT},
- {"xor", LOGXOR},
- {"and", LOGAND},
- {"in", IN},
- {"or", LOGIOR},
- {"up", UP},
- {"addr", ADDR_TOKEN},
- {"null", EMPTINESS_LITERAL}
-};
-
-static const struct token tokentab2[] =
-{
- {":=", GDB_ASSIGNMENT},
- {"//", SLASH_SLASH},
- {"->", POINTER},
- {"/=", NOTEQUAL},
- {"<=", LEQ},
- {">=", GEQ}
-};
-
-/* Read one token, getting characters through lexptr. */
-/* This is where we will check to make sure that the language and the
- operators used are compatible. */
-
-static enum ch_terminal
-ch_lex (void)
-{
- unsigned int i;
- enum ch_terminal token;
- char *inputname;
- struct symbol *sym;
-
- /* Skip over any leading whitespace. */
- while (isspace (*lexptr))
- {
- lexptr++;
- }
- /* Look for special single character cases which can't be the first
- character of some other multicharacter token. */
- switch (*lexptr)
- {
- case '\0':
- return END_TOKEN;
- case ',':
- case '=':
- case ';':
- case '!':
- case '+':
- case '*':
- case '(':
- case ')':
- case '[':
- case ']':
- return (*lexptr++);
- }
- /* Look for characters which start a particular kind of multicharacter
- token, such as a character literal, register name, convenience
- variable name, string literal, etc. */
- switch (*lexptr)
- {
- case '\'':
- case '\"':
- /* First try to match a string literal, which is any
- sequence of characters enclosed in matching single or double
- quotes, except that a single character inside single quotes
- is a character literal, so we have to catch that case also. */
- token = match_string_literal ();
- if (token != 0)
- {
- return (token);
- }
- if (*lexptr == '\'')
- {
- token = match_character_literal ();
- if (token != 0)
- {
- return (token);
- }
- }
- break;
- case 'C':
- case 'c':
- token = match_character_literal ();
- if (token != 0)
- {
- return (token);
- }
- break;
- case '$':
- yylval.sval.ptr = lexptr;
- do
- {
- lexptr++;
- }
- while (isalnum (*lexptr) || *lexptr == '_' || *lexptr == '$');
- yylval.sval.length = lexptr - yylval.sval.ptr;
- write_dollar_variable (yylval.sval);
- return GDB_VARIABLE;
- break;
- }
- /* See if it is a special token of length 2. */
- for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
- {
- if (STREQN (lexptr, tokentab2[i].operator, 2))
- {
- lexptr += 2;
- return (tokentab2[i].token);
- }
- }
- /* Look for single character cases which which could be the first
- character of some other multicharacter token, but aren't, or we
- would already have found it. */
- switch (*lexptr)
- {
- case '-':
- case ':':
- case '/':
- case '<':
- case '>':
- return (*lexptr++);
- }
- /* Look for a float literal before looking for an integer literal, so
- we match as much of the input stream as possible. */
- token = match_float_literal ();
- if (token != 0)
- {
- return (token);
- }
- token = match_bitstring_literal ();
- if (token != 0)
- {
- return (token);
- }
- token = match_integer_literal ();
- if (token != 0)
- {
- return (token);
- }
-
- /* Try to match a simple name string, and if a match is found, then
- further classify what sort of name it is and return an appropriate
- token. Note that attempting to match a simple name string consumes
- the token from lexptr, so we can't back out if we later find that
- we can't classify what sort of name it is. */
-
- inputname = match_simple_name_string ();
-
- if (inputname != NULL)
- {
- char *simplename = (char *) alloca (strlen (inputname) + 1);
-
- char *dptr = simplename, *sptr = inputname;
- for (; *sptr; sptr++)
- *dptr++ = isupper (*sptr) ? tolower (*sptr) : *sptr;
- *dptr = '\0';
-
- /* See if it is a reserved identifier. */
- for (i = 0; i < sizeof (idtokentab) / sizeof (idtokentab[0]); i++)
- {
- if (STREQ (simplename, idtokentab[i].operator))
- {
- return (idtokentab[i].token);
- }
- }
-
- /* Look for other special tokens. */
- if (STREQ (simplename, "true"))
- {
- yylval.ulval = 1;
- return (BOOLEAN_LITERAL);
- }
- if (STREQ (simplename, "false"))
- {
- yylval.ulval = 0;
- return (BOOLEAN_LITERAL);
- }
-
- sym = lookup_symbol (inputname, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL);
- if (sym == NULL && strcmp (inputname, simplename) != 0)
- {
- sym = lookup_symbol (simplename, expression_context_block,
- VAR_NAMESPACE, (int *) NULL,
- (struct symtab **) NULL);
- }
- if (sym != NULL)
- {
- yylval.ssym.stoken.ptr = NULL;
- yylval.ssym.stoken.length = 0;
- yylval.ssym.sym = sym;
- yylval.ssym.is_a_field_of_this = 0; /* FIXME, C++'ism */
- switch (SYMBOL_CLASS (sym))
- {
- case LOC_BLOCK:
- /* Found a procedure name. */
- return (GENERAL_PROCEDURE_NAME);
- case LOC_STATIC:
- /* Found a global or local static variable. */
- return (LOCATION_NAME);
- case LOC_REGISTER:
- case LOC_ARG:
- case LOC_REF_ARG:
- case LOC_REGPARM:
- case LOC_REGPARM_ADDR:
- case LOC_LOCAL:
- case LOC_LOCAL_ARG:
- case LOC_BASEREG:
- case LOC_BASEREG_ARG:
- if (innermost_block == NULL
- || contained_in (block_found, innermost_block))
- {
- innermost_block = block_found;
- }
- return (LOCATION_NAME);
- break;
- case LOC_CONST:
- case LOC_LABEL:
- return (LOCATION_NAME);
- break;
- case LOC_TYPEDEF:
- yylval.tsym.type = SYMBOL_TYPE (sym);
- return TYPENAME;
- case LOC_UNDEF:
- case LOC_CONST_BYTES:
- case LOC_OPTIMIZED_OUT:
- error ("Symbol \"%s\" names no location.", inputname);
- break;
- default:
- internal_error (__FILE__, __LINE__,
- "unhandled SYMBOL_CLASS in ch_lex()");
- break;
- }
- }
- else if (!have_full_symbols () && !have_partial_symbols ())
- {
- error ("No symbol table is loaded. Use the \"file\" command.");
- }
- else
- {
- error ("No symbol \"%s\" in current context.", inputname);
- }
- }
-
- /* Catch single character tokens which are not part of some
- longer token. */
-
- switch (*lexptr)
- {
- case '.': /* Not float for example. */
- lexptr++;
- while (isspace (*lexptr))
- lexptr++;
- inputname = match_simple_name_string ();
- if (!inputname)
- return '.';
- return DOT_FIELD_NAME;
- }
-
- return (ILLEGAL_TOKEN);
-}
-
-static void
-write_lower_upper_value (enum exp_opcode opcode, /* Either UNOP_LOWER or UNOP_UPPER */
- struct type *type)
-{
- if (type == NULL)
- write_exp_elt_opcode (opcode);
- else
- {
- struct type *result_type;
- LONGEST val = type_lower_upper (opcode, type, &result_type);
- write_exp_elt_opcode (OP_LONG);
- write_exp_elt_type (result_type);
- write_exp_elt_longcst (val);
- write_exp_elt_opcode (OP_LONG);
- }
-}
-
-void
-chill_error (char *msg)
-{
- /* Never used. */
-}
+// OBSOLETE /* Parser for GNU CHILL (CCITT High-Level Language) -*- C -*-
+// OBSOLETE Copyright 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Parse a Chill expression from text in a string,
+// OBSOLETE and return the result as a struct expression pointer.
+// OBSOLETE That structure contains arithmetic operations in reverse polish,
+// OBSOLETE with constants represented by operations that are followed by special data.
+// OBSOLETE See expression.h for the details of the format.
+// OBSOLETE What is important here is that it can be built up sequentially
+// OBSOLETE during the process of parsing; the lower levels of the tree always
+// OBSOLETE come first in the result.
+// OBSOLETE
+// OBSOLETE Note that the language accepted by this parser is more liberal
+// OBSOLETE than the one accepted by an actual Chill compiler. For example, the
+// OBSOLETE language rule that a simple name string can not be one of the reserved
+// OBSOLETE simple name strings is not enforced (e.g "case" is not treated as a
+// OBSOLETE reserved name). Another example is that Chill is a strongly typed
+// OBSOLETE language, and certain expressions that violate the type constraints
+// OBSOLETE may still be evaluated if gdb can do so in a meaningful manner, while
+// OBSOLETE such expressions would be rejected by the compiler. The reason for
+// OBSOLETE this more liberal behavior is the philosophy that the debugger
+// OBSOLETE is intended to be a tool that is used by the programmer when things
+// OBSOLETE go wrong, and as such, it should provide as few artificial barriers
+// OBSOLETE to it's use as possible. If it can do something meaningful, even
+// OBSOLETE something that violates language contraints that are enforced by the
+// OBSOLETE compiler, it should do so without complaint.
+// OBSOLETE
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE #include <ctype.h>
+// OBSOLETE #include "expression.h"
+// OBSOLETE #include "language.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "parser-defs.h"
+// OBSOLETE #include "ch-lang.h"
+// OBSOLETE #include "bfd.h" /* Required by objfiles.h. */
+// OBSOLETE #include "symfile.h" /* Required by objfiles.h. */
+// OBSOLETE #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
+// OBSOLETE
+// OBSOLETE #ifdef __GNUC__
+// OBSOLETE #define INLINE __inline__
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE typedef union
+// OBSOLETE
+// OBSOLETE {
+// OBSOLETE LONGEST lval;
+// OBSOLETE ULONGEST ulval;
+// OBSOLETE struct
+// OBSOLETE {
+// OBSOLETE LONGEST val;
+// OBSOLETE struct type *type;
+// OBSOLETE }
+// OBSOLETE typed_val;
+// OBSOLETE double dval;
+// OBSOLETE struct symbol *sym;
+// OBSOLETE struct type *tval;
+// OBSOLETE struct stoken sval;
+// OBSOLETE struct ttype tsym;
+// OBSOLETE struct symtoken ssym;
+// OBSOLETE }
+// OBSOLETE YYSTYPE;
+// OBSOLETE
+// OBSOLETE enum ch_terminal
+// OBSOLETE {
+// OBSOLETE END_TOKEN = 0,
+// OBSOLETE /* '\001' ... '\xff' come first. */
+// OBSOLETE OPEN_PAREN = '(',
+// OBSOLETE TOKEN_NOT_READ = 999,
+// OBSOLETE INTEGER_LITERAL,
+// OBSOLETE BOOLEAN_LITERAL,
+// OBSOLETE CHARACTER_LITERAL,
+// OBSOLETE FLOAT_LITERAL,
+// OBSOLETE GENERAL_PROCEDURE_NAME,
+// OBSOLETE LOCATION_NAME,
+// OBSOLETE EMPTINESS_LITERAL,
+// OBSOLETE CHARACTER_STRING_LITERAL,
+// OBSOLETE BIT_STRING_LITERAL,
+// OBSOLETE TYPENAME,
+// OBSOLETE DOT_FIELD_NAME, /* '.' followed by <field name> */
+// OBSOLETE CASE,
+// OBSOLETE OF,
+// OBSOLETE ESAC,
+// OBSOLETE LOGIOR,
+// OBSOLETE ORIF,
+// OBSOLETE LOGXOR,
+// OBSOLETE LOGAND,
+// OBSOLETE ANDIF,
+// OBSOLETE NOTEQUAL,
+// OBSOLETE GEQ,
+// OBSOLETE LEQ,
+// OBSOLETE IN,
+// OBSOLETE SLASH_SLASH,
+// OBSOLETE MOD,
+// OBSOLETE REM,
+// OBSOLETE NOT,
+// OBSOLETE POINTER,
+// OBSOLETE RECEIVE,
+// OBSOLETE UP,
+// OBSOLETE IF,
+// OBSOLETE THEN,
+// OBSOLETE ELSE,
+// OBSOLETE FI,
+// OBSOLETE ELSIF,
+// OBSOLETE ILLEGAL_TOKEN,
+// OBSOLETE NUM,
+// OBSOLETE PRED,
+// OBSOLETE SUCC,
+// OBSOLETE ABS,
+// OBSOLETE CARD,
+// OBSOLETE MAX_TOKEN,
+// OBSOLETE MIN_TOKEN,
+// OBSOLETE ADDR_TOKEN,
+// OBSOLETE SIZE,
+// OBSOLETE UPPER,
+// OBSOLETE LOWER,
+// OBSOLETE LENGTH,
+// OBSOLETE ARRAY,
+// OBSOLETE GDB_VARIABLE,
+// OBSOLETE GDB_ASSIGNMENT
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE /* Forward declarations. */
+// OBSOLETE
+// OBSOLETE static void write_lower_upper_value (enum exp_opcode, struct type *);
+// OBSOLETE static enum ch_terminal match_bitstring_literal (void);
+// OBSOLETE static enum ch_terminal match_integer_literal (void);
+// OBSOLETE static enum ch_terminal match_character_literal (void);
+// OBSOLETE static enum ch_terminal match_string_literal (void);
+// OBSOLETE static enum ch_terminal match_float_literal (void);
+// OBSOLETE static int decode_integer_literal (LONGEST *, char **);
+// OBSOLETE static int decode_integer_value (int, char **, LONGEST *);
+// OBSOLETE static char *match_simple_name_string (void);
+// OBSOLETE static void growbuf_by_size (int);
+// OBSOLETE static void parse_case_label (void);
+// OBSOLETE static void parse_untyped_expr (void);
+// OBSOLETE static void parse_if_expression (void);
+// OBSOLETE static void parse_if_expression_body (void);
+// OBSOLETE static void parse_else_alternative (void);
+// OBSOLETE static void parse_then_alternative (void);
+// OBSOLETE static void parse_expr (void);
+// OBSOLETE static void parse_operand0 (void);
+// OBSOLETE static void parse_operand1 (void);
+// OBSOLETE static void parse_operand2 (void);
+// OBSOLETE static void parse_operand3 (void);
+// OBSOLETE static void parse_operand4 (void);
+// OBSOLETE static void parse_operand5 (void);
+// OBSOLETE static void parse_operand6 (void);
+// OBSOLETE static void parse_primval (void);
+// OBSOLETE static void parse_tuple (struct type *);
+// OBSOLETE static void parse_opt_element_list (struct type *);
+// OBSOLETE static void parse_tuple_element (struct type *);
+// OBSOLETE static void parse_named_record_element (void);
+// OBSOLETE static void parse_call (void);
+// OBSOLETE static struct type *parse_mode_or_normal_call (void);
+// OBSOLETE #if 0
+// OBSOLETE static struct type *parse_mode_call (void);
+// OBSOLETE #endif
+// OBSOLETE static void parse_unary_call (void);
+// OBSOLETE static int parse_opt_untyped_expr (void);
+// OBSOLETE static int expect (enum ch_terminal, char *);
+// OBSOLETE static enum ch_terminal ch_lex (void);
+// OBSOLETE INLINE static enum ch_terminal PEEK_TOKEN (void);
+// OBSOLETE static enum ch_terminal peek_token_ (int);
+// OBSOLETE static void forward_token_ (void);
+// OBSOLETE static void require (enum ch_terminal);
+// OBSOLETE static int check_token (enum ch_terminal);
+// OBSOLETE
+// OBSOLETE #define MAX_LOOK_AHEAD 2
+// OBSOLETE static enum ch_terminal terminal_buffer[MAX_LOOK_AHEAD + 1] =
+// OBSOLETE {
+// OBSOLETE TOKEN_NOT_READ, TOKEN_NOT_READ, TOKEN_NOT_READ};
+// OBSOLETE static YYSTYPE yylval;
+// OBSOLETE static YYSTYPE val_buffer[MAX_LOOK_AHEAD + 1];
+// OBSOLETE
+// OBSOLETE /*int current_token, lookahead_token; */
+// OBSOLETE
+// OBSOLETE INLINE static enum ch_terminal
+// OBSOLETE PEEK_TOKEN (void)
+// OBSOLETE {
+// OBSOLETE if (terminal_buffer[0] == TOKEN_NOT_READ)
+// OBSOLETE {
+// OBSOLETE terminal_buffer[0] = ch_lex ();
+// OBSOLETE val_buffer[0] = yylval;
+// OBSOLETE }
+// OBSOLETE return terminal_buffer[0];
+// OBSOLETE }
+// OBSOLETE #define PEEK_LVAL() val_buffer[0]
+// OBSOLETE #define PEEK_TOKEN1() peek_token_(1)
+// OBSOLETE #define PEEK_TOKEN2() peek_token_(2)
+// OBSOLETE static enum ch_terminal
+// OBSOLETE peek_token_ (int i)
+// OBSOLETE {
+// OBSOLETE if (i > MAX_LOOK_AHEAD)
+// OBSOLETE internal_error (__FILE__, __LINE__,
+// OBSOLETE "too much lookahead");
+// OBSOLETE if (terminal_buffer[i] == TOKEN_NOT_READ)
+// OBSOLETE {
+// OBSOLETE terminal_buffer[i] = ch_lex ();
+// OBSOLETE val_buffer[i] = yylval;
+// OBSOLETE }
+// OBSOLETE return terminal_buffer[i];
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #if 0
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE pushback_token (enum ch_terminal code, YYSTYPE node)
+// OBSOLETE {
+// OBSOLETE int i;
+// OBSOLETE if (terminal_buffer[MAX_LOOK_AHEAD] != TOKEN_NOT_READ)
+// OBSOLETE internal_error (__FILE__, __LINE__,
+// OBSOLETE "cannot pushback token");
+// OBSOLETE for (i = MAX_LOOK_AHEAD; i > 0; i--)
+// OBSOLETE {
+// OBSOLETE terminal_buffer[i] = terminal_buffer[i - 1];
+// OBSOLETE val_buffer[i] = val_buffer[i - 1];
+// OBSOLETE }
+// OBSOLETE terminal_buffer[0] = code;
+// OBSOLETE val_buffer[0] = node;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE forward_token_ (void)
+// OBSOLETE {
+// OBSOLETE int i;
+// OBSOLETE for (i = 0; i < MAX_LOOK_AHEAD; i++)
+// OBSOLETE {
+// OBSOLETE terminal_buffer[i] = terminal_buffer[i + 1];
+// OBSOLETE val_buffer[i] = val_buffer[i + 1];
+// OBSOLETE }
+// OBSOLETE terminal_buffer[MAX_LOOK_AHEAD] = TOKEN_NOT_READ;
+// OBSOLETE }
+// OBSOLETE #define FORWARD_TOKEN() forward_token_()
+// OBSOLETE
+// OBSOLETE /* Skip the next token.
+// OBSOLETE if it isn't TOKEN, the parser is broken. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE require (enum ch_terminal token)
+// OBSOLETE {
+// OBSOLETE if (PEEK_TOKEN () != token)
+// OBSOLETE {
+// OBSOLETE internal_error (__FILE__, __LINE__,
+// OBSOLETE "expected token %d", (int) token);
+// OBSOLETE }
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE check_token (enum ch_terminal token)
+// OBSOLETE {
+// OBSOLETE if (PEEK_TOKEN () != token)
+// OBSOLETE return 0;
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE return 1;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* return 0 if expected token was not found,
+// OBSOLETE else return 1.
+// OBSOLETE */
+// OBSOLETE static int
+// OBSOLETE expect (enum ch_terminal token, char *message)
+// OBSOLETE {
+// OBSOLETE if (PEEK_TOKEN () != token)
+// OBSOLETE {
+// OBSOLETE if (message)
+// OBSOLETE error (message);
+// OBSOLETE else if (token < 256)
+// OBSOLETE error ("syntax error - expected a '%c' here \"%s\"", token, lexptr);
+// OBSOLETE else
+// OBSOLETE error ("syntax error");
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE return 1;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #if 0
+// OBSOLETE /* Parse a name string. If ALLOW_ALL is 1, ALL is allowed as a postfix. */
+// OBSOLETE
+// OBSOLETE static tree
+// OBSOLETE parse_opt_name_string (int allow_all)
+// OBSOLETE {
+// OBSOLETE int token = PEEK_TOKEN ();
+// OBSOLETE tree name;
+// OBSOLETE if (token != NAME)
+// OBSOLETE {
+// OBSOLETE if (token == ALL && allow_all)
+// OBSOLETE {
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE return ALL_POSTFIX;
+// OBSOLETE }
+// OBSOLETE return NULL_TREE;
+// OBSOLETE }
+// OBSOLETE name = PEEK_LVAL ();
+// OBSOLETE for (;;)
+// OBSOLETE {
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE token = PEEK_TOKEN ();
+// OBSOLETE if (token != '!')
+// OBSOLETE return name;
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE token = PEEK_TOKEN ();
+// OBSOLETE if (token == ALL && allow_all)
+// OBSOLETE return get_identifier3 (IDENTIFIER_POINTER (name), "!", "*");
+// OBSOLETE if (token != NAME)
+// OBSOLETE {
+// OBSOLETE if (pass == 1)
+// OBSOLETE error ("'%s!' is not followed by an identifier",
+// OBSOLETE IDENTIFIER_POINTER (name));
+// OBSOLETE return name;
+// OBSOLETE }
+// OBSOLETE name = get_identifier3 (IDENTIFIER_POINTER (name),
+// OBSOLETE "!", IDENTIFIER_POINTER (PEEK_LVAL ()));
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static tree
+// OBSOLETE parse_simple_name_string (void)
+// OBSOLETE {
+// OBSOLETE int token = PEEK_TOKEN ();
+// OBSOLETE tree name;
+// OBSOLETE if (token != NAME)
+// OBSOLETE {
+// OBSOLETE error ("expected a name here");
+// OBSOLETE return error_mark_node;
+// OBSOLETE }
+// OBSOLETE name = PEEK_LVAL ();
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE return name;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static tree
+// OBSOLETE parse_name_string (void)
+// OBSOLETE {
+// OBSOLETE tree name = parse_opt_name_string (0);
+// OBSOLETE if (name)
+// OBSOLETE return name;
+// OBSOLETE if (pass == 1)
+// OBSOLETE error ("expected a name string here");
+// OBSOLETE return error_mark_node;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Matches: <name_string>
+// OBSOLETE Returns if pass 1: the identifier.
+// OBSOLETE Returns if pass 2: a decl or value for identifier. */
+// OBSOLETE
+// OBSOLETE static tree
+// OBSOLETE parse_name (void)
+// OBSOLETE {
+// OBSOLETE tree name = parse_name_string ();
+// OBSOLETE if (pass == 1 || ignoring)
+// OBSOLETE return name;
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE tree decl = lookup_name (name);
+// OBSOLETE if (decl == NULL_TREE)
+// OBSOLETE {
+// OBSOLETE error ("`%s' undeclared", IDENTIFIER_POINTER (name));
+// OBSOLETE return error_mark_node;
+// OBSOLETE }
+// OBSOLETE else if (TREE_CODE (TREE_TYPE (decl)) == ERROR_MARK)
+// OBSOLETE return error_mark_node;
+// OBSOLETE else if (TREE_CODE (decl) == CONST_DECL)
+// OBSOLETE return DECL_INITIAL (decl);
+// OBSOLETE else if (TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE)
+// OBSOLETE return convert_from_reference (decl);
+// OBSOLETE else
+// OBSOLETE return decl;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE #if 0
+// OBSOLETE static void
+// OBSOLETE pushback_paren_expr (tree expr)
+// OBSOLETE {
+// OBSOLETE if (pass == 1 && !ignoring)
+// OBSOLETE expr = build1 (PAREN_EXPR, NULL_TREE, expr);
+// OBSOLETE pushback_token (EXPR, expr);
+// OBSOLETE }
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE /* Matches: <case label> */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_case_label (void)
+// OBSOLETE {
+// OBSOLETE if (check_token (ELSE))
+// OBSOLETE error ("ELSE in tuples labels not implemented");
+// OBSOLETE /* Does not handle the case of a mode name. FIXME */
+// OBSOLETE parse_expr ();
+// OBSOLETE if (check_token (':'))
+// OBSOLETE {
+// OBSOLETE parse_expr ();
+// OBSOLETE write_exp_elt_opcode (BINOP_RANGE);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE parse_opt_untyped_expr (void)
+// OBSOLETE {
+// OBSOLETE switch (PEEK_TOKEN ())
+// OBSOLETE {
+// OBSOLETE case ',':
+// OBSOLETE case ':':
+// OBSOLETE case ')':
+// OBSOLETE return 0;
+// OBSOLETE default:
+// OBSOLETE parse_untyped_expr ();
+// OBSOLETE return 1;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_unary_call (void)
+// OBSOLETE {
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE expect ('(', NULL);
+// OBSOLETE parse_expr ();
+// OBSOLETE expect (')', NULL);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Parse NAME '(' MODENAME ')'. */
+// OBSOLETE
+// OBSOLETE #if 0
+// OBSOLETE
+// OBSOLETE static struct type *
+// OBSOLETE parse_mode_call (void)
+// OBSOLETE {
+// OBSOLETE struct type *type;
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE expect ('(', NULL);
+// OBSOLETE if (PEEK_TOKEN () != TYPENAME)
+// OBSOLETE error ("expect MODENAME here `%s'", lexptr);
+// OBSOLETE type = PEEK_LVAL ().tsym.type;
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE expect (')', NULL);
+// OBSOLETE return type;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE static struct type *
+// OBSOLETE parse_mode_or_normal_call (void)
+// OBSOLETE {
+// OBSOLETE struct type *type;
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE expect ('(', NULL);
+// OBSOLETE if (PEEK_TOKEN () == TYPENAME)
+// OBSOLETE {
+// OBSOLETE type = PEEK_LVAL ().tsym.type;
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE parse_expr ();
+// OBSOLETE type = NULL;
+// OBSOLETE }
+// OBSOLETE expect (')', NULL);
+// OBSOLETE return type;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Parse something that looks like a function call.
+// OBSOLETE Assume we have parsed the function, and are at the '('. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_call (void)
+// OBSOLETE {
+// OBSOLETE int arg_count;
+// OBSOLETE require ('(');
+// OBSOLETE /* This is to save the value of arglist_len
+// OBSOLETE being accumulated for each dimension. */
+// OBSOLETE start_arglist ();
+// OBSOLETE if (parse_opt_untyped_expr ())
+// OBSOLETE {
+// OBSOLETE int tok = PEEK_TOKEN ();
+// OBSOLETE arglist_len = 1;
+// OBSOLETE if (tok == UP || tok == ':')
+// OBSOLETE {
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE parse_expr ();
+// OBSOLETE expect (')', "expected ')' to terminate slice");
+// OBSOLETE end_arglist ();
+// OBSOLETE write_exp_elt_opcode (tok == UP ? TERNOP_SLICE_COUNT
+// OBSOLETE : TERNOP_SLICE);
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE while (check_token (','))
+// OBSOLETE {
+// OBSOLETE parse_untyped_expr ();
+// OBSOLETE arglist_len++;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE arglist_len = 0;
+// OBSOLETE expect (')', NULL);
+// OBSOLETE arg_count = end_arglist ();
+// OBSOLETE write_exp_elt_opcode (MULTI_SUBSCRIPT);
+// OBSOLETE write_exp_elt_longcst (arg_count);
+// OBSOLETE write_exp_elt_opcode (MULTI_SUBSCRIPT);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_named_record_element (void)
+// OBSOLETE {
+// OBSOLETE struct stoken label;
+// OBSOLETE char buf[256];
+// OBSOLETE
+// OBSOLETE label = PEEK_LVAL ().sval;
+// OBSOLETE sprintf (buf, "expected a field name here `%s'", lexptr);
+// OBSOLETE expect (DOT_FIELD_NAME, buf);
+// OBSOLETE if (check_token (','))
+// OBSOLETE parse_named_record_element ();
+// OBSOLETE else if (check_token (':'))
+// OBSOLETE parse_expr ();
+// OBSOLETE else
+// OBSOLETE error ("syntax error near `%s' in named record tuple element", lexptr);
+// OBSOLETE write_exp_elt_opcode (OP_LABELED);
+// OBSOLETE write_exp_string (label);
+// OBSOLETE write_exp_elt_opcode (OP_LABELED);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Returns one or more TREE_LIST nodes, in reverse order. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_tuple_element (struct type *type)
+// OBSOLETE {
+// OBSOLETE if (PEEK_TOKEN () == DOT_FIELD_NAME)
+// OBSOLETE {
+// OBSOLETE /* Parse a labelled structure tuple. */
+// OBSOLETE parse_named_record_element ();
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (check_token ('('))
+// OBSOLETE {
+// OBSOLETE if (check_token ('*'))
+// OBSOLETE {
+// OBSOLETE expect (')', "missing ')' after '*' case label list");
+// OBSOLETE if (type)
+// OBSOLETE {
+// OBSOLETE if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
+// OBSOLETE {
+// OBSOLETE /* do this as a range from low to high */
+// OBSOLETE struct type *range_type = TYPE_FIELD_TYPE (type, 0);
+// OBSOLETE LONGEST low_bound, high_bound;
+// OBSOLETE if (get_discrete_bounds (range_type, &low_bound, &high_bound) < 0)
+// OBSOLETE error ("cannot determine bounds for (*)");
+// OBSOLETE /* lower bound */
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE write_exp_elt_type (range_type);
+// OBSOLETE write_exp_elt_longcst (low_bound);
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE /* upper bound */
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE write_exp_elt_type (range_type);
+// OBSOLETE write_exp_elt_longcst (high_bound);
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE write_exp_elt_opcode (BINOP_RANGE);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE error ("(*) in invalid context");
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE error ("(*) only possible with modename in front of tuple (mode[..])");
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE parse_case_label ();
+// OBSOLETE while (check_token (','))
+// OBSOLETE {
+// OBSOLETE parse_case_label ();
+// OBSOLETE write_exp_elt_opcode (BINOP_COMMA);
+// OBSOLETE }
+// OBSOLETE expect (')', NULL);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE parse_untyped_expr ();
+// OBSOLETE if (check_token (':'))
+// OBSOLETE {
+// OBSOLETE /* A powerset range or a labeled Array. */
+// OBSOLETE parse_untyped_expr ();
+// OBSOLETE write_exp_elt_opcode (BINOP_RANGE);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Matches: a COMMA-separated list of tuple elements.
+// OBSOLETE Returns a list (of TREE_LIST nodes). */
+// OBSOLETE static void
+// OBSOLETE parse_opt_element_list (struct type *type)
+// OBSOLETE {
+// OBSOLETE arglist_len = 0;
+// OBSOLETE if (PEEK_TOKEN () == ']')
+// OBSOLETE return;
+// OBSOLETE for (;;)
+// OBSOLETE {
+// OBSOLETE parse_tuple_element (type);
+// OBSOLETE arglist_len++;
+// OBSOLETE if (PEEK_TOKEN () == ']')
+// OBSOLETE break;
+// OBSOLETE if (!check_token (','))
+// OBSOLETE error ("bad syntax in tuple");
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Parses: '[' elements ']'
+// OBSOLETE If modename is non-NULL it prefixed the tuple. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_tuple (struct type *mode)
+// OBSOLETE {
+// OBSOLETE struct type *type;
+// OBSOLETE if (mode)
+// OBSOLETE type = check_typedef (mode);
+// OBSOLETE else
+// OBSOLETE type = 0;
+// OBSOLETE require ('[');
+// OBSOLETE start_arglist ();
+// OBSOLETE parse_opt_element_list (type);
+// OBSOLETE expect (']', "missing ']' after tuple");
+// OBSOLETE write_exp_elt_opcode (OP_ARRAY);
+// OBSOLETE write_exp_elt_longcst ((LONGEST) 0);
+// OBSOLETE write_exp_elt_longcst ((LONGEST) end_arglist () - 1);
+// OBSOLETE write_exp_elt_opcode (OP_ARRAY);
+// OBSOLETE if (type)
+// OBSOLETE {
+// OBSOLETE if (TYPE_CODE (type) != TYPE_CODE_ARRAY
+// OBSOLETE && TYPE_CODE (type) != TYPE_CODE_STRUCT
+// OBSOLETE && TYPE_CODE (type) != TYPE_CODE_SET)
+// OBSOLETE error ("invalid tuple mode");
+// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE write_exp_elt_type (mode);
+// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_primval (void)
+// OBSOLETE {
+// OBSOLETE struct type *type;
+// OBSOLETE enum exp_opcode op;
+// OBSOLETE char *op_name;
+// OBSOLETE switch (PEEK_TOKEN ())
+// OBSOLETE {
+// OBSOLETE case INTEGER_LITERAL:
+// OBSOLETE case CHARACTER_LITERAL:
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE write_exp_elt_type (PEEK_LVAL ().typed_val.type);
+// OBSOLETE write_exp_elt_longcst (PEEK_LVAL ().typed_val.val);
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE break;
+// OBSOLETE case BOOLEAN_LITERAL:
+// OBSOLETE write_exp_elt_opcode (OP_BOOL);
+// OBSOLETE write_exp_elt_longcst ((LONGEST) PEEK_LVAL ().ulval);
+// OBSOLETE write_exp_elt_opcode (OP_BOOL);
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE break;
+// OBSOLETE case FLOAT_LITERAL:
+// OBSOLETE write_exp_elt_opcode (OP_DOUBLE);
+// OBSOLETE write_exp_elt_type (builtin_type_double);
+// OBSOLETE write_exp_elt_dblcst (PEEK_LVAL ().dval);
+// OBSOLETE write_exp_elt_opcode (OP_DOUBLE);
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE break;
+// OBSOLETE case EMPTINESS_LITERAL:
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE write_exp_elt_type (lookup_pointer_type (builtin_type_void));
+// OBSOLETE write_exp_elt_longcst (0);
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE break;
+// OBSOLETE case CHARACTER_STRING_LITERAL:
+// OBSOLETE write_exp_elt_opcode (OP_STRING);
+// OBSOLETE write_exp_string (PEEK_LVAL ().sval);
+// OBSOLETE write_exp_elt_opcode (OP_STRING);
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE break;
+// OBSOLETE case BIT_STRING_LITERAL:
+// OBSOLETE write_exp_elt_opcode (OP_BITSTRING);
+// OBSOLETE write_exp_bitstring (PEEK_LVAL ().sval);
+// OBSOLETE write_exp_elt_opcode (OP_BITSTRING);
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE break;
+// OBSOLETE case ARRAY:
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE /* This is pseudo-Chill, similar to C's '(TYPE[])EXPR'
+// OBSOLETE which casts to an artificial array. */
+// OBSOLETE expect ('(', NULL);
+// OBSOLETE expect (')', NULL);
+// OBSOLETE if (PEEK_TOKEN () != TYPENAME)
+// OBSOLETE error ("missing MODENAME after ARRAY()");
+// OBSOLETE type = PEEK_LVAL ().tsym.type;
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE expect ('(', NULL);
+// OBSOLETE parse_expr ();
+// OBSOLETE expect (')', "missing right parenthesis");
+// OBSOLETE type = create_array_type ((struct type *) NULL, type,
+// OBSOLETE create_range_type ((struct type *) NULL,
+// OBSOLETE builtin_type_int, 0, 0));
+// OBSOLETE TYPE_ARRAY_UPPER_BOUND_TYPE (type) = BOUND_CANNOT_BE_DETERMINED;
+// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE write_exp_elt_type (type);
+// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE break;
+// OBSOLETE #if 0
+// OBSOLETE case CONST:
+// OBSOLETE case EXPR:
+// OBSOLETE val = PEEK_LVAL ();
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE break;
+// OBSOLETE #endif
+// OBSOLETE case '(':
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE parse_expr ();
+// OBSOLETE expect (')', "missing right parenthesis");
+// OBSOLETE break;
+// OBSOLETE case '[':
+// OBSOLETE parse_tuple (NULL);
+// OBSOLETE break;
+// OBSOLETE case GENERAL_PROCEDURE_NAME:
+// OBSOLETE case LOCATION_NAME:
+// OBSOLETE write_exp_elt_opcode (OP_VAR_VALUE);
+// OBSOLETE write_exp_elt_block (NULL);
+// OBSOLETE write_exp_elt_sym (PEEK_LVAL ().ssym.sym);
+// OBSOLETE write_exp_elt_opcode (OP_VAR_VALUE);
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE break;
+// OBSOLETE case GDB_VARIABLE: /* gdb specific */
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE break;
+// OBSOLETE case NUM:
+// OBSOLETE parse_unary_call ();
+// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE write_exp_elt_type (builtin_type_int);
+// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE break;
+// OBSOLETE case CARD:
+// OBSOLETE parse_unary_call ();
+// OBSOLETE write_exp_elt_opcode (UNOP_CARD);
+// OBSOLETE break;
+// OBSOLETE case MAX_TOKEN:
+// OBSOLETE parse_unary_call ();
+// OBSOLETE write_exp_elt_opcode (UNOP_CHMAX);
+// OBSOLETE break;
+// OBSOLETE case MIN_TOKEN:
+// OBSOLETE parse_unary_call ();
+// OBSOLETE write_exp_elt_opcode (UNOP_CHMIN);
+// OBSOLETE break;
+// OBSOLETE case PRED:
+// OBSOLETE op_name = "PRED";
+// OBSOLETE goto unimplemented_unary_builtin;
+// OBSOLETE case SUCC:
+// OBSOLETE op_name = "SUCC";
+// OBSOLETE goto unimplemented_unary_builtin;
+// OBSOLETE case ABS:
+// OBSOLETE op_name = "ABS";
+// OBSOLETE goto unimplemented_unary_builtin;
+// OBSOLETE unimplemented_unary_builtin:
+// OBSOLETE parse_unary_call ();
+// OBSOLETE error ("not implemented: %s builtin function", op_name);
+// OBSOLETE break;
+// OBSOLETE case ADDR_TOKEN:
+// OBSOLETE parse_unary_call ();
+// OBSOLETE write_exp_elt_opcode (UNOP_ADDR);
+// OBSOLETE break;
+// OBSOLETE case SIZE:
+// OBSOLETE type = parse_mode_or_normal_call ();
+// OBSOLETE if (type)
+// OBSOLETE {
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE write_exp_elt_type (builtin_type_int);
+// OBSOLETE CHECK_TYPEDEF (type);
+// OBSOLETE write_exp_elt_longcst ((LONGEST) TYPE_LENGTH (type));
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE write_exp_elt_opcode (UNOP_SIZEOF);
+// OBSOLETE break;
+// OBSOLETE case LOWER:
+// OBSOLETE op = UNOP_LOWER;
+// OBSOLETE goto lower_upper;
+// OBSOLETE case UPPER:
+// OBSOLETE op = UNOP_UPPER;
+// OBSOLETE goto lower_upper;
+// OBSOLETE lower_upper:
+// OBSOLETE type = parse_mode_or_normal_call ();
+// OBSOLETE write_lower_upper_value (op, type);
+// OBSOLETE break;
+// OBSOLETE case LENGTH:
+// OBSOLETE parse_unary_call ();
+// OBSOLETE write_exp_elt_opcode (UNOP_LENGTH);
+// OBSOLETE break;
+// OBSOLETE case TYPENAME:
+// OBSOLETE type = PEEK_LVAL ().tsym.type;
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE switch (PEEK_TOKEN ())
+// OBSOLETE {
+// OBSOLETE case '[':
+// OBSOLETE parse_tuple (type);
+// OBSOLETE break;
+// OBSOLETE case '(':
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE parse_expr ();
+// OBSOLETE expect (')', "missing right parenthesis");
+// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE write_exp_elt_type (type);
+// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE error ("typename in invalid context");
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE default:
+// OBSOLETE error ("invalid expression syntax at `%s'", lexptr);
+// OBSOLETE }
+// OBSOLETE for (;;)
+// OBSOLETE {
+// OBSOLETE switch (PEEK_TOKEN ())
+// OBSOLETE {
+// OBSOLETE case DOT_FIELD_NAME:
+// OBSOLETE write_exp_elt_opcode (STRUCTOP_STRUCT);
+// OBSOLETE write_exp_string (PEEK_LVAL ().sval);
+// OBSOLETE write_exp_elt_opcode (STRUCTOP_STRUCT);
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE continue;
+// OBSOLETE case POINTER:
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE if (PEEK_TOKEN () == TYPENAME)
+// OBSOLETE {
+// OBSOLETE type = PEEK_LVAL ().tsym.type;
+// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE write_exp_elt_type (lookup_pointer_type (type));
+// OBSOLETE write_exp_elt_opcode (UNOP_CAST);
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE }
+// OBSOLETE write_exp_elt_opcode (UNOP_IND);
+// OBSOLETE continue;
+// OBSOLETE case OPEN_PAREN:
+// OBSOLETE parse_call ();
+// OBSOLETE continue;
+// OBSOLETE case CHARACTER_STRING_LITERAL:
+// OBSOLETE case CHARACTER_LITERAL:
+// OBSOLETE case BIT_STRING_LITERAL:
+// OBSOLETE /* Handle string repetition. (See comment in parse_operand5.) */
+// OBSOLETE parse_primval ();
+// OBSOLETE write_exp_elt_opcode (MULTI_SUBSCRIPT);
+// OBSOLETE write_exp_elt_longcst (1);
+// OBSOLETE write_exp_elt_opcode (MULTI_SUBSCRIPT);
+// OBSOLETE continue;
+// OBSOLETE case END_TOKEN:
+// OBSOLETE case TOKEN_NOT_READ:
+// OBSOLETE case INTEGER_LITERAL:
+// OBSOLETE case BOOLEAN_LITERAL:
+// OBSOLETE case FLOAT_LITERAL:
+// OBSOLETE case GENERAL_PROCEDURE_NAME:
+// OBSOLETE case LOCATION_NAME:
+// OBSOLETE case EMPTINESS_LITERAL:
+// OBSOLETE case TYPENAME:
+// OBSOLETE case CASE:
+// OBSOLETE case OF:
+// OBSOLETE case ESAC:
+// OBSOLETE case LOGIOR:
+// OBSOLETE case ORIF:
+// OBSOLETE case LOGXOR:
+// OBSOLETE case LOGAND:
+// OBSOLETE case ANDIF:
+// OBSOLETE case NOTEQUAL:
+// OBSOLETE case GEQ:
+// OBSOLETE case LEQ:
+// OBSOLETE case IN:
+// OBSOLETE case SLASH_SLASH:
+// OBSOLETE case MOD:
+// OBSOLETE case REM:
+// OBSOLETE case NOT:
+// OBSOLETE case RECEIVE:
+// OBSOLETE case UP:
+// OBSOLETE case IF:
+// OBSOLETE case THEN:
+// OBSOLETE case ELSE:
+// OBSOLETE case FI:
+// OBSOLETE case ELSIF:
+// OBSOLETE case ILLEGAL_TOKEN:
+// OBSOLETE case NUM:
+// OBSOLETE case PRED:
+// OBSOLETE case SUCC:
+// OBSOLETE case ABS:
+// OBSOLETE case CARD:
+// OBSOLETE case MAX_TOKEN:
+// OBSOLETE case MIN_TOKEN:
+// OBSOLETE case ADDR_TOKEN:
+// OBSOLETE case SIZE:
+// OBSOLETE case UPPER:
+// OBSOLETE case LOWER:
+// OBSOLETE case LENGTH:
+// OBSOLETE case ARRAY:
+// OBSOLETE case GDB_VARIABLE:
+// OBSOLETE case GDB_ASSIGNMENT:
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_operand6 (void)
+// OBSOLETE {
+// OBSOLETE if (check_token (RECEIVE))
+// OBSOLETE {
+// OBSOLETE parse_primval ();
+// OBSOLETE error ("not implemented: RECEIVE expression");
+// OBSOLETE }
+// OBSOLETE else if (check_token (POINTER))
+// OBSOLETE {
+// OBSOLETE parse_primval ();
+// OBSOLETE write_exp_elt_opcode (UNOP_ADDR);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE parse_primval ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_operand5 (void)
+// OBSOLETE {
+// OBSOLETE enum exp_opcode op;
+// OBSOLETE /* We are supposed to be looking for a <string repetition operator>,
+// OBSOLETE but in general we can't distinguish that from a parenthesized
+// OBSOLETE expression. This is especially difficult if we allow the
+// OBSOLETE string operand to be a constant expression (as requested by
+// OBSOLETE some users), and not just a string literal.
+// OBSOLETE Consider: LPRN expr RPRN LPRN expr RPRN
+// OBSOLETE Is that a function call or string repetition?
+// OBSOLETE Instead, we handle string repetition in parse_primval,
+// OBSOLETE and build_generalized_call. */
+// OBSOLETE switch (PEEK_TOKEN ())
+// OBSOLETE {
+// OBSOLETE case NOT:
+// OBSOLETE op = UNOP_LOGICAL_NOT;
+// OBSOLETE break;
+// OBSOLETE case '-':
+// OBSOLETE op = UNOP_NEG;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE op = OP_NULL;
+// OBSOLETE }
+// OBSOLETE if (op != OP_NULL)
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE parse_operand6 ();
+// OBSOLETE if (op != OP_NULL)
+// OBSOLETE write_exp_elt_opcode (op);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_operand4 (void)
+// OBSOLETE {
+// OBSOLETE enum exp_opcode op;
+// OBSOLETE parse_operand5 ();
+// OBSOLETE for (;;)
+// OBSOLETE {
+// OBSOLETE switch (PEEK_TOKEN ())
+// OBSOLETE {
+// OBSOLETE case '*':
+// OBSOLETE op = BINOP_MUL;
+// OBSOLETE break;
+// OBSOLETE case '/':
+// OBSOLETE op = BINOP_DIV;
+// OBSOLETE break;
+// OBSOLETE case MOD:
+// OBSOLETE op = BINOP_MOD;
+// OBSOLETE break;
+// OBSOLETE case REM:
+// OBSOLETE op = BINOP_REM;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE parse_operand5 ();
+// OBSOLETE write_exp_elt_opcode (op);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_operand3 (void)
+// OBSOLETE {
+// OBSOLETE enum exp_opcode op;
+// OBSOLETE parse_operand4 ();
+// OBSOLETE for (;;)
+// OBSOLETE {
+// OBSOLETE switch (PEEK_TOKEN ())
+// OBSOLETE {
+// OBSOLETE case '+':
+// OBSOLETE op = BINOP_ADD;
+// OBSOLETE break;
+// OBSOLETE case '-':
+// OBSOLETE op = BINOP_SUB;
+// OBSOLETE break;
+// OBSOLETE case SLASH_SLASH:
+// OBSOLETE op = BINOP_CONCAT;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE parse_operand4 ();
+// OBSOLETE write_exp_elt_opcode (op);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_operand2 (void)
+// OBSOLETE {
+// OBSOLETE enum exp_opcode op;
+// OBSOLETE parse_operand3 ();
+// OBSOLETE for (;;)
+// OBSOLETE {
+// OBSOLETE if (check_token (IN))
+// OBSOLETE {
+// OBSOLETE parse_operand3 ();
+// OBSOLETE write_exp_elt_opcode (BINOP_IN);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE switch (PEEK_TOKEN ())
+// OBSOLETE {
+// OBSOLETE case '>':
+// OBSOLETE op = BINOP_GTR;
+// OBSOLETE break;
+// OBSOLETE case GEQ:
+// OBSOLETE op = BINOP_GEQ;
+// OBSOLETE break;
+// OBSOLETE case '<':
+// OBSOLETE op = BINOP_LESS;
+// OBSOLETE break;
+// OBSOLETE case LEQ:
+// OBSOLETE op = BINOP_LEQ;
+// OBSOLETE break;
+// OBSOLETE case '=':
+// OBSOLETE op = BINOP_EQUAL;
+// OBSOLETE break;
+// OBSOLETE case NOTEQUAL:
+// OBSOLETE op = BINOP_NOTEQUAL;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE parse_operand3 ();
+// OBSOLETE write_exp_elt_opcode (op);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_operand1 (void)
+// OBSOLETE {
+// OBSOLETE enum exp_opcode op;
+// OBSOLETE parse_operand2 ();
+// OBSOLETE for (;;)
+// OBSOLETE {
+// OBSOLETE switch (PEEK_TOKEN ())
+// OBSOLETE {
+// OBSOLETE case LOGAND:
+// OBSOLETE op = BINOP_BITWISE_AND;
+// OBSOLETE break;
+// OBSOLETE case ANDIF:
+// OBSOLETE op = BINOP_LOGICAL_AND;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE parse_operand2 ();
+// OBSOLETE write_exp_elt_opcode (op);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_operand0 (void)
+// OBSOLETE {
+// OBSOLETE enum exp_opcode op;
+// OBSOLETE parse_operand1 ();
+// OBSOLETE for (;;)
+// OBSOLETE {
+// OBSOLETE switch (PEEK_TOKEN ())
+// OBSOLETE {
+// OBSOLETE case LOGIOR:
+// OBSOLETE op = BINOP_BITWISE_IOR;
+// OBSOLETE break;
+// OBSOLETE case LOGXOR:
+// OBSOLETE op = BINOP_BITWISE_XOR;
+// OBSOLETE break;
+// OBSOLETE case ORIF:
+// OBSOLETE op = BINOP_LOGICAL_OR;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE parse_operand1 ();
+// OBSOLETE write_exp_elt_opcode (op);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_expr (void)
+// OBSOLETE {
+// OBSOLETE parse_operand0 ();
+// OBSOLETE if (check_token (GDB_ASSIGNMENT))
+// OBSOLETE {
+// OBSOLETE parse_expr ();
+// OBSOLETE write_exp_elt_opcode (BINOP_ASSIGN);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_then_alternative (void)
+// OBSOLETE {
+// OBSOLETE expect (THEN, "missing 'THEN' in 'IF' expression");
+// OBSOLETE parse_expr ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_else_alternative (void)
+// OBSOLETE {
+// OBSOLETE if (check_token (ELSIF))
+// OBSOLETE parse_if_expression_body ();
+// OBSOLETE else if (check_token (ELSE))
+// OBSOLETE parse_expr ();
+// OBSOLETE else
+// OBSOLETE error ("missing ELSE/ELSIF in IF expression");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Matches: <boolean expression> <then alternative> <else alternative> */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_if_expression_body (void)
+// OBSOLETE {
+// OBSOLETE parse_expr ();
+// OBSOLETE parse_then_alternative ();
+// OBSOLETE parse_else_alternative ();
+// OBSOLETE write_exp_elt_opcode (TERNOP_COND);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_if_expression (void)
+// OBSOLETE {
+// OBSOLETE require (IF);
+// OBSOLETE parse_if_expression_body ();
+// OBSOLETE expect (FI, "missing 'FI' at end of conditional expression");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* An <untyped_expr> is a superset of <expr>. It also includes
+// OBSOLETE <conditional expressions> and untyped <tuples>, whose types
+// OBSOLETE are not given by their constituents. Hence, these are only
+// OBSOLETE allowed in certain contexts that expect a certain type.
+// OBSOLETE You should call convert() to fix up the <untyped_expr>. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE parse_untyped_expr (void)
+// OBSOLETE {
+// OBSOLETE switch (PEEK_TOKEN ())
+// OBSOLETE {
+// OBSOLETE case IF:
+// OBSOLETE parse_if_expression ();
+// OBSOLETE return;
+// OBSOLETE case CASE:
+// OBSOLETE error ("not implemented: CASE expression");
+// OBSOLETE case '(':
+// OBSOLETE switch (PEEK_TOKEN1 ())
+// OBSOLETE {
+// OBSOLETE case IF:
+// OBSOLETE case CASE:
+// OBSOLETE goto skip_lprn;
+// OBSOLETE case '[':
+// OBSOLETE skip_lprn:
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE parse_untyped_expr ();
+// OBSOLETE expect (')', "missing ')'");
+// OBSOLETE return;
+// OBSOLETE default:;
+// OBSOLETE /* fall through */
+// OBSOLETE }
+// OBSOLETE default:
+// OBSOLETE parse_operand0 ();
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE int
+// OBSOLETE chill_parse (void)
+// OBSOLETE {
+// OBSOLETE terminal_buffer[0] = TOKEN_NOT_READ;
+// OBSOLETE if (PEEK_TOKEN () == TYPENAME && PEEK_TOKEN1 () == END_TOKEN)
+// OBSOLETE {
+// OBSOLETE write_exp_elt_opcode (OP_TYPE);
+// OBSOLETE write_exp_elt_type (PEEK_LVAL ().tsym.type);
+// OBSOLETE write_exp_elt_opcode (OP_TYPE);
+// OBSOLETE FORWARD_TOKEN ();
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE parse_expr ();
+// OBSOLETE if (terminal_buffer[0] != END_TOKEN)
+// OBSOLETE {
+// OBSOLETE if (comma_terminates && terminal_buffer[0] == ',')
+// OBSOLETE lexptr--; /* Put the comma back. */
+// OBSOLETE else
+// OBSOLETE error ("Junk after end of expression.");
+// OBSOLETE }
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Implementation of a dynamically expandable buffer for processing input
+// OBSOLETE characters acquired through lexptr and building a value to return in
+// OBSOLETE yylval. */
+// OBSOLETE
+// OBSOLETE static char *tempbuf; /* Current buffer contents */
+// OBSOLETE static int tempbufsize; /* Size of allocated buffer */
+// OBSOLETE static int tempbufindex; /* Current index into buffer */
+// OBSOLETE
+// OBSOLETE #define GROWBY_MIN_SIZE 64 /* Minimum amount to grow buffer by */
+// OBSOLETE
+// OBSOLETE #define CHECKBUF(size) \
+// OBSOLETE do { \
+// OBSOLETE if (tempbufindex + (size) >= tempbufsize) \
+// OBSOLETE { \
+// OBSOLETE growbuf_by_size (size); \
+// OBSOLETE } \
+// OBSOLETE } while (0);
+// OBSOLETE
+// OBSOLETE /* Grow the static temp buffer if necessary, including allocating the first one
+// OBSOLETE on demand. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE growbuf_by_size (int count)
+// OBSOLETE {
+// OBSOLETE int growby;
+// OBSOLETE
+// OBSOLETE growby = max (count, GROWBY_MIN_SIZE);
+// OBSOLETE tempbufsize += growby;
+// OBSOLETE if (tempbuf == NULL)
+// OBSOLETE {
+// OBSOLETE tempbuf = (char *) xmalloc (tempbufsize);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE tempbuf = (char *) xrealloc (tempbuf, tempbufsize);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Try to consume a simple name string token. If successful, returns
+// OBSOLETE a pointer to a nullbyte terminated copy of the name that can be used
+// OBSOLETE in symbol table lookups. If not successful, returns NULL. */
+// OBSOLETE
+// OBSOLETE static char *
+// OBSOLETE match_simple_name_string (void)
+// OBSOLETE {
+// OBSOLETE char *tokptr = lexptr;
+// OBSOLETE
+// OBSOLETE if (isalpha (*tokptr) || *tokptr == '_')
+// OBSOLETE {
+// OBSOLETE char *result;
+// OBSOLETE do
+// OBSOLETE {
+// OBSOLETE tokptr++;
+// OBSOLETE }
+// OBSOLETE while (isalnum (*tokptr) || (*tokptr == '_'));
+// OBSOLETE yylval.sval.ptr = lexptr;
+// OBSOLETE yylval.sval.length = tokptr - lexptr;
+// OBSOLETE lexptr = tokptr;
+// OBSOLETE result = copy_name (yylval.sval);
+// OBSOLETE return result;
+// OBSOLETE }
+// OBSOLETE return (NULL);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Start looking for a value composed of valid digits as set by the base
+// OBSOLETE in use. Note that '_' characters are valid anywhere, in any quantity,
+// OBSOLETE and are simply ignored. Since we must find at least one valid digit,
+// OBSOLETE or reject this token as an integer literal, we keep track of how many
+// OBSOLETE digits we have encountered. */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE decode_integer_value (int base, char **tokptrptr, LONGEST *ivalptr)
+// OBSOLETE {
+// OBSOLETE char *tokptr = *tokptrptr;
+// OBSOLETE int temp;
+// OBSOLETE int digits = 0;
+// OBSOLETE
+// OBSOLETE while (*tokptr != '\0')
+// OBSOLETE {
+// OBSOLETE temp = *tokptr;
+// OBSOLETE if (isupper (temp))
+// OBSOLETE temp = tolower (temp);
+// OBSOLETE tokptr++;
+// OBSOLETE switch (temp)
+// OBSOLETE {
+// OBSOLETE case '_':
+// OBSOLETE continue;
+// OBSOLETE case '0':
+// OBSOLETE case '1':
+// OBSOLETE case '2':
+// OBSOLETE case '3':
+// OBSOLETE case '4':
+// OBSOLETE case '5':
+// OBSOLETE case '6':
+// OBSOLETE case '7':
+// OBSOLETE case '8':
+// OBSOLETE case '9':
+// OBSOLETE temp -= '0';
+// OBSOLETE break;
+// OBSOLETE case 'a':
+// OBSOLETE case 'b':
+// OBSOLETE case 'c':
+// OBSOLETE case 'd':
+// OBSOLETE case 'e':
+// OBSOLETE case 'f':
+// OBSOLETE temp -= 'a';
+// OBSOLETE temp += 10;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE temp = base;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE if (temp < base)
+// OBSOLETE {
+// OBSOLETE digits++;
+// OBSOLETE *ivalptr *= base;
+// OBSOLETE *ivalptr += temp;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE /* Found something not in domain for current base. */
+// OBSOLETE tokptr--; /* Unconsume what gave us indigestion. */
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* If we didn't find any digits, then we don't have a valid integer
+// OBSOLETE value, so reject the entire token. Otherwise, update the lexical
+// OBSOLETE scan pointer, and return non-zero for success. */
+// OBSOLETE
+// OBSOLETE if (digits == 0)
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE *tokptrptr = tokptr;
+// OBSOLETE return (1);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE decode_integer_literal (LONGEST *valptr, char **tokptrptr)
+// OBSOLETE {
+// OBSOLETE char *tokptr = *tokptrptr;
+// OBSOLETE int base = 0;
+// OBSOLETE LONGEST ival = 0;
+// OBSOLETE int explicit_base = 0;
+// OBSOLETE
+// OBSOLETE /* Look for an explicit base specifier, which is optional. */
+// OBSOLETE
+// OBSOLETE switch (*tokptr)
+// OBSOLETE {
+// OBSOLETE case 'd':
+// OBSOLETE case 'D':
+// OBSOLETE explicit_base++;
+// OBSOLETE base = 10;
+// OBSOLETE tokptr++;
+// OBSOLETE break;
+// OBSOLETE case 'b':
+// OBSOLETE case 'B':
+// OBSOLETE explicit_base++;
+// OBSOLETE base = 2;
+// OBSOLETE tokptr++;
+// OBSOLETE break;
+// OBSOLETE case 'h':
+// OBSOLETE case 'H':
+// OBSOLETE explicit_base++;
+// OBSOLETE base = 16;
+// OBSOLETE tokptr++;
+// OBSOLETE break;
+// OBSOLETE case 'o':
+// OBSOLETE case 'O':
+// OBSOLETE explicit_base++;
+// OBSOLETE base = 8;
+// OBSOLETE tokptr++;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE base = 10;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* If we found an explicit base ensure that the character after the
+// OBSOLETE explicit base is a single quote. */
+// OBSOLETE
+// OBSOLETE if (explicit_base && (*tokptr++ != '\''))
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Attempt to decode whatever follows as an integer value in the
+// OBSOLETE indicated base, updating the token pointer in the process and
+// OBSOLETE computing the value into ival. Also, if we have an explicit
+// OBSOLETE base, then the next character must not be a single quote, or we
+// OBSOLETE have a bitstring literal, so reject the entire token in this case.
+// OBSOLETE Otherwise, update the lexical scan pointer, and return non-zero
+// OBSOLETE for success. */
+// OBSOLETE
+// OBSOLETE if (!decode_integer_value (base, &tokptr, &ival))
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE else if (explicit_base && (*tokptr == '\''))
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE *valptr = ival;
+// OBSOLETE *tokptrptr = tokptr;
+// OBSOLETE return (1);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* If it wasn't for the fact that floating point values can contain '_'
+// OBSOLETE characters, we could just let strtod do all the hard work by letting it
+// OBSOLETE try to consume as much of the current token buffer as possible and
+// OBSOLETE find a legal conversion. Unfortunately we need to filter out the '_'
+// OBSOLETE characters before calling strtod, which we do by copying the other
+// OBSOLETE legal chars to a local buffer to be converted. However since we also
+// OBSOLETE need to keep track of where the last unconsumed character in the input
+// OBSOLETE buffer is, we have transfer only as many characters as may compose a
+// OBSOLETE legal floating point value. */
+// OBSOLETE
+// OBSOLETE static enum ch_terminal
+// OBSOLETE match_float_literal (void)
+// OBSOLETE {
+// OBSOLETE char *tokptr = lexptr;
+// OBSOLETE char *buf;
+// OBSOLETE char *copy;
+// OBSOLETE double dval;
+// OBSOLETE extern double strtod ();
+// OBSOLETE
+// OBSOLETE /* Make local buffer in which to build the string to convert. This is
+// OBSOLETE required because underscores are valid in chill floating point numbers
+// OBSOLETE but not in the string passed to strtod to convert. The string will be
+// OBSOLETE no longer than our input string. */
+// OBSOLETE
+// OBSOLETE copy = buf = (char *) alloca (strlen (tokptr) + 1);
+// OBSOLETE
+// OBSOLETE /* Transfer all leading digits to the conversion buffer, discarding any
+// OBSOLETE underscores. */
+// OBSOLETE
+// OBSOLETE while (isdigit (*tokptr) || *tokptr == '_')
+// OBSOLETE {
+// OBSOLETE if (*tokptr != '_')
+// OBSOLETE {
+// OBSOLETE *copy++ = *tokptr;
+// OBSOLETE }
+// OBSOLETE tokptr++;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Now accept either a '.', or one of [eEdD]. Dot is legal regardless
+// OBSOLETE of whether we found any leading digits, and we simply accept it and
+// OBSOLETE continue on to look for the fractional part and/or exponent. One of
+// OBSOLETE [eEdD] is legal only if we have seen digits, and means that there
+// OBSOLETE is no fractional part. If we find neither of these, then this is
+// OBSOLETE not a floating point number, so return failure. */
+// OBSOLETE
+// OBSOLETE switch (*tokptr++)
+// OBSOLETE {
+// OBSOLETE case '.':
+// OBSOLETE /* Accept and then look for fractional part and/or exponent. */
+// OBSOLETE *copy++ = '.';
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case 'e':
+// OBSOLETE case 'E':
+// OBSOLETE case 'd':
+// OBSOLETE case 'D':
+// OBSOLETE if (copy == buf)
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE *copy++ = 'e';
+// OBSOLETE goto collect_exponent;
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE default:
+// OBSOLETE return (0);
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* We found a '.', copy any fractional digits to the conversion buffer, up
+// OBSOLETE to the first nondigit, non-underscore character. */
+// OBSOLETE
+// OBSOLETE while (isdigit (*tokptr) || *tokptr == '_')
+// OBSOLETE {
+// OBSOLETE if (*tokptr != '_')
+// OBSOLETE {
+// OBSOLETE *copy++ = *tokptr;
+// OBSOLETE }
+// OBSOLETE tokptr++;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Look for an exponent, which must start with one of [eEdD]. If none
+// OBSOLETE is found, jump directly to trying to convert what we have collected
+// OBSOLETE so far. */
+// OBSOLETE
+// OBSOLETE switch (*tokptr)
+// OBSOLETE {
+// OBSOLETE case 'e':
+// OBSOLETE case 'E':
+// OBSOLETE case 'd':
+// OBSOLETE case 'D':
+// OBSOLETE *copy++ = 'e';
+// OBSOLETE tokptr++;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE goto convert_float;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Accept an optional '-' or '+' following one of [eEdD]. */
+// OBSOLETE
+// OBSOLETE collect_exponent:
+// OBSOLETE if (*tokptr == '+' || *tokptr == '-')
+// OBSOLETE {
+// OBSOLETE *copy++ = *tokptr++;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Now copy an exponent into the conversion buffer. Note that at the
+// OBSOLETE moment underscores are *not* allowed in exponents. */
+// OBSOLETE
+// OBSOLETE while (isdigit (*tokptr))
+// OBSOLETE {
+// OBSOLETE *copy++ = *tokptr++;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* If we transfered any chars to the conversion buffer, try to interpret its
+// OBSOLETE contents as a floating point value. If any characters remain, then we
+// OBSOLETE must not have a valid floating point string. */
+// OBSOLETE
+// OBSOLETE convert_float:
+// OBSOLETE *copy = '\0';
+// OBSOLETE if (copy != buf)
+// OBSOLETE {
+// OBSOLETE dval = strtod (buf, ©);
+// OBSOLETE if (*copy == '\0')
+// OBSOLETE {
+// OBSOLETE yylval.dval = dval;
+// OBSOLETE lexptr = tokptr;
+// OBSOLETE return (FLOAT_LITERAL);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Recognize a string literal. A string literal is a sequence
+// OBSOLETE of characters enclosed in matching single or double quotes, except that
+// OBSOLETE a single character inside single quotes is a character literal, which
+// OBSOLETE we reject as a string literal. To embed the terminator character inside
+// OBSOLETE a string, it is simply doubled (I.E. "this""is""one""string") */
+// OBSOLETE
+// OBSOLETE static enum ch_terminal
+// OBSOLETE match_string_literal (void)
+// OBSOLETE {
+// OBSOLETE char *tokptr = lexptr;
+// OBSOLETE int in_ctrlseq = 0;
+// OBSOLETE LONGEST ival;
+// OBSOLETE
+// OBSOLETE for (tempbufindex = 0, tokptr++; *tokptr != '\0'; tokptr++)
+// OBSOLETE {
+// OBSOLETE CHECKBUF (1);
+// OBSOLETE tryagain:;
+// OBSOLETE if (in_ctrlseq)
+// OBSOLETE {
+// OBSOLETE /* skip possible whitespaces */
+// OBSOLETE while ((*tokptr == ' ' || *tokptr == '\t') && *tokptr)
+// OBSOLETE tokptr++;
+// OBSOLETE if (*tokptr == ')')
+// OBSOLETE {
+// OBSOLETE in_ctrlseq = 0;
+// OBSOLETE tokptr++;
+// OBSOLETE goto tryagain;
+// OBSOLETE }
+// OBSOLETE else if (*tokptr != ',')
+// OBSOLETE error ("Invalid control sequence");
+// OBSOLETE tokptr++;
+// OBSOLETE /* skip possible whitespaces */
+// OBSOLETE while ((*tokptr == ' ' || *tokptr == '\t') && *tokptr)
+// OBSOLETE tokptr++;
+// OBSOLETE if (!decode_integer_literal (&ival, &tokptr))
+// OBSOLETE error ("Invalid control sequence");
+// OBSOLETE tokptr--;
+// OBSOLETE }
+// OBSOLETE else if (*tokptr == *lexptr)
+// OBSOLETE {
+// OBSOLETE if (*(tokptr + 1) == *lexptr)
+// OBSOLETE {
+// OBSOLETE ival = *tokptr++;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else if (*tokptr == '^')
+// OBSOLETE {
+// OBSOLETE if (*(tokptr + 1) == '(')
+// OBSOLETE {
+// OBSOLETE in_ctrlseq = 1;
+// OBSOLETE tokptr += 2;
+// OBSOLETE if (!decode_integer_literal (&ival, &tokptr))
+// OBSOLETE error ("Invalid control sequence");
+// OBSOLETE tokptr--;
+// OBSOLETE }
+// OBSOLETE else if (*(tokptr + 1) == '^')
+// OBSOLETE ival = *tokptr++;
+// OBSOLETE else
+// OBSOLETE error ("Invalid control sequence");
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE ival = *tokptr;
+// OBSOLETE tempbuf[tempbufindex++] = ival;
+// OBSOLETE }
+// OBSOLETE if (in_ctrlseq)
+// OBSOLETE error ("Invalid control sequence");
+// OBSOLETE
+// OBSOLETE if (*tokptr == '\0' /* no terminator */
+// OBSOLETE || (tempbufindex == 1 && *tokptr == '\'')) /* char literal */
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE tempbuf[tempbufindex] = '\0';
+// OBSOLETE yylval.sval.ptr = tempbuf;
+// OBSOLETE yylval.sval.length = tempbufindex;
+// OBSOLETE lexptr = ++tokptr;
+// OBSOLETE return (CHARACTER_STRING_LITERAL);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Recognize a character literal. A character literal is single character
+// OBSOLETE or a control sequence, enclosed in single quotes. A control sequence
+// OBSOLETE is a comma separated list of one or more integer literals, enclosed
+// OBSOLETE in parenthesis and introduced with a circumflex character.
+// OBSOLETE
+// OBSOLETE EX: 'a' '^(7)' '^(7,8)'
+// OBSOLETE
+// OBSOLETE As a GNU chill extension, the syntax C'xx' is also recognized as a
+// OBSOLETE character literal, where xx is a hex value for the character.
+// OBSOLETE
+// OBSOLETE Note that more than a single character, enclosed in single quotes, is
+// OBSOLETE a string literal.
+// OBSOLETE
+// OBSOLETE Returns CHARACTER_LITERAL if a match is found.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE static enum ch_terminal
+// OBSOLETE match_character_literal (void)
+// OBSOLETE {
+// OBSOLETE char *tokptr = lexptr;
+// OBSOLETE LONGEST ival = 0;
+// OBSOLETE
+// OBSOLETE if ((*tokptr == 'c' || *tokptr == 'C') && (*(tokptr + 1) == '\''))
+// OBSOLETE {
+// OBSOLETE /* We have a GNU chill extension form, so skip the leading "C'",
+// OBSOLETE decode the hex value, and then ensure that we have a trailing
+// OBSOLETE single quote character. */
+// OBSOLETE tokptr += 2;
+// OBSOLETE if (!decode_integer_value (16, &tokptr, &ival) || (*tokptr != '\''))
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE tokptr++;
+// OBSOLETE }
+// OBSOLETE else if (*tokptr == '\'')
+// OBSOLETE {
+// OBSOLETE tokptr++;
+// OBSOLETE
+// OBSOLETE /* Determine which form we have, either a control sequence or the
+// OBSOLETE single character form. */
+// OBSOLETE
+// OBSOLETE if (*tokptr == '^')
+// OBSOLETE {
+// OBSOLETE if (*(tokptr + 1) == '(')
+// OBSOLETE {
+// OBSOLETE /* Match and decode a control sequence. Return zero if we don't
+// OBSOLETE find a valid integer literal, or if the next unconsumed character
+// OBSOLETE after the integer literal is not the trailing ')'. */
+// OBSOLETE tokptr += 2;
+// OBSOLETE if (!decode_integer_literal (&ival, &tokptr) || (*tokptr++ != ')'))
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else if (*(tokptr + 1) == '^')
+// OBSOLETE {
+// OBSOLETE ival = *tokptr;
+// OBSOLETE tokptr += 2;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE /* fail */
+// OBSOLETE error ("Invalid control sequence");
+// OBSOLETE }
+// OBSOLETE else if (*tokptr == '\'')
+// OBSOLETE {
+// OBSOLETE /* this must be duplicated */
+// OBSOLETE ival = *tokptr;
+// OBSOLETE tokptr += 2;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE ival = *tokptr++;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* The trailing quote has not yet been consumed. If we don't find
+// OBSOLETE it, then we have no match. */
+// OBSOLETE
+// OBSOLETE if (*tokptr++ != '\'')
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE /* Not a character literal. */
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE yylval.typed_val.val = ival;
+// OBSOLETE yylval.typed_val.type = builtin_type_chill_char;
+// OBSOLETE lexptr = tokptr;
+// OBSOLETE return (CHARACTER_LITERAL);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Recognize an integer literal, as specified in Z.200 sec 5.2.4.2.
+// OBSOLETE Note that according to 5.2.4.2, a single "_" is also a valid integer
+// OBSOLETE literal, however GNU-chill requires there to be at least one "digit"
+// OBSOLETE in any integer literal. */
+// OBSOLETE
+// OBSOLETE static enum ch_terminal
+// OBSOLETE match_integer_literal (void)
+// OBSOLETE {
+// OBSOLETE char *tokptr = lexptr;
+// OBSOLETE LONGEST ival;
+// OBSOLETE
+// OBSOLETE if (!decode_integer_literal (&ival, &tokptr))
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE yylval.typed_val.val = ival;
+// OBSOLETE #if defined(CC_HAS_LONG_LONG)
+// OBSOLETE if (ival > (LONGEST) 2147483647U || ival < -(LONGEST) 2147483648U)
+// OBSOLETE yylval.typed_val.type = builtin_type_long_long;
+// OBSOLETE else
+// OBSOLETE #endif
+// OBSOLETE yylval.typed_val.type = builtin_type_int;
+// OBSOLETE lexptr = tokptr;
+// OBSOLETE return (INTEGER_LITERAL);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Recognize a bit-string literal, as specified in Z.200 sec 5.2.4.8
+// OBSOLETE Note that according to 5.2.4.8, a single "_" is also a valid bit-string
+// OBSOLETE literal, however GNU-chill requires there to be at least one "digit"
+// OBSOLETE in any bit-string literal. */
+// OBSOLETE
+// OBSOLETE static enum ch_terminal
+// OBSOLETE match_bitstring_literal (void)
+// OBSOLETE {
+// OBSOLETE register char *tokptr = lexptr;
+// OBSOLETE int bitoffset = 0;
+// OBSOLETE int bitcount = 0;
+// OBSOLETE int bits_per_char;
+// OBSOLETE int digit;
+// OBSOLETE
+// OBSOLETE tempbufindex = 0;
+// OBSOLETE CHECKBUF (1);
+// OBSOLETE tempbuf[0] = 0;
+// OBSOLETE
+// OBSOLETE /* Look for the required explicit base specifier. */
+// OBSOLETE
+// OBSOLETE switch (*tokptr++)
+// OBSOLETE {
+// OBSOLETE case 'b':
+// OBSOLETE case 'B':
+// OBSOLETE bits_per_char = 1;
+// OBSOLETE break;
+// OBSOLETE case 'o':
+// OBSOLETE case 'O':
+// OBSOLETE bits_per_char = 3;
+// OBSOLETE break;
+// OBSOLETE case 'h':
+// OBSOLETE case 'H':
+// OBSOLETE bits_per_char = 4;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE return (0);
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Ensure that the character after the explicit base is a single quote. */
+// OBSOLETE
+// OBSOLETE if (*tokptr++ != '\'')
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE while (*tokptr != '\0' && *tokptr != '\'')
+// OBSOLETE {
+// OBSOLETE digit = *tokptr;
+// OBSOLETE if (isupper (digit))
+// OBSOLETE digit = tolower (digit);
+// OBSOLETE tokptr++;
+// OBSOLETE switch (digit)
+// OBSOLETE {
+// OBSOLETE case '_':
+// OBSOLETE continue;
+// OBSOLETE case '0':
+// OBSOLETE case '1':
+// OBSOLETE case '2':
+// OBSOLETE case '3':
+// OBSOLETE case '4':
+// OBSOLETE case '5':
+// OBSOLETE case '6':
+// OBSOLETE case '7':
+// OBSOLETE case '8':
+// OBSOLETE case '9':
+// OBSOLETE digit -= '0';
+// OBSOLETE break;
+// OBSOLETE case 'a':
+// OBSOLETE case 'b':
+// OBSOLETE case 'c':
+// OBSOLETE case 'd':
+// OBSOLETE case 'e':
+// OBSOLETE case 'f':
+// OBSOLETE digit -= 'a';
+// OBSOLETE digit += 10;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE /* this is not a bitstring literal, probably an integer */
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE if (digit >= 1 << bits_per_char)
+// OBSOLETE {
+// OBSOLETE /* Found something not in domain for current base. */
+// OBSOLETE error ("Too-large digit in bitstring or integer.");
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE /* Extract bits from digit, packing them into the bitstring byte. */
+// OBSOLETE int k = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? bits_per_char - 1 : 0;
+// OBSOLETE for (; TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k >= 0 : k < bits_per_char;
+// OBSOLETE TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? k-- : k++)
+// OBSOLETE {
+// OBSOLETE bitcount++;
+// OBSOLETE if (digit & (1 << k))
+// OBSOLETE {
+// OBSOLETE tempbuf[tempbufindex] |=
+// OBSOLETE (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+// OBSOLETE ? (1 << (HOST_CHAR_BIT - 1 - bitoffset))
+// OBSOLETE : (1 << bitoffset);
+// OBSOLETE }
+// OBSOLETE bitoffset++;
+// OBSOLETE if (bitoffset == HOST_CHAR_BIT)
+// OBSOLETE {
+// OBSOLETE bitoffset = 0;
+// OBSOLETE tempbufindex++;
+// OBSOLETE CHECKBUF (1);
+// OBSOLETE tempbuf[tempbufindex] = 0;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Verify that we consumed everything up to the trailing single quote,
+// OBSOLETE and that we found some bits (IE not just underbars). */
+// OBSOLETE
+// OBSOLETE if (*tokptr++ != '\'')
+// OBSOLETE {
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE yylval.sval.ptr = tempbuf;
+// OBSOLETE yylval.sval.length = bitcount;
+// OBSOLETE lexptr = tokptr;
+// OBSOLETE return (BIT_STRING_LITERAL);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE struct token
+// OBSOLETE {
+// OBSOLETE char *operator;
+// OBSOLETE int token;
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE static const struct token idtokentab[] =
+// OBSOLETE {
+// OBSOLETE {"array", ARRAY},
+// OBSOLETE {"length", LENGTH},
+// OBSOLETE {"lower", LOWER},
+// OBSOLETE {"upper", UPPER},
+// OBSOLETE {"andif", ANDIF},
+// OBSOLETE {"pred", PRED},
+// OBSOLETE {"succ", SUCC},
+// OBSOLETE {"card", CARD},
+// OBSOLETE {"size", SIZE},
+// OBSOLETE {"orif", ORIF},
+// OBSOLETE {"num", NUM},
+// OBSOLETE {"abs", ABS},
+// OBSOLETE {"max", MAX_TOKEN},
+// OBSOLETE {"min", MIN_TOKEN},
+// OBSOLETE {"mod", MOD},
+// OBSOLETE {"rem", REM},
+// OBSOLETE {"not", NOT},
+// OBSOLETE {"xor", LOGXOR},
+// OBSOLETE {"and", LOGAND},
+// OBSOLETE {"in", IN},
+// OBSOLETE {"or", LOGIOR},
+// OBSOLETE {"up", UP},
+// OBSOLETE {"addr", ADDR_TOKEN},
+// OBSOLETE {"null", EMPTINESS_LITERAL}
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE static const struct token tokentab2[] =
+// OBSOLETE {
+// OBSOLETE {":=", GDB_ASSIGNMENT},
+// OBSOLETE {"//", SLASH_SLASH},
+// OBSOLETE {"->", POINTER},
+// OBSOLETE {"/=", NOTEQUAL},
+// OBSOLETE {"<=", LEQ},
+// OBSOLETE {">=", GEQ}
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE /* Read one token, getting characters through lexptr. */
+// OBSOLETE /* This is where we will check to make sure that the language and the
+// OBSOLETE operators used are compatible. */
+// OBSOLETE
+// OBSOLETE static enum ch_terminal
+// OBSOLETE ch_lex (void)
+// OBSOLETE {
+// OBSOLETE unsigned int i;
+// OBSOLETE enum ch_terminal token;
+// OBSOLETE char *inputname;
+// OBSOLETE struct symbol *sym;
+// OBSOLETE
+// OBSOLETE /* Skip over any leading whitespace. */
+// OBSOLETE while (isspace (*lexptr))
+// OBSOLETE {
+// OBSOLETE lexptr++;
+// OBSOLETE }
+// OBSOLETE /* Look for special single character cases which can't be the first
+// OBSOLETE character of some other multicharacter token. */
+// OBSOLETE switch (*lexptr)
+// OBSOLETE {
+// OBSOLETE case '\0':
+// OBSOLETE return END_TOKEN;
+// OBSOLETE case ',':
+// OBSOLETE case '=':
+// OBSOLETE case ';':
+// OBSOLETE case '!':
+// OBSOLETE case '+':
+// OBSOLETE case '*':
+// OBSOLETE case '(':
+// OBSOLETE case ')':
+// OBSOLETE case '[':
+// OBSOLETE case ']':
+// OBSOLETE return (*lexptr++);
+// OBSOLETE }
+// OBSOLETE /* Look for characters which start a particular kind of multicharacter
+// OBSOLETE token, such as a character literal, register name, convenience
+// OBSOLETE variable name, string literal, etc. */
+// OBSOLETE switch (*lexptr)
+// OBSOLETE {
+// OBSOLETE case '\'':
+// OBSOLETE case '\"':
+// OBSOLETE /* First try to match a string literal, which is any
+// OBSOLETE sequence of characters enclosed in matching single or double
+// OBSOLETE quotes, except that a single character inside single quotes
+// OBSOLETE is a character literal, so we have to catch that case also. */
+// OBSOLETE token = match_string_literal ();
+// OBSOLETE if (token != 0)
+// OBSOLETE {
+// OBSOLETE return (token);
+// OBSOLETE }
+// OBSOLETE if (*lexptr == '\'')
+// OBSOLETE {
+// OBSOLETE token = match_character_literal ();
+// OBSOLETE if (token != 0)
+// OBSOLETE {
+// OBSOLETE return (token);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE case 'C':
+// OBSOLETE case 'c':
+// OBSOLETE token = match_character_literal ();
+// OBSOLETE if (token != 0)
+// OBSOLETE {
+// OBSOLETE return (token);
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE case '$':
+// OBSOLETE yylval.sval.ptr = lexptr;
+// OBSOLETE do
+// OBSOLETE {
+// OBSOLETE lexptr++;
+// OBSOLETE }
+// OBSOLETE while (isalnum (*lexptr) || *lexptr == '_' || *lexptr == '$');
+// OBSOLETE yylval.sval.length = lexptr - yylval.sval.ptr;
+// OBSOLETE write_dollar_variable (yylval.sval);
+// OBSOLETE return GDB_VARIABLE;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE /* See if it is a special token of length 2. */
+// OBSOLETE for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
+// OBSOLETE {
+// OBSOLETE if (STREQN (lexptr, tokentab2[i].operator, 2))
+// OBSOLETE {
+// OBSOLETE lexptr += 2;
+// OBSOLETE return (tokentab2[i].token);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE /* Look for single character cases which which could be the first
+// OBSOLETE character of some other multicharacter token, but aren't, or we
+// OBSOLETE would already have found it. */
+// OBSOLETE switch (*lexptr)
+// OBSOLETE {
+// OBSOLETE case '-':
+// OBSOLETE case ':':
+// OBSOLETE case '/':
+// OBSOLETE case '<':
+// OBSOLETE case '>':
+// OBSOLETE return (*lexptr++);
+// OBSOLETE }
+// OBSOLETE /* Look for a float literal before looking for an integer literal, so
+// OBSOLETE we match as much of the input stream as possible. */
+// OBSOLETE token = match_float_literal ();
+// OBSOLETE if (token != 0)
+// OBSOLETE {
+// OBSOLETE return (token);
+// OBSOLETE }
+// OBSOLETE token = match_bitstring_literal ();
+// OBSOLETE if (token != 0)
+// OBSOLETE {
+// OBSOLETE return (token);
+// OBSOLETE }
+// OBSOLETE token = match_integer_literal ();
+// OBSOLETE if (token != 0)
+// OBSOLETE {
+// OBSOLETE return (token);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Try to match a simple name string, and if a match is found, then
+// OBSOLETE further classify what sort of name it is and return an appropriate
+// OBSOLETE token. Note that attempting to match a simple name string consumes
+// OBSOLETE the token from lexptr, so we can't back out if we later find that
+// OBSOLETE we can't classify what sort of name it is. */
+// OBSOLETE
+// OBSOLETE inputname = match_simple_name_string ();
+// OBSOLETE
+// OBSOLETE if (inputname != NULL)
+// OBSOLETE {
+// OBSOLETE char *simplename = (char *) alloca (strlen (inputname) + 1);
+// OBSOLETE
+// OBSOLETE char *dptr = simplename, *sptr = inputname;
+// OBSOLETE for (; *sptr; sptr++)
+// OBSOLETE *dptr++ = isupper (*sptr) ? tolower (*sptr) : *sptr;
+// OBSOLETE *dptr = '\0';
+// OBSOLETE
+// OBSOLETE /* See if it is a reserved identifier. */
+// OBSOLETE for (i = 0; i < sizeof (idtokentab) / sizeof (idtokentab[0]); i++)
+// OBSOLETE {
+// OBSOLETE if (STREQ (simplename, idtokentab[i].operator))
+// OBSOLETE {
+// OBSOLETE return (idtokentab[i].token);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Look for other special tokens. */
+// OBSOLETE if (STREQ (simplename, "true"))
+// OBSOLETE {
+// OBSOLETE yylval.ulval = 1;
+// OBSOLETE return (BOOLEAN_LITERAL);
+// OBSOLETE }
+// OBSOLETE if (STREQ (simplename, "false"))
+// OBSOLETE {
+// OBSOLETE yylval.ulval = 0;
+// OBSOLETE return (BOOLEAN_LITERAL);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE sym = lookup_symbol (inputname, expression_context_block,
+// OBSOLETE VAR_NAMESPACE, (int *) NULL,
+// OBSOLETE (struct symtab **) NULL);
+// OBSOLETE if (sym == NULL && strcmp (inputname, simplename) != 0)
+// OBSOLETE {
+// OBSOLETE sym = lookup_symbol (simplename, expression_context_block,
+// OBSOLETE VAR_NAMESPACE, (int *) NULL,
+// OBSOLETE (struct symtab **) NULL);
+// OBSOLETE }
+// OBSOLETE if (sym != NULL)
+// OBSOLETE {
+// OBSOLETE yylval.ssym.stoken.ptr = NULL;
+// OBSOLETE yylval.ssym.stoken.length = 0;
+// OBSOLETE yylval.ssym.sym = sym;
+// OBSOLETE yylval.ssym.is_a_field_of_this = 0; /* FIXME, C++'ism */
+// OBSOLETE switch (SYMBOL_CLASS (sym))
+// OBSOLETE {
+// OBSOLETE case LOC_BLOCK:
+// OBSOLETE /* Found a procedure name. */
+// OBSOLETE return (GENERAL_PROCEDURE_NAME);
+// OBSOLETE case LOC_STATIC:
+// OBSOLETE /* Found a global or local static variable. */
+// OBSOLETE return (LOCATION_NAME);
+// OBSOLETE case LOC_REGISTER:
+// OBSOLETE case LOC_ARG:
+// OBSOLETE case LOC_REF_ARG:
+// OBSOLETE case LOC_REGPARM:
+// OBSOLETE case LOC_REGPARM_ADDR:
+// OBSOLETE case LOC_LOCAL:
+// OBSOLETE case LOC_LOCAL_ARG:
+// OBSOLETE case LOC_BASEREG:
+// OBSOLETE case LOC_BASEREG_ARG:
+// OBSOLETE if (innermost_block == NULL
+// OBSOLETE || contained_in (block_found, innermost_block))
+// OBSOLETE {
+// OBSOLETE innermost_block = block_found;
+// OBSOLETE }
+// OBSOLETE return (LOCATION_NAME);
+// OBSOLETE break;
+// OBSOLETE case LOC_CONST:
+// OBSOLETE case LOC_LABEL:
+// OBSOLETE return (LOCATION_NAME);
+// OBSOLETE break;
+// OBSOLETE case LOC_TYPEDEF:
+// OBSOLETE yylval.tsym.type = SYMBOL_TYPE (sym);
+// OBSOLETE return TYPENAME;
+// OBSOLETE case LOC_UNDEF:
+// OBSOLETE case LOC_CONST_BYTES:
+// OBSOLETE case LOC_OPTIMIZED_OUT:
+// OBSOLETE error ("Symbol \"%s\" names no location.", inputname);
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE internal_error (__FILE__, __LINE__,
+// OBSOLETE "unhandled SYMBOL_CLASS in ch_lex()");
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else if (!have_full_symbols () && !have_partial_symbols ())
+// OBSOLETE {
+// OBSOLETE error ("No symbol table is loaded. Use the \"file\" command.");
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE error ("No symbol \"%s\" in current context.", inputname);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Catch single character tokens which are not part of some
+// OBSOLETE longer token. */
+// OBSOLETE
+// OBSOLETE switch (*lexptr)
+// OBSOLETE {
+// OBSOLETE case '.': /* Not float for example. */
+// OBSOLETE lexptr++;
+// OBSOLETE while (isspace (*lexptr))
+// OBSOLETE lexptr++;
+// OBSOLETE inputname = match_simple_name_string ();
+// OBSOLETE if (!inputname)
+// OBSOLETE return '.';
+// OBSOLETE return DOT_FIELD_NAME;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE return (ILLEGAL_TOKEN);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE write_lower_upper_value (enum exp_opcode opcode, /* Either UNOP_LOWER or UNOP_UPPER */
+// OBSOLETE struct type *type)
+// OBSOLETE {
+// OBSOLETE if (type == NULL)
+// OBSOLETE write_exp_elt_opcode (opcode);
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE struct type *result_type;
+// OBSOLETE LONGEST val = type_lower_upper (opcode, type, &result_type);
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE write_exp_elt_type (result_type);
+// OBSOLETE write_exp_elt_longcst (val);
+// OBSOLETE write_exp_elt_opcode (OP_LONG);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE chill_error (char *msg)
+// OBSOLETE {
+// OBSOLETE /* Never used. */
+// OBSOLETE }
-/* Chill language support routines for GDB, the GNU debugger.
- Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "value.h"
-#include "expression.h"
-#include "parser-defs.h"
-#include "language.h"
-#include "ch-lang.h"
-#include "valprint.h"
-
-extern void _initialize_chill_language (void);
-
-static struct value *evaluate_subexp_chill (struct type *, struct expression *,
- int *, enum noside);
-
-static struct value *value_chill_max_min (enum exp_opcode, struct value *);
-
-static struct value *value_chill_card (struct value *);
-
-static struct value *value_chill_length (struct value *);
-
-static struct type *chill_create_fundamental_type (struct objfile *, int);
-
-static void chill_printstr (struct ui_file * stream, char *string,
- unsigned int length, int width,
- int force_ellipses);
-
-static void chill_printchar (int, struct ui_file *);
-
-/* For now, Chill uses a simple mangling algorithm whereby you simply
- discard everything after the occurance of two successive CPLUS_MARKER
- characters to derive the demangled form. */
-
-char *
-chill_demangle (const char *mangled)
-{
- const char *joiner = NULL;
- char *demangled;
- const char *cp = mangled;
-
- while (*cp)
- {
- if (is_cplus_marker (*cp))
- {
- joiner = cp;
- break;
- }
- cp++;
- }
- if (joiner != NULL && *(joiner + 1) == *joiner)
- {
- demangled = savestring (mangled, joiner - mangled);
- }
- else
- {
- demangled = NULL;
- }
- return (demangled);
-}
-
-static void
-chill_printchar (register int c, struct ui_file *stream)
-{
- c &= 0xFF; /* Avoid sign bit follies */
-
- if (PRINT_LITERAL_FORM (c))
- {
- if (c == '\'' || c == '^')
- fprintf_filtered (stream, "'%c%c'", c, c);
- else
- fprintf_filtered (stream, "'%c'", c);
- }
- else
- {
- fprintf_filtered (stream, "'^(%u)'", (unsigned int) c);
- }
-}
-
-/* Print the character string STRING, printing at most LENGTH characters.
- Printing stops early if the number hits print_max; repeat counts
- are printed as appropriate. Print ellipses at the end if we
- had to stop before printing LENGTH characters, or if FORCE_ELLIPSES.
- Note that gdb maintains the length of strings without counting the
- terminating null byte, while chill strings are typically written with
- an explicit null byte. So we always assume an implied null byte
- until gdb is able to maintain non-null terminated strings as well
- as null terminated strings (FIXME).
- */
-
-static void
-chill_printstr (struct ui_file *stream, char *string, unsigned int length,
- int width, int force_ellipses)
-{
- register unsigned int i;
- unsigned int things_printed = 0;
- int in_literal_form = 0;
- int in_control_form = 0;
- int need_slashslash = 0;
- unsigned int c;
-
- if (length == 0)
- {
- fputs_filtered ("\"\"", stream);
- return;
- }
-
- for (i = 0; i < length && things_printed < print_max; ++i)
- {
- /* Position of the character we are examining
- to see whether it is repeated. */
- unsigned int rep1;
- /* Number of repetitions we have detected so far. */
- unsigned int reps;
-
- QUIT;
-
- if (need_slashslash)
- {
- fputs_filtered ("//", stream);
- need_slashslash = 0;
- }
-
- rep1 = i + 1;
- reps = 1;
- while (rep1 < length && string[rep1] == string[i])
- {
- ++rep1;
- ++reps;
- }
-
- c = string[i];
- if (reps > repeat_count_threshold)
- {
- if (in_control_form || in_literal_form)
- {
- if (in_control_form)
- fputs_filtered (")", stream);
- fputs_filtered ("\"//", stream);
- in_control_form = in_literal_form = 0;
- }
- chill_printchar (c, stream);
- fprintf_filtered (stream, "<repeats %u times>", reps);
- i = rep1 - 1;
- things_printed += repeat_count_threshold;
- need_slashslash = 1;
- }
- else
- {
- if (!in_literal_form && !in_control_form)
- fputs_filtered ("\"", stream);
- if (PRINT_LITERAL_FORM (c))
- {
- if (!in_literal_form)
- {
- if (in_control_form)
- {
- fputs_filtered (")", stream);
- in_control_form = 0;
- }
- in_literal_form = 1;
- }
- fprintf_filtered (stream, "%c", c);
- if (c == '"' || c == '^')
- /* duplicate this one as must be done at input */
- fprintf_filtered (stream, "%c", c);
- }
- else
- {
- if (!in_control_form)
- {
- if (in_literal_form)
- {
- in_literal_form = 0;
- }
- fputs_filtered ("^(", stream);
- in_control_form = 1;
- }
- else
- fprintf_filtered (stream, ",");
- c = c & 0xff;
- fprintf_filtered (stream, "%u", (unsigned int) c);
- }
- ++things_printed;
- }
- }
-
- /* Terminate the quotes if necessary. */
- if (in_control_form)
- {
- fputs_filtered (")", stream);
- }
- if (in_literal_form || in_control_form)
- {
- fputs_filtered ("\"", stream);
- }
- if (force_ellipses || (i < length))
- {
- fputs_filtered ("...", stream);
- }
-}
-
-static struct type *
-chill_create_fundamental_type (struct objfile *objfile, int typeid)
-{
- register struct type *type = NULL;
-
- switch (typeid)
- {
- default:
- /* FIXME: For now, if we are asked to produce a type not in this
- language, create the equivalent of a C integer type with the
- name "<?type?>". When all the dust settles from the type
- reconstruction work, this should probably become an error. */
- type = init_type (TYPE_CODE_INT, 2, 0, "<?type?>", objfile);
- warning ("internal error: no chill fundamental type %d", typeid);
- break;
- case FT_VOID:
- /* FIXME: Currently the GNU Chill compiler emits some DWARF entries for
- typedefs, unrelated to anything directly in the code being compiled,
- that have some FT_VOID types. Just fake it for now. */
- type = init_type (TYPE_CODE_VOID, 0, 0, "<?VOID?>", objfile);
- break;
- case FT_BOOLEAN:
- type = init_type (TYPE_CODE_BOOL, 1, TYPE_FLAG_UNSIGNED, "BOOL", objfile);
- break;
- case FT_CHAR:
- type = init_type (TYPE_CODE_CHAR, 1, TYPE_FLAG_UNSIGNED, "CHAR", objfile);
- break;
- case FT_SIGNED_CHAR:
- type = init_type (TYPE_CODE_INT, 1, 0, "BYTE", objfile);
- break;
- case FT_UNSIGNED_CHAR:
- type = init_type (TYPE_CODE_INT, 1, TYPE_FLAG_UNSIGNED, "UBYTE", objfile);
- break;
- case FT_SHORT: /* Chill ints are 2 bytes */
- type = init_type (TYPE_CODE_INT, 2, 0, "INT", objfile);
- break;
- case FT_UNSIGNED_SHORT: /* Chill ints are 2 bytes */
- type = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED, "UINT", objfile);
- break;
- case FT_INTEGER: /* FIXME? */
- case FT_SIGNED_INTEGER: /* FIXME? */
- case FT_LONG: /* Chill longs are 4 bytes */
- case FT_SIGNED_LONG: /* Chill longs are 4 bytes */
- type = init_type (TYPE_CODE_INT, 4, 0, "LONG", objfile);
- break;
- case FT_UNSIGNED_INTEGER: /* FIXME? */
- case FT_UNSIGNED_LONG: /* Chill longs are 4 bytes */
- type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED, "ULONG", objfile);
- break;
- case FT_FLOAT:
- type = init_type (TYPE_CODE_FLT, 4, 0, "REAL", objfile);
- break;
- case FT_DBL_PREC_FLOAT:
- type = init_type (TYPE_CODE_FLT, 8, 0, "LONG_REAL", objfile);
- break;
- }
- return (type);
-}
-\f
-
-/* Table of operators and their precedences for printing expressions. */
-
-static const struct op_print chill_op_print_tab[] =
-{
- {"AND", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
- {"OR", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
- {"NOT", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
- {"MOD", BINOP_MOD, PREC_MUL, 0},
- {"REM", BINOP_REM, PREC_MUL, 0},
- {"SIZE", UNOP_SIZEOF, PREC_BUILTIN_FUNCTION, 0},
- {"LOWER", UNOP_LOWER, PREC_BUILTIN_FUNCTION, 0},
- {"UPPER", UNOP_UPPER, PREC_BUILTIN_FUNCTION, 0},
- {"CARD", UNOP_CARD, PREC_BUILTIN_FUNCTION, 0},
- {"MAX", UNOP_CHMAX, PREC_BUILTIN_FUNCTION, 0},
- {"MIN", UNOP_CHMIN, PREC_BUILTIN_FUNCTION, 0},
- {":=", BINOP_ASSIGN, PREC_ASSIGN, 1},
- {"=", BINOP_EQUAL, PREC_EQUAL, 0},
- {"/=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
- {"<=", BINOP_LEQ, PREC_ORDER, 0},
- {">=", BINOP_GEQ, PREC_ORDER, 0},
- {">", BINOP_GTR, PREC_ORDER, 0},
- {"<", BINOP_LESS, PREC_ORDER, 0},
- {"+", BINOP_ADD, PREC_ADD, 0},
- {"-", BINOP_SUB, PREC_ADD, 0},
- {"*", BINOP_MUL, PREC_MUL, 0},
- {"/", BINOP_DIV, PREC_MUL, 0},
- {"//", BINOP_CONCAT, PREC_PREFIX, 0}, /* FIXME: precedence? */
- {"-", UNOP_NEG, PREC_PREFIX, 0},
- {"->", UNOP_IND, PREC_SUFFIX, 1},
- {"->", UNOP_ADDR, PREC_PREFIX, 0},
- {":", BINOP_RANGE, PREC_ASSIGN, 0},
- {NULL, 0, 0, 0}
-};
-\f
-/* The built-in types of Chill. */
-
-struct type *builtin_type_chill_bool;
-struct type *builtin_type_chill_char;
-struct type *builtin_type_chill_long;
-struct type *builtin_type_chill_ulong;
-struct type *builtin_type_chill_real;
-
-struct type **const (chill_builtin_types[]) =
-{
- &builtin_type_chill_bool,
- &builtin_type_chill_char,
- &builtin_type_chill_long,
- &builtin_type_chill_ulong,
- &builtin_type_chill_real,
- 0
-};
-
-/* Calculate LOWER or UPPER of TYPE.
- Returns the result as an integer.
- *RESULT_TYPE is the appropriate type for the result. */
-
-LONGEST
-type_lower_upper (enum exp_opcode op, /* Either UNOP_LOWER or UNOP_UPPER */
- struct type *type, struct type **result_type)
-{
- LONGEST low, high;
- *result_type = type;
- CHECK_TYPEDEF (type);
- switch (TYPE_CODE (type))
- {
- case TYPE_CODE_STRUCT:
- *result_type = builtin_type_int;
- if (chill_varying_type (type))
- return type_lower_upper (op, TYPE_FIELD_TYPE (type, 1), result_type);
- break;
- case TYPE_CODE_ARRAY:
- case TYPE_CODE_BITSTRING:
- case TYPE_CODE_STRING:
- type = TYPE_FIELD_TYPE (type, 0); /* Get index type */
-
- /* ... fall through ... */
- case TYPE_CODE_RANGE:
- *result_type = TYPE_TARGET_TYPE (type);
- return op == UNOP_LOWER ? TYPE_LOW_BOUND (type) : TYPE_HIGH_BOUND (type);
-
- case TYPE_CODE_ENUM:
- case TYPE_CODE_BOOL:
- case TYPE_CODE_INT:
- case TYPE_CODE_CHAR:
- if (get_discrete_bounds (type, &low, &high) >= 0)
- {
- *result_type = type;
- return op == UNOP_LOWER ? low : high;
- }
- break;
- case TYPE_CODE_UNDEF:
- case TYPE_CODE_PTR:
- case TYPE_CODE_UNION:
- case TYPE_CODE_FUNC:
- case TYPE_CODE_FLT:
- case TYPE_CODE_VOID:
- case TYPE_CODE_SET:
- case TYPE_CODE_ERROR:
- case TYPE_CODE_MEMBER:
- case TYPE_CODE_METHOD:
- case TYPE_CODE_REF:
- case TYPE_CODE_COMPLEX:
- default:
- break;
- }
- error ("unknown mode for LOWER/UPPER builtin");
-}
-
-static struct value *
-value_chill_length (struct value *val)
-{
- LONGEST tmp;
- struct type *type = VALUE_TYPE (val);
- struct type *ttype;
- CHECK_TYPEDEF (type);
- switch (TYPE_CODE (type))
- {
- case TYPE_CODE_ARRAY:
- case TYPE_CODE_BITSTRING:
- case TYPE_CODE_STRING:
- tmp = type_lower_upper (UNOP_UPPER, type, &ttype)
- - type_lower_upper (UNOP_LOWER, type, &ttype) + 1;
- break;
- case TYPE_CODE_STRUCT:
- if (chill_varying_type (type))
- {
- tmp = unpack_long (TYPE_FIELD_TYPE (type, 0), VALUE_CONTENTS (val));
- break;
- }
- /* ... else fall through ... */
- default:
- error ("bad argument to LENGTH builtin");
- }
- return value_from_longest (builtin_type_int, tmp);
-}
-
-static struct value *
-value_chill_card (struct value *val)
-{
- LONGEST tmp = 0;
- struct type *type = VALUE_TYPE (val);
- CHECK_TYPEDEF (type);
-
- if (TYPE_CODE (type) == TYPE_CODE_SET)
- {
- struct type *range_type = TYPE_INDEX_TYPE (type);
- LONGEST lower_bound, upper_bound;
- int i;
-
- get_discrete_bounds (range_type, &lower_bound, &upper_bound);
- for (i = lower_bound; i <= upper_bound; i++)
- if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
- tmp++;
- }
- else
- error ("bad argument to CARD builtin");
-
- return value_from_longest (builtin_type_int, tmp);
-}
-
-static struct value *
-value_chill_max_min (enum exp_opcode op, struct value *val)
-{
- LONGEST tmp = 0;
- struct type *type = VALUE_TYPE (val);
- struct type *elttype;
- CHECK_TYPEDEF (type);
-
- if (TYPE_CODE (type) == TYPE_CODE_SET)
- {
- LONGEST lower_bound, upper_bound;
- int i, empty = 1;
-
- elttype = TYPE_INDEX_TYPE (type);
- CHECK_TYPEDEF (elttype);
- get_discrete_bounds (elttype, &lower_bound, &upper_bound);
-
- if (op == UNOP_CHMAX)
- {
- for (i = upper_bound; i >= lower_bound; i--)
- {
- if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
- {
- tmp = i;
- empty = 0;
- break;
- }
- }
- }
- else
- {
- for (i = lower_bound; i <= upper_bound; i++)
- {
- if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
- {
- tmp = i;
- empty = 0;
- break;
- }
- }
- }
- if (empty)
- error ("%s for empty powerset", op == UNOP_CHMAX ? "MAX" : "MIN");
- }
- else
- error ("bad argument to %s builtin", op == UNOP_CHMAX ? "MAX" : "MIN");
-
- return value_from_longest (TYPE_CODE (elttype) == TYPE_CODE_RANGE
- ? TYPE_TARGET_TYPE (elttype)
- : elttype,
- tmp);
-}
-
-static struct value *
-evaluate_subexp_chill (struct type *expect_type,
- register struct expression *exp, register int *pos,
- enum noside noside)
-{
- int pc = *pos;
- struct type *type;
- int tem, nargs;
- struct value *arg1;
- struct value **argvec;
- enum exp_opcode op = exp->elts[*pos].opcode;
- switch (op)
- {
- case MULTI_SUBSCRIPT:
- if (noside == EVAL_SKIP)
- break;
- (*pos) += 3;
- nargs = longest_to_int (exp->elts[pc + 1].longconst);
- arg1 = evaluate_subexp_with_coercion (exp, pos, noside);
- type = check_typedef (VALUE_TYPE (arg1));
-
- if (nargs == 1 && TYPE_CODE (type) == TYPE_CODE_INT)
- {
- /* Looks like string repetition. */
- struct value *string = evaluate_subexp_with_coercion (exp, pos,
- noside);
- return value_concat (arg1, string);
- }
-
- switch (TYPE_CODE (type))
- {
- case TYPE_CODE_PTR:
- type = check_typedef (TYPE_TARGET_TYPE (type));
- if (!type || TYPE_CODE (type) != TYPE_CODE_FUNC)
- error ("reference value used as function");
- /* ... fall through ... */
- case TYPE_CODE_FUNC:
- /* It's a function call. */
- if (noside == EVAL_AVOID_SIDE_EFFECTS)
- break;
-
- /* Allocate arg vector, including space for the function to be
- called in argvec[0] and a terminating NULL */
- argvec = (struct value **) alloca (sizeof (struct value *)
- * (nargs + 2));
- argvec[0] = arg1;
- tem = 1;
- for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
- {
- argvec[tem]
- = evaluate_subexp_chill (TYPE_FIELD_TYPE (type, tem - 1),
- exp, pos, noside);
- }
- for (; tem <= nargs; tem++)
- argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
- argvec[tem] = 0; /* signal end of arglist */
-
- return call_function_by_hand (argvec[0], nargs, argvec + 1);
- default:
- break;
- }
-
- while (nargs-- > 0)
- {
- struct value *index = evaluate_subexp_with_coercion (exp, pos,
- noside);
- arg1 = value_subscript (arg1, index);
- }
- return (arg1);
-
- case UNOP_LOWER:
- case UNOP_UPPER:
- (*pos)++;
- if (noside == EVAL_SKIP)
- {
- (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, EVAL_SKIP);
- goto nosideret;
- }
- arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos,
- EVAL_AVOID_SIDE_EFFECTS);
- tem = type_lower_upper (op, VALUE_TYPE (arg1), &type);
- return value_from_longest (type, tem);
-
- case UNOP_LENGTH:
- (*pos)++;
- arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
- return value_chill_length (arg1);
-
- case UNOP_CARD:
- (*pos)++;
- arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
- return value_chill_card (arg1);
-
- case UNOP_CHMAX:
- case UNOP_CHMIN:
- (*pos)++;
- arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
- return value_chill_max_min (op, arg1);
-
- case BINOP_COMMA:
- error ("',' operator used in invalid context");
-
- default:
- break;
- }
-
- return evaluate_subexp_standard (expect_type, exp, pos, noside);
-nosideret:
- return value_from_longest (builtin_type_long, (LONGEST) 1);
-}
-
-const struct language_defn chill_language_defn =
-{
- "chill",
- language_chill,
- chill_builtin_types,
- range_check_on,
- type_check_on,
- case_sensitive_on,
- chill_parse, /* parser */
- chill_error, /* parser error function */
- evaluate_subexp_chill,
- chill_printchar, /* print a character constant */
- chill_printstr, /* function to print a string constant */
- NULL, /* Function to print a single char */
- chill_create_fundamental_type, /* Create fundamental type in this language */
- chill_print_type, /* Print a type using appropriate syntax */
- chill_val_print, /* Print a value using appropriate syntax */
- chill_value_print, /* Print a top-levl value */
- {"", "B'", "", ""}, /* Binary format info */
- {"O'%lo", "O'", "o", ""}, /* Octal format info */
- {"D'%ld", "D'", "d", ""}, /* Decimal format info */
- {"H'%lx", "H'", "x", ""}, /* Hex format info */
- chill_op_print_tab, /* expression operators for printing */
- 0, /* arrays are first-class (not c-style) */
- 0, /* String lower bound */
- &builtin_type_chill_char, /* Type of string elements */
- LANG_MAGIC
-};
-
-/* Initialization for Chill */
-
-void
-_initialize_chill_language (void)
-{
- builtin_type_chill_bool =
- init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
- "BOOL", (struct objfile *) NULL);
- builtin_type_chill_char =
- init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
- "CHAR", (struct objfile *) NULL);
- builtin_type_chill_long =
- init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
- 0,
- "LONG", (struct objfile *) NULL);
- builtin_type_chill_ulong =
- init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
- "ULONG", (struct objfile *) NULL);
- builtin_type_chill_real =
- init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
- 0,
- "LONG_REAL", (struct objfile *) NULL);
-
- add_language (&chill_language_defn);
-}
+// OBSOLETE /* Chill language support routines for GDB, the GNU debugger.
+// OBSOLETE Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "gdbtypes.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "expression.h"
+// OBSOLETE #include "parser-defs.h"
+// OBSOLETE #include "language.h"
+// OBSOLETE #include "ch-lang.h"
+// OBSOLETE #include "valprint.h"
+// OBSOLETE
+// OBSOLETE extern void _initialize_chill_language (void);
+// OBSOLETE
+// OBSOLETE static struct value *evaluate_subexp_chill (struct type *, struct expression *,
+// OBSOLETE int *, enum noside);
+// OBSOLETE
+// OBSOLETE static struct value *value_chill_max_min (enum exp_opcode, struct value *);
+// OBSOLETE
+// OBSOLETE static struct value *value_chill_card (struct value *);
+// OBSOLETE
+// OBSOLETE static struct value *value_chill_length (struct value *);
+// OBSOLETE
+// OBSOLETE static struct type *chill_create_fundamental_type (struct objfile *, int);
+// OBSOLETE
+// OBSOLETE static void chill_printstr (struct ui_file * stream, char *string,
+// OBSOLETE unsigned int length, int width,
+// OBSOLETE int force_ellipses);
+// OBSOLETE
+// OBSOLETE static void chill_printchar (int, struct ui_file *);
+// OBSOLETE
+// OBSOLETE /* For now, Chill uses a simple mangling algorithm whereby you simply
+// OBSOLETE discard everything after the occurance of two successive CPLUS_MARKER
+// OBSOLETE characters to derive the demangled form. */
+// OBSOLETE
+// OBSOLETE char *
+// OBSOLETE chill_demangle (const char *mangled)
+// OBSOLETE {
+// OBSOLETE const char *joiner = NULL;
+// OBSOLETE char *demangled;
+// OBSOLETE const char *cp = mangled;
+// OBSOLETE
+// OBSOLETE while (*cp)
+// OBSOLETE {
+// OBSOLETE if (is_cplus_marker (*cp))
+// OBSOLETE {
+// OBSOLETE joiner = cp;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE cp++;
+// OBSOLETE }
+// OBSOLETE if (joiner != NULL && *(joiner + 1) == *joiner)
+// OBSOLETE {
+// OBSOLETE demangled = savestring (mangled, joiner - mangled);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE demangled = NULL;
+// OBSOLETE }
+// OBSOLETE return (demangled);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE chill_printchar (register int c, struct ui_file *stream)
+// OBSOLETE {
+// OBSOLETE c &= 0xFF; /* Avoid sign bit follies */
+// OBSOLETE
+// OBSOLETE if (PRINT_LITERAL_FORM (c))
+// OBSOLETE {
+// OBSOLETE if (c == '\'' || c == '^')
+// OBSOLETE fprintf_filtered (stream, "'%c%c'", c, c);
+// OBSOLETE else
+// OBSOLETE fprintf_filtered (stream, "'%c'", c);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, "'^(%u)'", (unsigned int) c);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Print the character string STRING, printing at most LENGTH characters.
+// OBSOLETE Printing stops early if the number hits print_max; repeat counts
+// OBSOLETE are printed as appropriate. Print ellipses at the end if we
+// OBSOLETE had to stop before printing LENGTH characters, or if FORCE_ELLIPSES.
+// OBSOLETE Note that gdb maintains the length of strings without counting the
+// OBSOLETE terminating null byte, while chill strings are typically written with
+// OBSOLETE an explicit null byte. So we always assume an implied null byte
+// OBSOLETE until gdb is able to maintain non-null terminated strings as well
+// OBSOLETE as null terminated strings (FIXME).
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE chill_printstr (struct ui_file *stream, char *string, unsigned int length,
+// OBSOLETE int width, int force_ellipses)
+// OBSOLETE {
+// OBSOLETE register unsigned int i;
+// OBSOLETE unsigned int things_printed = 0;
+// OBSOLETE int in_literal_form = 0;
+// OBSOLETE int in_control_form = 0;
+// OBSOLETE int need_slashslash = 0;
+// OBSOLETE unsigned int c;
+// OBSOLETE
+// OBSOLETE if (length == 0)
+// OBSOLETE {
+// OBSOLETE fputs_filtered ("\"\"", stream);
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE for (i = 0; i < length && things_printed < print_max; ++i)
+// OBSOLETE {
+// OBSOLETE /* Position of the character we are examining
+// OBSOLETE to see whether it is repeated. */
+// OBSOLETE unsigned int rep1;
+// OBSOLETE /* Number of repetitions we have detected so far. */
+// OBSOLETE unsigned int reps;
+// OBSOLETE
+// OBSOLETE QUIT;
+// OBSOLETE
+// OBSOLETE if (need_slashslash)
+// OBSOLETE {
+// OBSOLETE fputs_filtered ("//", stream);
+// OBSOLETE need_slashslash = 0;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE rep1 = i + 1;
+// OBSOLETE reps = 1;
+// OBSOLETE while (rep1 < length && string[rep1] == string[i])
+// OBSOLETE {
+// OBSOLETE ++rep1;
+// OBSOLETE ++reps;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE c = string[i];
+// OBSOLETE if (reps > repeat_count_threshold)
+// OBSOLETE {
+// OBSOLETE if (in_control_form || in_literal_form)
+// OBSOLETE {
+// OBSOLETE if (in_control_form)
+// OBSOLETE fputs_filtered (")", stream);
+// OBSOLETE fputs_filtered ("\"//", stream);
+// OBSOLETE in_control_form = in_literal_form = 0;
+// OBSOLETE }
+// OBSOLETE chill_printchar (c, stream);
+// OBSOLETE fprintf_filtered (stream, "<repeats %u times>", reps);
+// OBSOLETE i = rep1 - 1;
+// OBSOLETE things_printed += repeat_count_threshold;
+// OBSOLETE need_slashslash = 1;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE if (!in_literal_form && !in_control_form)
+// OBSOLETE fputs_filtered ("\"", stream);
+// OBSOLETE if (PRINT_LITERAL_FORM (c))
+// OBSOLETE {
+// OBSOLETE if (!in_literal_form)
+// OBSOLETE {
+// OBSOLETE if (in_control_form)
+// OBSOLETE {
+// OBSOLETE fputs_filtered (")", stream);
+// OBSOLETE in_control_form = 0;
+// OBSOLETE }
+// OBSOLETE in_literal_form = 1;
+// OBSOLETE }
+// OBSOLETE fprintf_filtered (stream, "%c", c);
+// OBSOLETE if (c == '"' || c == '^')
+// OBSOLETE /* duplicate this one as must be done at input */
+// OBSOLETE fprintf_filtered (stream, "%c", c);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE if (!in_control_form)
+// OBSOLETE {
+// OBSOLETE if (in_literal_form)
+// OBSOLETE {
+// OBSOLETE in_literal_form = 0;
+// OBSOLETE }
+// OBSOLETE fputs_filtered ("^(", stream);
+// OBSOLETE in_control_form = 1;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE fprintf_filtered (stream, ",");
+// OBSOLETE c = c & 0xff;
+// OBSOLETE fprintf_filtered (stream, "%u", (unsigned int) c);
+// OBSOLETE }
+// OBSOLETE ++things_printed;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Terminate the quotes if necessary. */
+// OBSOLETE if (in_control_form)
+// OBSOLETE {
+// OBSOLETE fputs_filtered (")", stream);
+// OBSOLETE }
+// OBSOLETE if (in_literal_form || in_control_form)
+// OBSOLETE {
+// OBSOLETE fputs_filtered ("\"", stream);
+// OBSOLETE }
+// OBSOLETE if (force_ellipses || (i < length))
+// OBSOLETE {
+// OBSOLETE fputs_filtered ("...", stream);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static struct type *
+// OBSOLETE chill_create_fundamental_type (struct objfile *objfile, int typeid)
+// OBSOLETE {
+// OBSOLETE register struct type *type = NULL;
+// OBSOLETE
+// OBSOLETE switch (typeid)
+// OBSOLETE {
+// OBSOLETE default:
+// OBSOLETE /* FIXME: For now, if we are asked to produce a type not in this
+// OBSOLETE language, create the equivalent of a C integer type with the
+// OBSOLETE name "<?type?>". When all the dust settles from the type
+// OBSOLETE reconstruction work, this should probably become an error. */
+// OBSOLETE type = init_type (TYPE_CODE_INT, 2, 0, "<?type?>", objfile);
+// OBSOLETE warning ("internal error: no chill fundamental type %d", typeid);
+// OBSOLETE break;
+// OBSOLETE case FT_VOID:
+// OBSOLETE /* FIXME: Currently the GNU Chill compiler emits some DWARF entries for
+// OBSOLETE typedefs, unrelated to anything directly in the code being compiled,
+// OBSOLETE that have some FT_VOID types. Just fake it for now. */
+// OBSOLETE type = init_type (TYPE_CODE_VOID, 0, 0, "<?VOID?>", objfile);
+// OBSOLETE break;
+// OBSOLETE case FT_BOOLEAN:
+// OBSOLETE type = init_type (TYPE_CODE_BOOL, 1, TYPE_FLAG_UNSIGNED, "BOOL", objfile);
+// OBSOLETE break;
+// OBSOLETE case FT_CHAR:
+// OBSOLETE type = init_type (TYPE_CODE_CHAR, 1, TYPE_FLAG_UNSIGNED, "CHAR", objfile);
+// OBSOLETE break;
+// OBSOLETE case FT_SIGNED_CHAR:
+// OBSOLETE type = init_type (TYPE_CODE_INT, 1, 0, "BYTE", objfile);
+// OBSOLETE break;
+// OBSOLETE case FT_UNSIGNED_CHAR:
+// OBSOLETE type = init_type (TYPE_CODE_INT, 1, TYPE_FLAG_UNSIGNED, "UBYTE", objfile);
+// OBSOLETE break;
+// OBSOLETE case FT_SHORT: /* Chill ints are 2 bytes */
+// OBSOLETE type = init_type (TYPE_CODE_INT, 2, 0, "INT", objfile);
+// OBSOLETE break;
+// OBSOLETE case FT_UNSIGNED_SHORT: /* Chill ints are 2 bytes */
+// OBSOLETE type = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED, "UINT", objfile);
+// OBSOLETE break;
+// OBSOLETE case FT_INTEGER: /* FIXME? */
+// OBSOLETE case FT_SIGNED_INTEGER: /* FIXME? */
+// OBSOLETE case FT_LONG: /* Chill longs are 4 bytes */
+// OBSOLETE case FT_SIGNED_LONG: /* Chill longs are 4 bytes */
+// OBSOLETE type = init_type (TYPE_CODE_INT, 4, 0, "LONG", objfile);
+// OBSOLETE break;
+// OBSOLETE case FT_UNSIGNED_INTEGER: /* FIXME? */
+// OBSOLETE case FT_UNSIGNED_LONG: /* Chill longs are 4 bytes */
+// OBSOLETE type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED, "ULONG", objfile);
+// OBSOLETE break;
+// OBSOLETE case FT_FLOAT:
+// OBSOLETE type = init_type (TYPE_CODE_FLT, 4, 0, "REAL", objfile);
+// OBSOLETE break;
+// OBSOLETE case FT_DBL_PREC_FLOAT:
+// OBSOLETE type = init_type (TYPE_CODE_FLT, 8, 0, "LONG_REAL", objfile);
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE return (type);
+// OBSOLETE }
+// OBSOLETE \f
+// OBSOLETE
+// OBSOLETE /* Table of operators and their precedences for printing expressions. */
+// OBSOLETE
+// OBSOLETE static const struct op_print chill_op_print_tab[] =
+// OBSOLETE {
+// OBSOLETE {"AND", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
+// OBSOLETE {"OR", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
+// OBSOLETE {"NOT", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
+// OBSOLETE {"MOD", BINOP_MOD, PREC_MUL, 0},
+// OBSOLETE {"REM", BINOP_REM, PREC_MUL, 0},
+// OBSOLETE {"SIZE", UNOP_SIZEOF, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE {"LOWER", UNOP_LOWER, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE {"UPPER", UNOP_UPPER, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE {"CARD", UNOP_CARD, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE {"MAX", UNOP_CHMAX, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE {"MIN", UNOP_CHMIN, PREC_BUILTIN_FUNCTION, 0},
+// OBSOLETE {":=", BINOP_ASSIGN, PREC_ASSIGN, 1},
+// OBSOLETE {"=", BINOP_EQUAL, PREC_EQUAL, 0},
+// OBSOLETE {"/=", BINOP_NOTEQUAL, PREC_EQUAL, 0},
+// OBSOLETE {"<=", BINOP_LEQ, PREC_ORDER, 0},
+// OBSOLETE {">=", BINOP_GEQ, PREC_ORDER, 0},
+// OBSOLETE {">", BINOP_GTR, PREC_ORDER, 0},
+// OBSOLETE {"<", BINOP_LESS, PREC_ORDER, 0},
+// OBSOLETE {"+", BINOP_ADD, PREC_ADD, 0},
+// OBSOLETE {"-", BINOP_SUB, PREC_ADD, 0},
+// OBSOLETE {"*", BINOP_MUL, PREC_MUL, 0},
+// OBSOLETE {"/", BINOP_DIV, PREC_MUL, 0},
+// OBSOLETE {"//", BINOP_CONCAT, PREC_PREFIX, 0}, /* FIXME: precedence? */
+// OBSOLETE {"-", UNOP_NEG, PREC_PREFIX, 0},
+// OBSOLETE {"->", UNOP_IND, PREC_SUFFIX, 1},
+// OBSOLETE {"->", UNOP_ADDR, PREC_PREFIX, 0},
+// OBSOLETE {":", BINOP_RANGE, PREC_ASSIGN, 0},
+// OBSOLETE {NULL, 0, 0, 0}
+// OBSOLETE };
+// OBSOLETE \f
+// OBSOLETE /* The built-in types of Chill. */
+// OBSOLETE
+// OBSOLETE struct type *builtin_type_chill_bool;
+// OBSOLETE struct type *builtin_type_chill_char;
+// OBSOLETE struct type *builtin_type_chill_long;
+// OBSOLETE struct type *builtin_type_chill_ulong;
+// OBSOLETE struct type *builtin_type_chill_real;
+// OBSOLETE
+// OBSOLETE struct type **const (chill_builtin_types[]) =
+// OBSOLETE {
+// OBSOLETE &builtin_type_chill_bool,
+// OBSOLETE &builtin_type_chill_char,
+// OBSOLETE &builtin_type_chill_long,
+// OBSOLETE &builtin_type_chill_ulong,
+// OBSOLETE &builtin_type_chill_real,
+// OBSOLETE 0
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE /* Calculate LOWER or UPPER of TYPE.
+// OBSOLETE Returns the result as an integer.
+// OBSOLETE *RESULT_TYPE is the appropriate type for the result. */
+// OBSOLETE
+// OBSOLETE LONGEST
+// OBSOLETE type_lower_upper (enum exp_opcode op, /* Either UNOP_LOWER or UNOP_UPPER */
+// OBSOLETE struct type *type, struct type **result_type)
+// OBSOLETE {
+// OBSOLETE LONGEST low, high;
+// OBSOLETE *result_type = type;
+// OBSOLETE CHECK_TYPEDEF (type);
+// OBSOLETE switch (TYPE_CODE (type))
+// OBSOLETE {
+// OBSOLETE case TYPE_CODE_STRUCT:
+// OBSOLETE *result_type = builtin_type_int;
+// OBSOLETE if (chill_varying_type (type))
+// OBSOLETE return type_lower_upper (op, TYPE_FIELD_TYPE (type, 1), result_type);
+// OBSOLETE break;
+// OBSOLETE case TYPE_CODE_ARRAY:
+// OBSOLETE case TYPE_CODE_BITSTRING:
+// OBSOLETE case TYPE_CODE_STRING:
+// OBSOLETE type = TYPE_FIELD_TYPE (type, 0); /* Get index type */
+// OBSOLETE
+// OBSOLETE /* ... fall through ... */
+// OBSOLETE case TYPE_CODE_RANGE:
+// OBSOLETE *result_type = TYPE_TARGET_TYPE (type);
+// OBSOLETE return op == UNOP_LOWER ? TYPE_LOW_BOUND (type) : TYPE_HIGH_BOUND (type);
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_ENUM:
+// OBSOLETE case TYPE_CODE_BOOL:
+// OBSOLETE case TYPE_CODE_INT:
+// OBSOLETE case TYPE_CODE_CHAR:
+// OBSOLETE if (get_discrete_bounds (type, &low, &high) >= 0)
+// OBSOLETE {
+// OBSOLETE *result_type = type;
+// OBSOLETE return op == UNOP_LOWER ? low : high;
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE case TYPE_CODE_UNDEF:
+// OBSOLETE case TYPE_CODE_PTR:
+// OBSOLETE case TYPE_CODE_UNION:
+// OBSOLETE case TYPE_CODE_FUNC:
+// OBSOLETE case TYPE_CODE_FLT:
+// OBSOLETE case TYPE_CODE_VOID:
+// OBSOLETE case TYPE_CODE_SET:
+// OBSOLETE case TYPE_CODE_ERROR:
+// OBSOLETE case TYPE_CODE_MEMBER:
+// OBSOLETE case TYPE_CODE_METHOD:
+// OBSOLETE case TYPE_CODE_REF:
+// OBSOLETE case TYPE_CODE_COMPLEX:
+// OBSOLETE default:
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE error ("unknown mode for LOWER/UPPER builtin");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static struct value *
+// OBSOLETE value_chill_length (struct value *val)
+// OBSOLETE {
+// OBSOLETE LONGEST tmp;
+// OBSOLETE struct type *type = VALUE_TYPE (val);
+// OBSOLETE struct type *ttype;
+// OBSOLETE CHECK_TYPEDEF (type);
+// OBSOLETE switch (TYPE_CODE (type))
+// OBSOLETE {
+// OBSOLETE case TYPE_CODE_ARRAY:
+// OBSOLETE case TYPE_CODE_BITSTRING:
+// OBSOLETE case TYPE_CODE_STRING:
+// OBSOLETE tmp = type_lower_upper (UNOP_UPPER, type, &ttype)
+// OBSOLETE - type_lower_upper (UNOP_LOWER, type, &ttype) + 1;
+// OBSOLETE break;
+// OBSOLETE case TYPE_CODE_STRUCT:
+// OBSOLETE if (chill_varying_type (type))
+// OBSOLETE {
+// OBSOLETE tmp = unpack_long (TYPE_FIELD_TYPE (type, 0), VALUE_CONTENTS (val));
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE /* ... else fall through ... */
+// OBSOLETE default:
+// OBSOLETE error ("bad argument to LENGTH builtin");
+// OBSOLETE }
+// OBSOLETE return value_from_longest (builtin_type_int, tmp);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static struct value *
+// OBSOLETE value_chill_card (struct value *val)
+// OBSOLETE {
+// OBSOLETE LONGEST tmp = 0;
+// OBSOLETE struct type *type = VALUE_TYPE (val);
+// OBSOLETE CHECK_TYPEDEF (type);
+// OBSOLETE
+// OBSOLETE if (TYPE_CODE (type) == TYPE_CODE_SET)
+// OBSOLETE {
+// OBSOLETE struct type *range_type = TYPE_INDEX_TYPE (type);
+// OBSOLETE LONGEST lower_bound, upper_bound;
+// OBSOLETE int i;
+// OBSOLETE
+// OBSOLETE get_discrete_bounds (range_type, &lower_bound, &upper_bound);
+// OBSOLETE for (i = lower_bound; i <= upper_bound; i++)
+// OBSOLETE if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
+// OBSOLETE tmp++;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE error ("bad argument to CARD builtin");
+// OBSOLETE
+// OBSOLETE return value_from_longest (builtin_type_int, tmp);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static struct value *
+// OBSOLETE value_chill_max_min (enum exp_opcode op, struct value *val)
+// OBSOLETE {
+// OBSOLETE LONGEST tmp = 0;
+// OBSOLETE struct type *type = VALUE_TYPE (val);
+// OBSOLETE struct type *elttype;
+// OBSOLETE CHECK_TYPEDEF (type);
+// OBSOLETE
+// OBSOLETE if (TYPE_CODE (type) == TYPE_CODE_SET)
+// OBSOLETE {
+// OBSOLETE LONGEST lower_bound, upper_bound;
+// OBSOLETE int i, empty = 1;
+// OBSOLETE
+// OBSOLETE elttype = TYPE_INDEX_TYPE (type);
+// OBSOLETE CHECK_TYPEDEF (elttype);
+// OBSOLETE get_discrete_bounds (elttype, &lower_bound, &upper_bound);
+// OBSOLETE
+// OBSOLETE if (op == UNOP_CHMAX)
+// OBSOLETE {
+// OBSOLETE for (i = upper_bound; i >= lower_bound; i--)
+// OBSOLETE {
+// OBSOLETE if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
+// OBSOLETE {
+// OBSOLETE tmp = i;
+// OBSOLETE empty = 0;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE for (i = lower_bound; i <= upper_bound; i++)
+// OBSOLETE {
+// OBSOLETE if (value_bit_index (type, VALUE_CONTENTS (val), i) > 0)
+// OBSOLETE {
+// OBSOLETE tmp = i;
+// OBSOLETE empty = 0;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (empty)
+// OBSOLETE error ("%s for empty powerset", op == UNOP_CHMAX ? "MAX" : "MIN");
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE error ("bad argument to %s builtin", op == UNOP_CHMAX ? "MAX" : "MIN");
+// OBSOLETE
+// OBSOLETE return value_from_longest (TYPE_CODE (elttype) == TYPE_CODE_RANGE
+// OBSOLETE ? TYPE_TARGET_TYPE (elttype)
+// OBSOLETE : elttype,
+// OBSOLETE tmp);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static struct value *
+// OBSOLETE evaluate_subexp_chill (struct type *expect_type,
+// OBSOLETE register struct expression *exp, register int *pos,
+// OBSOLETE enum noside noside)
+// OBSOLETE {
+// OBSOLETE int pc = *pos;
+// OBSOLETE struct type *type;
+// OBSOLETE int tem, nargs;
+// OBSOLETE struct value *arg1;
+// OBSOLETE struct value **argvec;
+// OBSOLETE enum exp_opcode op = exp->elts[*pos].opcode;
+// OBSOLETE switch (op)
+// OBSOLETE {
+// OBSOLETE case MULTI_SUBSCRIPT:
+// OBSOLETE if (noside == EVAL_SKIP)
+// OBSOLETE break;
+// OBSOLETE (*pos) += 3;
+// OBSOLETE nargs = longest_to_int (exp->elts[pc + 1].longconst);
+// OBSOLETE arg1 = evaluate_subexp_with_coercion (exp, pos, noside);
+// OBSOLETE type = check_typedef (VALUE_TYPE (arg1));
+// OBSOLETE
+// OBSOLETE if (nargs == 1 && TYPE_CODE (type) == TYPE_CODE_INT)
+// OBSOLETE {
+// OBSOLETE /* Looks like string repetition. */
+// OBSOLETE struct value *string = evaluate_subexp_with_coercion (exp, pos,
+// OBSOLETE noside);
+// OBSOLETE return value_concat (arg1, string);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE switch (TYPE_CODE (type))
+// OBSOLETE {
+// OBSOLETE case TYPE_CODE_PTR:
+// OBSOLETE type = check_typedef (TYPE_TARGET_TYPE (type));
+// OBSOLETE if (!type || TYPE_CODE (type) != TYPE_CODE_FUNC)
+// OBSOLETE error ("reference value used as function");
+// OBSOLETE /* ... fall through ... */
+// OBSOLETE case TYPE_CODE_FUNC:
+// OBSOLETE /* It's a function call. */
+// OBSOLETE if (noside == EVAL_AVOID_SIDE_EFFECTS)
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE /* Allocate arg vector, including space for the function to be
+// OBSOLETE called in argvec[0] and a terminating NULL */
+// OBSOLETE argvec = (struct value **) alloca (sizeof (struct value *)
+// OBSOLETE * (nargs + 2));
+// OBSOLETE argvec[0] = arg1;
+// OBSOLETE tem = 1;
+// OBSOLETE for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
+// OBSOLETE {
+// OBSOLETE argvec[tem]
+// OBSOLETE = evaluate_subexp_chill (TYPE_FIELD_TYPE (type, tem - 1),
+// OBSOLETE exp, pos, noside);
+// OBSOLETE }
+// OBSOLETE for (; tem <= nargs; tem++)
+// OBSOLETE argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
+// OBSOLETE argvec[tem] = 0; /* signal end of arglist */
+// OBSOLETE
+// OBSOLETE return call_function_by_hand (argvec[0], nargs, argvec + 1);
+// OBSOLETE default:
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE while (nargs-- > 0)
+// OBSOLETE {
+// OBSOLETE struct value *index = evaluate_subexp_with_coercion (exp, pos,
+// OBSOLETE noside);
+// OBSOLETE arg1 = value_subscript (arg1, index);
+// OBSOLETE }
+// OBSOLETE return (arg1);
+// OBSOLETE
+// OBSOLETE case UNOP_LOWER:
+// OBSOLETE case UNOP_UPPER:
+// OBSOLETE (*pos)++;
+// OBSOLETE if (noside == EVAL_SKIP)
+// OBSOLETE {
+// OBSOLETE (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, EVAL_SKIP);
+// OBSOLETE goto nosideret;
+// OBSOLETE }
+// OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos,
+// OBSOLETE EVAL_AVOID_SIDE_EFFECTS);
+// OBSOLETE tem = type_lower_upper (op, VALUE_TYPE (arg1), &type);
+// OBSOLETE return value_from_longest (type, tem);
+// OBSOLETE
+// OBSOLETE case UNOP_LENGTH:
+// OBSOLETE (*pos)++;
+// OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
+// OBSOLETE return value_chill_length (arg1);
+// OBSOLETE
+// OBSOLETE case UNOP_CARD:
+// OBSOLETE (*pos)++;
+// OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
+// OBSOLETE return value_chill_card (arg1);
+// OBSOLETE
+// OBSOLETE case UNOP_CHMAX:
+// OBSOLETE case UNOP_CHMIN:
+// OBSOLETE (*pos)++;
+// OBSOLETE arg1 = (*exp->language_defn->evaluate_exp) (NULL_TYPE, exp, pos, noside);
+// OBSOLETE return value_chill_max_min (op, arg1);
+// OBSOLETE
+// OBSOLETE case BINOP_COMMA:
+// OBSOLETE error ("',' operator used in invalid context");
+// OBSOLETE
+// OBSOLETE default:
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE return evaluate_subexp_standard (expect_type, exp, pos, noside);
+// OBSOLETE nosideret:
+// OBSOLETE return value_from_longest (builtin_type_long, (LONGEST) 1);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE const struct language_defn chill_language_defn =
+// OBSOLETE {
+// OBSOLETE "chill",
+// OBSOLETE language_chill,
+// OBSOLETE chill_builtin_types,
+// OBSOLETE range_check_on,
+// OBSOLETE type_check_on,
+// OBSOLETE case_sensitive_on,
+// OBSOLETE chill_parse, /* parser */
+// OBSOLETE chill_error, /* parser error function */
+// OBSOLETE evaluate_subexp_chill,
+// OBSOLETE chill_printchar, /* print a character constant */
+// OBSOLETE chill_printstr, /* function to print a string constant */
+// OBSOLETE NULL, /* Function to print a single char */
+// OBSOLETE chill_create_fundamental_type, /* Create fundamental type in this language */
+// OBSOLETE chill_print_type, /* Print a type using appropriate syntax */
+// OBSOLETE chill_val_print, /* Print a value using appropriate syntax */
+// OBSOLETE chill_value_print, /* Print a top-levl value */
+// OBSOLETE {"", "B'", "", ""}, /* Binary format info */
+// OBSOLETE {"O'%lo", "O'", "o", ""}, /* Octal format info */
+// OBSOLETE {"D'%ld", "D'", "d", ""}, /* Decimal format info */
+// OBSOLETE {"H'%lx", "H'", "x", ""}, /* Hex format info */
+// OBSOLETE chill_op_print_tab, /* expression operators for printing */
+// OBSOLETE 0, /* arrays are first-class (not c-style) */
+// OBSOLETE 0, /* String lower bound */
+// OBSOLETE &builtin_type_chill_char, /* Type of string elements */
+// OBSOLETE LANG_MAGIC
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE /* Initialization for Chill */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE _initialize_chill_language (void)
+// OBSOLETE {
+// OBSOLETE builtin_type_chill_bool =
+// OBSOLETE init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+// OBSOLETE TYPE_FLAG_UNSIGNED,
+// OBSOLETE "BOOL", (struct objfile *) NULL);
+// OBSOLETE builtin_type_chill_char =
+// OBSOLETE init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
+// OBSOLETE TYPE_FLAG_UNSIGNED,
+// OBSOLETE "CHAR", (struct objfile *) NULL);
+// OBSOLETE builtin_type_chill_long =
+// OBSOLETE init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
+// OBSOLETE 0,
+// OBSOLETE "LONG", (struct objfile *) NULL);
+// OBSOLETE builtin_type_chill_ulong =
+// OBSOLETE init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
+// OBSOLETE TYPE_FLAG_UNSIGNED,
+// OBSOLETE "ULONG", (struct objfile *) NULL);
+// OBSOLETE builtin_type_chill_real =
+// OBSOLETE init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
+// OBSOLETE 0,
+// OBSOLETE "LONG_REAL", (struct objfile *) NULL);
+// OBSOLETE
+// OBSOLETE add_language (&chill_language_defn);
+// OBSOLETE }
-/* Chill language support definitions for GDB, the GNU debugger.
- Copyright 1992, 1994, 1996, 1998, 1999, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Forward decls for prototypes */
-struct value;
-
-extern int chill_parse (void); /* Defined in ch-exp.y */
-
-extern void chill_error (char *); /* Defined in ch-exp.y */
-
-/* Defined in ch-typeprint.c */
-extern void chill_print_type (struct type *, char *, struct ui_file *, int,
- int);
-
-extern int chill_val_print (struct type *, char *, int, CORE_ADDR,
- struct ui_file *, int, int, int,
- enum val_prettyprint);
-
-extern int chill_value_print (struct value *, struct ui_file *,
- int, enum val_prettyprint);
-
-extern LONGEST
-type_lower_upper (enum exp_opcode, struct type *, struct type **);
+// OBSOLETE /* Chill language support definitions for GDB, the GNU debugger.
+// OBSOLETE Copyright 1992, 1994, 1996, 1998, 1999, 2000
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE /* Forward decls for prototypes */
+// OBSOLETE struct value;
+// OBSOLETE
+// OBSOLETE extern int chill_parse (void); /* Defined in ch-exp.y */
+// OBSOLETE
+// OBSOLETE extern void chill_error (char *); /* Defined in ch-exp.y */
+// OBSOLETE
+// OBSOLETE /* Defined in ch-typeprint.c */
+// OBSOLETE extern void chill_print_type (struct type *, char *, struct ui_file *, int,
+// OBSOLETE int);
+// OBSOLETE
+// OBSOLETE extern int chill_val_print (struct type *, char *, int, CORE_ADDR,
+// OBSOLETE struct ui_file *, int, int, int,
+// OBSOLETE enum val_prettyprint);
+// OBSOLETE
+// OBSOLETE extern int chill_value_print (struct value *, struct ui_file *,
+// OBSOLETE int, enum val_prettyprint);
+// OBSOLETE
+// OBSOLETE extern LONGEST
+// OBSOLETE type_lower_upper (enum exp_opcode, struct type *, struct type **);
-/* Support for printing Chill types for GDB, the GNU debugger.
- Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 2000
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "obstack.h"
-#include "bfd.h" /* Binary File Description */
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "expression.h"
-#include "value.h"
-#include "gdbcore.h"
-#include "target.h"
-#include "language.h"
-#include "ch-lang.h"
-#include "typeprint.h"
-
-#include "gdb_string.h"
-#include <errno.h>
-
-static void chill_type_print_base (struct type *, struct ui_file *, int, int);
-
-void
-chill_print_type (struct type *type, char *varstring, struct ui_file *stream,
- int show, int level)
-{
- if (varstring != NULL && *varstring != '\0')
- {
- fputs_filtered (varstring, stream);
- fputs_filtered (" ", stream);
- }
- chill_type_print_base (type, stream, show, level);
-}
-
-/* Print the name of the type (or the ultimate pointer target,
- function value or array element).
-
- SHOW nonzero means don't print this type as just its name;
- show its real definition even if it has a name.
- SHOW zero means print just typename or tag if there is one
- SHOW negative means abbreviate structure elements.
- SHOW is decremented for printing of structure elements.
-
- LEVEL is the depth to indent by.
- We increase it for some recursive calls. */
-
-static void
-chill_type_print_base (struct type *type, struct ui_file *stream, int show,
- int level)
-{
- register int len;
- register int i;
- struct type *index_type;
- struct type *range_type;
- LONGEST low_bound;
- LONGEST high_bound;
-
- QUIT;
-
- wrap_here (" ");
- if (type == NULL)
- {
- fputs_filtered ("<type unknown>", stream);
- return;
- }
-
- /* When SHOW is zero or less, and there is a valid type name, then always
- just print the type name directly from the type. */
-
- if ((show <= 0) && (TYPE_NAME (type) != NULL))
- {
- fputs_filtered (TYPE_NAME (type), stream);
- return;
- }
-
- if (TYPE_CODE (type) != TYPE_CODE_TYPEDEF)
- CHECK_TYPEDEF (type);
-
- switch (TYPE_CODE (type))
- {
- case TYPE_CODE_TYPEDEF:
- chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
- break;
- case TYPE_CODE_PTR:
- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
- {
- fprintf_filtered (stream,
- TYPE_NAME (type) ? TYPE_NAME (type) : "PTR");
- break;
- }
- fprintf_filtered (stream, "REF ");
- chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
- break;
-
- case TYPE_CODE_BOOL:
- /* FIXME: we should probably just print the TYPE_NAME, in case
- anyone ever fixes the compiler to give us the real names
- in the presence of the chill equivalent of typedef (assuming
- there is one). */
- fprintf_filtered (stream,
- TYPE_NAME (type) ? TYPE_NAME (type) : "BOOL");
- break;
-
- case TYPE_CODE_ARRAY:
- fputs_filtered ("ARRAY (", stream);
- range_type = TYPE_FIELD_TYPE (type, 0);
- if (TYPE_CODE (range_type) != TYPE_CODE_RANGE)
- chill_print_type (range_type, "", stream, 0, level);
- else
- {
- index_type = TYPE_TARGET_TYPE (range_type);
- low_bound = TYPE_FIELD_BITPOS (range_type, 0);
- high_bound = TYPE_FIELD_BITPOS (range_type, 1);
- print_type_scalar (index_type, low_bound, stream);
- fputs_filtered (":", stream);
- print_type_scalar (index_type, high_bound, stream);
- }
- fputs_filtered (") ", stream);
- chill_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, level);
- break;
-
- case TYPE_CODE_BITSTRING:
- fprintf_filtered (stream, "BOOLS (%d)",
- TYPE_FIELD_BITPOS (TYPE_FIELD_TYPE (type, 0), 1) + 1);
- break;
-
- case TYPE_CODE_SET:
- fputs_filtered ("POWERSET ", stream);
- chill_print_type (TYPE_INDEX_TYPE (type), "", stream,
- show - 1, level);
- break;
-
- case TYPE_CODE_STRING:
- range_type = TYPE_FIELD_TYPE (type, 0);
- index_type = TYPE_TARGET_TYPE (range_type);
- high_bound = TYPE_FIELD_BITPOS (range_type, 1);
- fputs_filtered ("CHARS (", stream);
- print_type_scalar (index_type, high_bound + 1, stream);
- fputs_filtered (")", stream);
- break;
-
- case TYPE_CODE_MEMBER:
- fprintf_filtered (stream, "MEMBER ");
- chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
- break;
- case TYPE_CODE_REF:
- fprintf_filtered (stream, "/*LOC*/ ");
- chill_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
- break;
- case TYPE_CODE_FUNC:
- fprintf_filtered (stream, "PROC (");
- len = TYPE_NFIELDS (type);
- for (i = 0; i < len; i++)
- {
- struct type *param_type = TYPE_FIELD_TYPE (type, i);
- if (i > 0)
- {
- fputs_filtered (", ", stream);
- wrap_here (" ");
- }
- if (TYPE_CODE (param_type) == TYPE_CODE_REF)
- {
- chill_type_print_base (TYPE_TARGET_TYPE (param_type),
- stream, 0, level);
- fputs_filtered (" LOC", stream);
- }
- else
- chill_type_print_base (param_type, stream, show, level);
- }
- fprintf_filtered (stream, ")");
- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
- {
- fputs_filtered (" RETURNS (", stream);
- chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
- fputs_filtered (")", stream);
- }
- break;
-
- case TYPE_CODE_STRUCT:
- if (chill_varying_type (type))
- {
- chill_type_print_base (TYPE_FIELD_TYPE (type, 1),
- stream, 0, level);
- fputs_filtered (" VARYING", stream);
- }
- else
- {
- fprintf_filtered (stream, "STRUCT ");
-
- fprintf_filtered (stream, "(\n");
- if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
- {
- if (TYPE_STUB (type))
- {
- fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
- }
- else
- {
- fprintfi_filtered (level + 4, stream, "<no data fields>\n");
- }
- }
- else
- {
- len = TYPE_NFIELDS (type);
- for (i = TYPE_N_BASECLASSES (type); i < len; i++)
- {
- struct type *field_type = TYPE_FIELD_TYPE (type, i);
- QUIT;
- print_spaces_filtered (level + 4, stream);
- if (TYPE_CODE (field_type) == TYPE_CODE_UNION)
- {
- int j; /* variant number */
- fputs_filtered ("CASE OF\n", stream);
- for (j = 0; j < TYPE_NFIELDS (field_type); j++)
- {
- int k; /* variant field index */
- struct type *variant_type
- = TYPE_FIELD_TYPE (field_type, j);
- int var_len = TYPE_NFIELDS (variant_type);
- print_spaces_filtered (level + 4, stream);
- if (strcmp (TYPE_FIELD_NAME (field_type, j),
- "else") == 0)
- fputs_filtered ("ELSE\n", stream);
- else
- fputs_filtered (":\n", stream);
- if (TYPE_CODE (variant_type) != TYPE_CODE_STRUCT)
- error ("variant record confusion");
- for (k = 0; k < var_len; k++)
- {
- print_spaces_filtered (level + 8, stream);
- chill_print_type (TYPE_FIELD_TYPE (variant_type, k),
- TYPE_FIELD_NAME (variant_type, k),
- stream, show - 1, level + 8);
- if (k < (var_len - 1))
- fputs_filtered (",", stream);
- fputs_filtered ("\n", stream);
- }
- }
- print_spaces_filtered (level + 4, stream);
- fputs_filtered ("ESAC", stream);
- }
- else
- chill_print_type (field_type,
- TYPE_FIELD_NAME (type, i),
- stream, show - 1, level + 4);
- if (i < (len - 1))
- {
- fputs_filtered (",", stream);
- }
- fputs_filtered ("\n", stream);
- }
- }
- fprintfi_filtered (level, stream, ")");
- }
- break;
-
- case TYPE_CODE_RANGE:
- {
- struct type *target = TYPE_TARGET_TYPE (type);
- if (target && TYPE_NAME (target))
- fputs_filtered (TYPE_NAME (target), stream);
- else
- fputs_filtered ("RANGE", stream);
- if (target == NULL)
- target = builtin_type_long;
- fputs_filtered (" (", stream);
- print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
- fputs_filtered (":", stream);
- print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
- fputs_filtered (")", stream);
- }
- break;
-
- case TYPE_CODE_ENUM:
- {
- register int lastval = 0;
- fprintf_filtered (stream, "SET (");
- len = TYPE_NFIELDS (type);
- for (i = 0; i < len; i++)
- {
- QUIT;
- if (i)
- fprintf_filtered (stream, ", ");
- wrap_here (" ");
- fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
- if (lastval != TYPE_FIELD_BITPOS (type, i))
- {
- fprintf_filtered (stream, " = %d", TYPE_FIELD_BITPOS (type, i));
- lastval = TYPE_FIELD_BITPOS (type, i);
- }
- lastval++;
- }
- fprintf_filtered (stream, ")");
- }
- break;
-
- case TYPE_CODE_VOID:
- case TYPE_CODE_UNDEF:
- case TYPE_CODE_ERROR:
- case TYPE_CODE_UNION:
- case TYPE_CODE_METHOD:
- error ("missing language support in chill_type_print_base");
- break;
-
- default:
-
- /* Handle types not explicitly handled by the other cases,
- such as fundamental types. For these, just print whatever
- the type name is, as recorded in the type itself. If there
- is no type name, then complain. */
-
- if (TYPE_NAME (type) != NULL)
- {
- fputs_filtered (TYPE_NAME (type), stream);
- }
- else
- {
- error ("Unrecognized type code (%d) in symbol table.",
- TYPE_CODE (type));
- }
- break;
- }
-}
+// OBSOLETE /* Support for printing Chill types for GDB, the GNU debugger.
+// OBSOLETE Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 2000
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "gdb_obstack.h"
+// OBSOLETE #include "bfd.h" /* Binary File Description */
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "gdbtypes.h"
+// OBSOLETE #include "expression.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "target.h"
+// OBSOLETE #include "language.h"
+// OBSOLETE #include "ch-lang.h"
+// OBSOLETE #include "typeprint.h"
+// OBSOLETE
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE #include <errno.h>
+// OBSOLETE
+// OBSOLETE static void chill_type_print_base (struct type *, struct ui_file *, int, int);
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE chill_print_type (struct type *type, char *varstring, struct ui_file *stream,
+// OBSOLETE int show, int level)
+// OBSOLETE {
+// OBSOLETE if (varstring != NULL && *varstring != '\0')
+// OBSOLETE {
+// OBSOLETE fputs_filtered (varstring, stream);
+// OBSOLETE fputs_filtered (" ", stream);
+// OBSOLETE }
+// OBSOLETE chill_type_print_base (type, stream, show, level);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Print the name of the type (or the ultimate pointer target,
+// OBSOLETE function value or array element).
+// OBSOLETE
+// OBSOLETE SHOW nonzero means don't print this type as just its name;
+// OBSOLETE show its real definition even if it has a name.
+// OBSOLETE SHOW zero means print just typename or tag if there is one
+// OBSOLETE SHOW negative means abbreviate structure elements.
+// OBSOLETE SHOW is decremented for printing of structure elements.
+// OBSOLETE
+// OBSOLETE LEVEL is the depth to indent by.
+// OBSOLETE We increase it for some recursive calls. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE chill_type_print_base (struct type *type, struct ui_file *stream, int show,
+// OBSOLETE int level)
+// OBSOLETE {
+// OBSOLETE register int len;
+// OBSOLETE register int i;
+// OBSOLETE struct type *index_type;
+// OBSOLETE struct type *range_type;
+// OBSOLETE LONGEST low_bound;
+// OBSOLETE LONGEST high_bound;
+// OBSOLETE
+// OBSOLETE QUIT;
+// OBSOLETE
+// OBSOLETE wrap_here (" ");
+// OBSOLETE if (type == NULL)
+// OBSOLETE {
+// OBSOLETE fputs_filtered ("<type unknown>", stream);
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* When SHOW is zero or less, and there is a valid type name, then always
+// OBSOLETE just print the type name directly from the type. */
+// OBSOLETE
+// OBSOLETE if ((show <= 0) && (TYPE_NAME (type) != NULL))
+// OBSOLETE {
+// OBSOLETE fputs_filtered (TYPE_NAME (type), stream);
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (TYPE_CODE (type) != TYPE_CODE_TYPEDEF)
+// OBSOLETE CHECK_TYPEDEF (type);
+// OBSOLETE
+// OBSOLETE switch (TYPE_CODE (type))
+// OBSOLETE {
+// OBSOLETE case TYPE_CODE_TYPEDEF:
+// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+// OBSOLETE break;
+// OBSOLETE case TYPE_CODE_PTR:
+// OBSOLETE if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream,
+// OBSOLETE TYPE_NAME (type) ? TYPE_NAME (type) : "PTR");
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE fprintf_filtered (stream, "REF ");
+// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_BOOL:
+// OBSOLETE /* FIXME: we should probably just print the TYPE_NAME, in case
+// OBSOLETE anyone ever fixes the compiler to give us the real names
+// OBSOLETE in the presence of the chill equivalent of typedef (assuming
+// OBSOLETE there is one). */
+// OBSOLETE fprintf_filtered (stream,
+// OBSOLETE TYPE_NAME (type) ? TYPE_NAME (type) : "BOOL");
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_ARRAY:
+// OBSOLETE fputs_filtered ("ARRAY (", stream);
+// OBSOLETE range_type = TYPE_FIELD_TYPE (type, 0);
+// OBSOLETE if (TYPE_CODE (range_type) != TYPE_CODE_RANGE)
+// OBSOLETE chill_print_type (range_type, "", stream, 0, level);
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE index_type = TYPE_TARGET_TYPE (range_type);
+// OBSOLETE low_bound = TYPE_FIELD_BITPOS (range_type, 0);
+// OBSOLETE high_bound = TYPE_FIELD_BITPOS (range_type, 1);
+// OBSOLETE print_type_scalar (index_type, low_bound, stream);
+// OBSOLETE fputs_filtered (":", stream);
+// OBSOLETE print_type_scalar (index_type, high_bound, stream);
+// OBSOLETE }
+// OBSOLETE fputs_filtered (") ", stream);
+// OBSOLETE chill_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, level);
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_BITSTRING:
+// OBSOLETE fprintf_filtered (stream, "BOOLS (%d)",
+// OBSOLETE TYPE_FIELD_BITPOS (TYPE_FIELD_TYPE (type, 0), 1) + 1);
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_SET:
+// OBSOLETE fputs_filtered ("POWERSET ", stream);
+// OBSOLETE chill_print_type (TYPE_INDEX_TYPE (type), "", stream,
+// OBSOLETE show - 1, level);
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_STRING:
+// OBSOLETE range_type = TYPE_FIELD_TYPE (type, 0);
+// OBSOLETE index_type = TYPE_TARGET_TYPE (range_type);
+// OBSOLETE high_bound = TYPE_FIELD_BITPOS (range_type, 1);
+// OBSOLETE fputs_filtered ("CHARS (", stream);
+// OBSOLETE print_type_scalar (index_type, high_bound + 1, stream);
+// OBSOLETE fputs_filtered (")", stream);
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_MEMBER:
+// OBSOLETE fprintf_filtered (stream, "MEMBER ");
+// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+// OBSOLETE break;
+// OBSOLETE case TYPE_CODE_REF:
+// OBSOLETE fprintf_filtered (stream, "/*LOC*/ ");
+// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
+// OBSOLETE break;
+// OBSOLETE case TYPE_CODE_FUNC:
+// OBSOLETE fprintf_filtered (stream, "PROC (");
+// OBSOLETE len = TYPE_NFIELDS (type);
+// OBSOLETE for (i = 0; i < len; i++)
+// OBSOLETE {
+// OBSOLETE struct type *param_type = TYPE_FIELD_TYPE (type, i);
+// OBSOLETE if (i > 0)
+// OBSOLETE {
+// OBSOLETE fputs_filtered (", ", stream);
+// OBSOLETE wrap_here (" ");
+// OBSOLETE }
+// OBSOLETE if (TYPE_CODE (param_type) == TYPE_CODE_REF)
+// OBSOLETE {
+// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (param_type),
+// OBSOLETE stream, 0, level);
+// OBSOLETE fputs_filtered (" LOC", stream);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE chill_type_print_base (param_type, stream, show, level);
+// OBSOLETE }
+// OBSOLETE fprintf_filtered (stream, ")");
+// OBSOLETE if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
+// OBSOLETE {
+// OBSOLETE fputs_filtered (" RETURNS (", stream);
+// OBSOLETE chill_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+// OBSOLETE fputs_filtered (")", stream);
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_STRUCT:
+// OBSOLETE if (chill_varying_type (type))
+// OBSOLETE {
+// OBSOLETE chill_type_print_base (TYPE_FIELD_TYPE (type, 1),
+// OBSOLETE stream, 0, level);
+// OBSOLETE fputs_filtered (" VARYING", stream);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, "STRUCT ");
+// OBSOLETE
+// OBSOLETE fprintf_filtered (stream, "(\n");
+// OBSOLETE if ((TYPE_NFIELDS (type) == 0) && (TYPE_NFN_FIELDS (type) == 0))
+// OBSOLETE {
+// OBSOLETE if (TYPE_STUB (type))
+// OBSOLETE {
+// OBSOLETE fprintfi_filtered (level + 4, stream, "<incomplete type>\n");
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE fprintfi_filtered (level + 4, stream, "<no data fields>\n");
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE len = TYPE_NFIELDS (type);
+// OBSOLETE for (i = TYPE_N_BASECLASSES (type); i < len; i++)
+// OBSOLETE {
+// OBSOLETE struct type *field_type = TYPE_FIELD_TYPE (type, i);
+// OBSOLETE QUIT;
+// OBSOLETE print_spaces_filtered (level + 4, stream);
+// OBSOLETE if (TYPE_CODE (field_type) == TYPE_CODE_UNION)
+// OBSOLETE {
+// OBSOLETE int j; /* variant number */
+// OBSOLETE fputs_filtered ("CASE OF\n", stream);
+// OBSOLETE for (j = 0; j < TYPE_NFIELDS (field_type); j++)
+// OBSOLETE {
+// OBSOLETE int k; /* variant field index */
+// OBSOLETE struct type *variant_type
+// OBSOLETE = TYPE_FIELD_TYPE (field_type, j);
+// OBSOLETE int var_len = TYPE_NFIELDS (variant_type);
+// OBSOLETE print_spaces_filtered (level + 4, stream);
+// OBSOLETE if (strcmp (TYPE_FIELD_NAME (field_type, j),
+// OBSOLETE "else") == 0)
+// OBSOLETE fputs_filtered ("ELSE\n", stream);
+// OBSOLETE else
+// OBSOLETE fputs_filtered (":\n", stream);
+// OBSOLETE if (TYPE_CODE (variant_type) != TYPE_CODE_STRUCT)
+// OBSOLETE error ("variant record confusion");
+// OBSOLETE for (k = 0; k < var_len; k++)
+// OBSOLETE {
+// OBSOLETE print_spaces_filtered (level + 8, stream);
+// OBSOLETE chill_print_type (TYPE_FIELD_TYPE (variant_type, k),
+// OBSOLETE TYPE_FIELD_NAME (variant_type, k),
+// OBSOLETE stream, show - 1, level + 8);
+// OBSOLETE if (k < (var_len - 1))
+// OBSOLETE fputs_filtered (",", stream);
+// OBSOLETE fputs_filtered ("\n", stream);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE print_spaces_filtered (level + 4, stream);
+// OBSOLETE fputs_filtered ("ESAC", stream);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE chill_print_type (field_type,
+// OBSOLETE TYPE_FIELD_NAME (type, i),
+// OBSOLETE stream, show - 1, level + 4);
+// OBSOLETE if (i < (len - 1))
+// OBSOLETE {
+// OBSOLETE fputs_filtered (",", stream);
+// OBSOLETE }
+// OBSOLETE fputs_filtered ("\n", stream);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE fprintfi_filtered (level, stream, ")");
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_RANGE:
+// OBSOLETE {
+// OBSOLETE struct type *target = TYPE_TARGET_TYPE (type);
+// OBSOLETE if (target && TYPE_NAME (target))
+// OBSOLETE fputs_filtered (TYPE_NAME (target), stream);
+// OBSOLETE else
+// OBSOLETE fputs_filtered ("RANGE", stream);
+// OBSOLETE if (target == NULL)
+// OBSOLETE target = builtin_type_long;
+// OBSOLETE fputs_filtered (" (", stream);
+// OBSOLETE print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
+// OBSOLETE fputs_filtered (":", stream);
+// OBSOLETE print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
+// OBSOLETE fputs_filtered (")", stream);
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_ENUM:
+// OBSOLETE {
+// OBSOLETE register int lastval = 0;
+// OBSOLETE fprintf_filtered (stream, "SET (");
+// OBSOLETE len = TYPE_NFIELDS (type);
+// OBSOLETE for (i = 0; i < len; i++)
+// OBSOLETE {
+// OBSOLETE QUIT;
+// OBSOLETE if (i)
+// OBSOLETE fprintf_filtered (stream, ", ");
+// OBSOLETE wrap_here (" ");
+// OBSOLETE fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
+// OBSOLETE if (lastval != TYPE_FIELD_BITPOS (type, i))
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, " = %d", TYPE_FIELD_BITPOS (type, i));
+// OBSOLETE lastval = TYPE_FIELD_BITPOS (type, i);
+// OBSOLETE }
+// OBSOLETE lastval++;
+// OBSOLETE }
+// OBSOLETE fprintf_filtered (stream, ")");
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_VOID:
+// OBSOLETE case TYPE_CODE_UNDEF:
+// OBSOLETE case TYPE_CODE_ERROR:
+// OBSOLETE case TYPE_CODE_UNION:
+// OBSOLETE case TYPE_CODE_METHOD:
+// OBSOLETE error ("missing language support in chill_type_print_base");
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE default:
+// OBSOLETE
+// OBSOLETE /* Handle types not explicitly handled by the other cases,
+// OBSOLETE such as fundamental types. For these, just print whatever
+// OBSOLETE the type name is, as recorded in the type itself. If there
+// OBSOLETE is no type name, then complain. */
+// OBSOLETE
+// OBSOLETE if (TYPE_NAME (type) != NULL)
+// OBSOLETE {
+// OBSOLETE fputs_filtered (TYPE_NAME (type), stream);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE error ("Unrecognized type code (%d) in symbol table.",
+// OBSOLETE TYPE_CODE (type));
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE }
-/* Support for printing Chill values for GDB, the GNU debugger.
- Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 2000, 2001
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "obstack.h"
-#include "symtab.h"
-#include "gdbtypes.h"
-#include "valprint.h"
-#include "expression.h"
-#include "value.h"
-#include "language.h"
-#include "demangle.h"
-#include "c-lang.h" /* For c_val_print */
-#include "typeprint.h"
-#include "ch-lang.h"
-#include "annotate.h"
-
-static void chill_print_value_fields (struct type *, char *,
- struct ui_file *, int, int,
- enum val_prettyprint, struct type **);
-
-static void chill_print_type_scalar (struct type *, LONGEST,
- struct ui_file *);
-
-static void chill_val_print_array_elements (struct type *, char *,
- CORE_ADDR, struct ui_file *,
- int, int, int,
- enum val_prettyprint);
-\f
-
-/* Print integral scalar data VAL, of type TYPE, onto stdio stream STREAM.
- Used to print data from type structures in a specified type. For example,
- array bounds may be characters or booleans in some languages, and this
- allows the ranges to be printed in their "natural" form rather than as
- decimal integer values. */
-
-static void
-chill_print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
-{
- switch (TYPE_CODE (type))
- {
- case TYPE_CODE_RANGE:
- if (TYPE_TARGET_TYPE (type))
- {
- chill_print_type_scalar (TYPE_TARGET_TYPE (type), val, stream);
- return;
- }
- break;
- case TYPE_CODE_UNDEF:
- case TYPE_CODE_PTR:
- case TYPE_CODE_ARRAY:
- case TYPE_CODE_STRUCT:
- case TYPE_CODE_UNION:
- case TYPE_CODE_ENUM:
- case TYPE_CODE_FUNC:
- case TYPE_CODE_INT:
- case TYPE_CODE_FLT:
- case TYPE_CODE_VOID:
- case TYPE_CODE_SET:
- case TYPE_CODE_STRING:
- case TYPE_CODE_BITSTRING:
- case TYPE_CODE_ERROR:
- case TYPE_CODE_MEMBER:
- case TYPE_CODE_METHOD:
- case TYPE_CODE_REF:
- case TYPE_CODE_CHAR:
- case TYPE_CODE_BOOL:
- case TYPE_CODE_COMPLEX:
- case TYPE_CODE_TYPEDEF:
- default:
- break;
- }
- print_type_scalar (type, val, stream);
-}
-\f
-/* Print the elements of an array.
- Similar to val_print_array_elements, but prints
- element indexes (in Chill syntax). */
-
-static void
-chill_val_print_array_elements (struct type *type, char *valaddr,
- CORE_ADDR address, struct ui_file *stream,
- int format, int deref_ref, int recurse,
- enum val_prettyprint pretty)
-{
- unsigned int i = 0;
- unsigned int things_printed = 0;
- unsigned len;
- struct type *elttype;
- struct type *range_type = TYPE_FIELD_TYPE (type, 0);
- struct type *index_type = TYPE_TARGET_TYPE (range_type);
- unsigned eltlen;
- /* Position of the array element we are examining to see
- whether it is repeated. */
- unsigned int rep1;
- /* Number of repetitions we have detected so far. */
- unsigned int reps;
- LONGEST low_bound = TYPE_FIELD_BITPOS (range_type, 0);
-
- elttype = check_typedef (TYPE_TARGET_TYPE (type));
- eltlen = TYPE_LENGTH (elttype);
- len = TYPE_LENGTH (type) / eltlen;
-
- annotate_array_section_begin (i, elttype);
-
- for (; i < len && things_printed < print_max; i++)
- {
- if (i != 0)
- {
- if (prettyprint_arrays)
- {
- fprintf_filtered (stream, ",\n");
- print_spaces_filtered (2 + 2 * recurse, stream);
- }
- else
- {
- fprintf_filtered (stream, ", ");
- }
- }
- wrap_here (n_spaces (2 + 2 * recurse));
-
- rep1 = i + 1;
- reps = 1;
- while ((rep1 < len) &&
- !memcmp (valaddr + i * eltlen, valaddr + rep1 * eltlen, eltlen))
- {
- ++reps;
- ++rep1;
- }
-
- fputs_filtered ("(", stream);
- chill_print_type_scalar (index_type, low_bound + i, stream);
- if (reps > 1)
- {
- fputs_filtered (":", stream);
- chill_print_type_scalar (index_type, low_bound + i + reps - 1,
- stream);
- fputs_filtered ("): ", stream);
- val_print (elttype, valaddr + i * eltlen, 0, 0, stream, format,
- deref_ref, recurse + 1, pretty);
-
- i = rep1 - 1;
- things_printed += 1;
- }
- else
- {
- fputs_filtered ("): ", stream);
- val_print (elttype, valaddr + i * eltlen, 0, 0, stream, format,
- deref_ref, recurse + 1, pretty);
- annotate_elt ();
- things_printed++;
- }
- }
- annotate_array_section_end ();
- if (i < len)
- {
- fprintf_filtered (stream, "...");
- }
-}
-
-/* Print data of type TYPE located at VALADDR (within GDB), which came from
- the inferior at address ADDRESS, onto stdio stream STREAM according to
- FORMAT (a letter or 0 for natural format). The data at VALADDR is in
- target byte order.
-
- If the data are a string pointer, returns the number of string characters
- printed.
-
- If DEREF_REF is nonzero, then dereference references, otherwise just print
- them like pointers.
-
- The PRETTY parameter controls prettyprinting. */
-
-int
-chill_val_print (struct type *type, char *valaddr, int embedded_offset,
- CORE_ADDR address, struct ui_file *stream, int format,
- int deref_ref, int recurse, enum val_prettyprint pretty)
-{
- LONGEST val;
- unsigned int i = 0; /* Number of characters printed. */
- struct type *elttype;
- CORE_ADDR addr;
-
- CHECK_TYPEDEF (type);
-
- switch (TYPE_CODE (type))
- {
- case TYPE_CODE_ARRAY:
- if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
- {
- if (prettyprint_arrays)
- {
- print_spaces_filtered (2 + 2 * recurse, stream);
- }
- fprintf_filtered (stream, "[");
- chill_val_print_array_elements (type, valaddr, address, stream,
- format, deref_ref, recurse, pretty);
- fprintf_filtered (stream, "]");
- }
- else
- {
- error ("unimplemented in chill_val_print; unspecified array length");
- }
- break;
-
- case TYPE_CODE_INT:
- format = format ? format : output_format;
- if (format)
- {
- print_scalar_formatted (valaddr, type, format, 0, stream);
- }
- else
- {
- val_print_type_code_int (type, valaddr, stream);
- }
- break;
-
- case TYPE_CODE_CHAR:
- format = format ? format : output_format;
- if (format)
- {
- print_scalar_formatted (valaddr, type, format, 0, stream);
- }
- else
- {
- LA_PRINT_CHAR ((unsigned char) unpack_long (type, valaddr),
- stream);
- }
- break;
-
- case TYPE_CODE_FLT:
- if (format)
- {
- print_scalar_formatted (valaddr, type, format, 0, stream);
- }
- else
- {
- print_floating (valaddr, type, stream);
- }
- break;
-
- case TYPE_CODE_BOOL:
- format = format ? format : output_format;
- if (format)
- {
- print_scalar_formatted (valaddr, type, format, 0, stream);
- }
- else
- {
- /* FIXME: Why is this using builtin_type_chill_bool not type? */
- val = unpack_long (builtin_type_chill_bool, valaddr);
- fprintf_filtered (stream, val ? "TRUE" : "FALSE");
- }
- break;
-
- case TYPE_CODE_UNDEF:
- /* This happens (without TYPE_FLAG_STUB set) on systems which don't use
- dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
- and no complete type for struct foo in that file. */
- fprintf_filtered (stream, "<incomplete type>");
- break;
-
- case TYPE_CODE_PTR:
- if (format && format != 's')
- {
- print_scalar_formatted (valaddr, type, format, 0, stream);
- break;
- }
- addr = unpack_pointer (type, valaddr);
- elttype = check_typedef (TYPE_TARGET_TYPE (type));
-
- /* We assume a NULL pointer is all zeros ... */
- if (addr == 0)
- {
- fputs_filtered ("NULL", stream);
- return 0;
- }
-
- if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
- {
- /* Try to print what function it points to. */
- print_address_demangle (addr, stream, demangle);
- /* Return value is irrelevant except for string pointers. */
- return (0);
- }
- if (addressprint && format != 's')
- {
- print_address_numeric (addr, 1, stream);
- }
-
- /* For a pointer to char or unsigned char, also print the string
- pointed to, unless pointer is null. */
- if (TYPE_LENGTH (elttype) == 1
- && TYPE_CODE (elttype) == TYPE_CODE_CHAR
- && (format == 0 || format == 's')
- && addr != 0
- && /* If print_max is UINT_MAX, the alloca below will fail.
- In that case don't try to print the string. */
- print_max < UINT_MAX)
- i = val_print_string (addr, -1, TYPE_LENGTH (elttype), stream);
-
- /* Return number of characters printed, plus one for the
- terminating null if we have "reached the end". */
- return (i + (print_max && i != print_max));
- break;
-
- case TYPE_CODE_STRING:
- i = TYPE_LENGTH (type);
- LA_PRINT_STRING (stream, valaddr, i, 1, 0);
- /* Return number of characters printed, plus one for the terminating
- null if we have "reached the end". */
- return (i + (print_max && i != print_max));
- break;
-
- case TYPE_CODE_BITSTRING:
- case TYPE_CODE_SET:
- elttype = TYPE_INDEX_TYPE (type);
- CHECK_TYPEDEF (elttype);
- if (TYPE_STUB (elttype))
- {
- fprintf_filtered (stream, "<incomplete type>");
- gdb_flush (stream);
- break;
- }
- {
- struct type *range = elttype;
- LONGEST low_bound, high_bound;
- int i;
- int is_bitstring = TYPE_CODE (type) == TYPE_CODE_BITSTRING;
- int need_comma = 0;
-
- if (is_bitstring)
- fputs_filtered ("B'", stream);
- else
- fputs_filtered ("[", stream);
-
- i = get_discrete_bounds (range, &low_bound, &high_bound);
- maybe_bad_bstring:
- if (i < 0)
- {
- fputs_filtered ("<error value>", stream);
- goto done;
- }
-
- for (i = low_bound; i <= high_bound; i++)
- {
- int element = value_bit_index (type, valaddr, i);
- if (element < 0)
- {
- i = element;
- goto maybe_bad_bstring;
- }
- if (is_bitstring)
- fprintf_filtered (stream, "%d", element);
- else if (element)
- {
- if (need_comma)
- fputs_filtered (", ", stream);
- chill_print_type_scalar (range, (LONGEST) i, stream);
- need_comma = 1;
-
- /* Look for a continuous range of true elements. */
- if (i + 1 <= high_bound && value_bit_index (type, valaddr, ++i))
- {
- int j = i; /* j is the upper bound so far of the range */
- fputs_filtered (":", stream);
- while (i + 1 <= high_bound
- && value_bit_index (type, valaddr, ++i))
- j = i;
- chill_print_type_scalar (range, (LONGEST) j, stream);
- }
- }
- }
- done:
- if (is_bitstring)
- fputs_filtered ("'", stream);
- else
- fputs_filtered ("]", stream);
- }
- break;
-
- case TYPE_CODE_STRUCT:
- if (chill_varying_type (type))
- {
- struct type *inner = check_typedef (TYPE_FIELD_TYPE (type, 1));
- long length = unpack_long (TYPE_FIELD_TYPE (type, 0), valaddr);
- char *data_addr = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8;
-
- switch (TYPE_CODE (inner))
- {
- case TYPE_CODE_STRING:
- if (length > TYPE_LENGTH (type) - 2)
- {
- fprintf_filtered (stream,
- "<dynamic length %ld > static length %d> *invalid*",
- length, TYPE_LENGTH (type));
-
- /* Don't print the string; doing so might produce a
- segfault. */
- return length;
- }
- LA_PRINT_STRING (stream, data_addr, length, 1, 0);
- return length;
- default:
- break;
- }
- }
- chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
- 0);
- break;
-
- case TYPE_CODE_REF:
- if (addressprint)
- {
- fprintf_filtered (stream, "LOC(");
- print_address_numeric
- (extract_address (valaddr, TARGET_PTR_BIT / HOST_CHAR_BIT),
- 1,
- stream);
- fprintf_filtered (stream, ")");
- if (deref_ref)
- fputs_filtered (": ", stream);
- }
- /* De-reference the reference. */
- if (deref_ref)
- {
- if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_UNDEF)
- {
- struct value *deref_val =
- value_at
- (TYPE_TARGET_TYPE (type),
- unpack_pointer (lookup_pointer_type (builtin_type_void),
- valaddr),
- NULL);
- val_print (VALUE_TYPE (deref_val),
- VALUE_CONTENTS (deref_val),
- 0,
- VALUE_ADDRESS (deref_val), stream, format,
- deref_ref, recurse + 1, pretty);
- }
- else
- fputs_filtered ("???", stream);
- }
- break;
-
- case TYPE_CODE_ENUM:
- c_val_print (type, valaddr, 0, address, stream, format,
- deref_ref, recurse, pretty);
- break;
-
- case TYPE_CODE_RANGE:
- if (TYPE_TARGET_TYPE (type))
- chill_val_print (TYPE_TARGET_TYPE (type), valaddr, 0, address, stream,
- format, deref_ref, recurse, pretty);
- break;
-
- case TYPE_CODE_MEMBER:
- case TYPE_CODE_UNION:
- case TYPE_CODE_FUNC:
- case TYPE_CODE_VOID:
- case TYPE_CODE_ERROR:
- default:
- /* Let's defer printing to the C printer, rather than
- print an error message. FIXME! */
- c_val_print (type, valaddr, 0, address, stream, format,
- deref_ref, recurse, pretty);
- }
- gdb_flush (stream);
- return (0);
-}
-
-/* Mutually recursive subroutines of cplus_print_value and c_val_print to
- print out a structure's fields: cp_print_value_fields and cplus_print_value.
-
- TYPE, VALADDR, STREAM, RECURSE, and PRETTY have the
- same meanings as in cplus_print_value and c_val_print.
-
- DONT_PRINT is an array of baseclass types that we
- should not print, or zero if called from top level. */
-
-static void
-chill_print_value_fields (struct type *type, char *valaddr,
- struct ui_file *stream, int format, int recurse,
- enum val_prettyprint pretty, struct type **dont_print)
-{
- int i, len;
- int fields_seen = 0;
-
- CHECK_TYPEDEF (type);
-
- fprintf_filtered (stream, "[");
- len = TYPE_NFIELDS (type);
- if (len == 0)
- {
- fprintf_filtered (stream, "<No data fields>");
- }
- else
- {
- for (i = 0; i < len; i++)
- {
- if (fields_seen)
- {
- fprintf_filtered (stream, ", ");
- }
- fields_seen = 1;
- if (pretty)
- {
- fprintf_filtered (stream, "\n");
- print_spaces_filtered (2 + 2 * recurse, stream);
- }
- else
- {
- wrap_here (n_spaces (2 + 2 * recurse));
- }
- fputs_filtered (".", stream);
- fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
- language_chill, DMGL_NO_OPTS);
- fputs_filtered (": ", stream);
- if (TYPE_FIELD_PACKED (type, i))
- {
- struct value *v;
-
- /* Bitfields require special handling, especially due to byte
- order problems. */
- v = value_from_longest (TYPE_FIELD_TYPE (type, i),
- unpack_field_as_long (type, valaddr, i));
-
- chill_val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, 0,
- stream, format, 0, recurse + 1, pretty);
- }
- else
- {
- chill_val_print (TYPE_FIELD_TYPE (type, i),
- valaddr + TYPE_FIELD_BITPOS (type, i) / 8, 0,
- 0, stream, format, 0, recurse + 1, pretty);
- }
- }
- if (pretty)
- {
- fprintf_filtered (stream, "\n");
- print_spaces_filtered (2 * recurse, stream);
- }
- }
- fprintf_filtered (stream, "]");
-}
-\f
-int
-chill_value_print (struct value *val, struct ui_file *stream, int format,
- enum val_prettyprint pretty)
-{
- struct type *type = VALUE_TYPE (val);
- struct type *real_type = check_typedef (type);
-
- /* If it is a pointer, indicate what it points to.
-
- Print type also if it is a reference. */
-
- if (TYPE_CODE (real_type) == TYPE_CODE_PTR ||
- TYPE_CODE (real_type) == TYPE_CODE_REF)
- {
- char *valaddr = VALUE_CONTENTS (val);
- CORE_ADDR addr = unpack_pointer (type, valaddr);
- if (TYPE_CODE (type) != TYPE_CODE_PTR || addr != 0)
- {
- int i;
- char *name = TYPE_NAME (type);
- if (name)
- fputs_filtered (name, stream);
- else if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
- fputs_filtered ("PTR", stream);
- else
- {
- fprintf_filtered (stream, "(");
- type_print (type, "", stream, -1);
- fprintf_filtered (stream, ")");
- }
- fprintf_filtered (stream, "(");
- i = val_print (type, valaddr, 0, VALUE_ADDRESS (val),
- stream, format, 1, 0, pretty);
- fprintf_filtered (stream, ")");
- return i;
- }
- }
- return (val_print (type, VALUE_CONTENTS (val), 0,
- VALUE_ADDRESS (val), stream, format, 1, 0, pretty));
-}
+// OBSOLETE /* Support for printing Chill values for GDB, the GNU debugger.
+// OBSOLETE Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+// OBSOLETE 1998, 2000, 2001
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "gdb_obstack.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "gdbtypes.h"
+// OBSOLETE #include "valprint.h"
+// OBSOLETE #include "expression.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "language.h"
+// OBSOLETE #include "demangle.h"
+// OBSOLETE #include "c-lang.h" /* For c_val_print */
+// OBSOLETE #include "typeprint.h"
+// OBSOLETE #include "ch-lang.h"
+// OBSOLETE #include "annotate.h"
+// OBSOLETE
+// OBSOLETE static void chill_print_value_fields (struct type *, char *,
+// OBSOLETE struct ui_file *, int, int,
+// OBSOLETE enum val_prettyprint, struct type **);
+// OBSOLETE
+// OBSOLETE static void chill_print_type_scalar (struct type *, LONGEST,
+// OBSOLETE struct ui_file *);
+// OBSOLETE
+// OBSOLETE static void chill_val_print_array_elements (struct type *, char *,
+// OBSOLETE CORE_ADDR, struct ui_file *,
+// OBSOLETE int, int, int,
+// OBSOLETE enum val_prettyprint);
+// OBSOLETE \f
+// OBSOLETE
+// OBSOLETE /* Print integral scalar data VAL, of type TYPE, onto stdio stream STREAM.
+// OBSOLETE Used to print data from type structures in a specified type. For example,
+// OBSOLETE array bounds may be characters or booleans in some languages, and this
+// OBSOLETE allows the ranges to be printed in their "natural" form rather than as
+// OBSOLETE decimal integer values. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE chill_print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
+// OBSOLETE {
+// OBSOLETE switch (TYPE_CODE (type))
+// OBSOLETE {
+// OBSOLETE case TYPE_CODE_RANGE:
+// OBSOLETE if (TYPE_TARGET_TYPE (type))
+// OBSOLETE {
+// OBSOLETE chill_print_type_scalar (TYPE_TARGET_TYPE (type), val, stream);
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE case TYPE_CODE_UNDEF:
+// OBSOLETE case TYPE_CODE_PTR:
+// OBSOLETE case TYPE_CODE_ARRAY:
+// OBSOLETE case TYPE_CODE_STRUCT:
+// OBSOLETE case TYPE_CODE_UNION:
+// OBSOLETE case TYPE_CODE_ENUM:
+// OBSOLETE case TYPE_CODE_FUNC:
+// OBSOLETE case TYPE_CODE_INT:
+// OBSOLETE case TYPE_CODE_FLT:
+// OBSOLETE case TYPE_CODE_VOID:
+// OBSOLETE case TYPE_CODE_SET:
+// OBSOLETE case TYPE_CODE_STRING:
+// OBSOLETE case TYPE_CODE_BITSTRING:
+// OBSOLETE case TYPE_CODE_ERROR:
+// OBSOLETE case TYPE_CODE_MEMBER:
+// OBSOLETE case TYPE_CODE_METHOD:
+// OBSOLETE case TYPE_CODE_REF:
+// OBSOLETE case TYPE_CODE_CHAR:
+// OBSOLETE case TYPE_CODE_BOOL:
+// OBSOLETE case TYPE_CODE_COMPLEX:
+// OBSOLETE case TYPE_CODE_TYPEDEF:
+// OBSOLETE default:
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE print_type_scalar (type, val, stream);
+// OBSOLETE }
+// OBSOLETE \f
+// OBSOLETE /* Print the elements of an array.
+// OBSOLETE Similar to val_print_array_elements, but prints
+// OBSOLETE element indexes (in Chill syntax). */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE chill_val_print_array_elements (struct type *type, char *valaddr,
+// OBSOLETE CORE_ADDR address, struct ui_file *stream,
+// OBSOLETE int format, int deref_ref, int recurse,
+// OBSOLETE enum val_prettyprint pretty)
+// OBSOLETE {
+// OBSOLETE unsigned int i = 0;
+// OBSOLETE unsigned int things_printed = 0;
+// OBSOLETE unsigned len;
+// OBSOLETE struct type *elttype;
+// OBSOLETE struct type *range_type = TYPE_FIELD_TYPE (type, 0);
+// OBSOLETE struct type *index_type = TYPE_TARGET_TYPE (range_type);
+// OBSOLETE unsigned eltlen;
+// OBSOLETE /* Position of the array element we are examining to see
+// OBSOLETE whether it is repeated. */
+// OBSOLETE unsigned int rep1;
+// OBSOLETE /* Number of repetitions we have detected so far. */
+// OBSOLETE unsigned int reps;
+// OBSOLETE LONGEST low_bound = TYPE_FIELD_BITPOS (range_type, 0);
+// OBSOLETE
+// OBSOLETE elttype = check_typedef (TYPE_TARGET_TYPE (type));
+// OBSOLETE eltlen = TYPE_LENGTH (elttype);
+// OBSOLETE len = TYPE_LENGTH (type) / eltlen;
+// OBSOLETE
+// OBSOLETE annotate_array_section_begin (i, elttype);
+// OBSOLETE
+// OBSOLETE for (; i < len && things_printed < print_max; i++)
+// OBSOLETE {
+// OBSOLETE if (i != 0)
+// OBSOLETE {
+// OBSOLETE if (prettyprint_arrays)
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, ",\n");
+// OBSOLETE print_spaces_filtered (2 + 2 * recurse, stream);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, ", ");
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE wrap_here (n_spaces (2 + 2 * recurse));
+// OBSOLETE
+// OBSOLETE rep1 = i + 1;
+// OBSOLETE reps = 1;
+// OBSOLETE while ((rep1 < len) &&
+// OBSOLETE !memcmp (valaddr + i * eltlen, valaddr + rep1 * eltlen, eltlen))
+// OBSOLETE {
+// OBSOLETE ++reps;
+// OBSOLETE ++rep1;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE fputs_filtered ("(", stream);
+// OBSOLETE chill_print_type_scalar (index_type, low_bound + i, stream);
+// OBSOLETE if (reps > 1)
+// OBSOLETE {
+// OBSOLETE fputs_filtered (":", stream);
+// OBSOLETE chill_print_type_scalar (index_type, low_bound + i + reps - 1,
+// OBSOLETE stream);
+// OBSOLETE fputs_filtered ("): ", stream);
+// OBSOLETE val_print (elttype, valaddr + i * eltlen, 0, 0, stream, format,
+// OBSOLETE deref_ref, recurse + 1, pretty);
+// OBSOLETE
+// OBSOLETE i = rep1 - 1;
+// OBSOLETE things_printed += 1;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE fputs_filtered ("): ", stream);
+// OBSOLETE val_print (elttype, valaddr + i * eltlen, 0, 0, stream, format,
+// OBSOLETE deref_ref, recurse + 1, pretty);
+// OBSOLETE annotate_elt ();
+// OBSOLETE things_printed++;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE annotate_array_section_end ();
+// OBSOLETE if (i < len)
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, "...");
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Print data of type TYPE located at VALADDR (within GDB), which came from
+// OBSOLETE the inferior at address ADDRESS, onto stdio stream STREAM according to
+// OBSOLETE FORMAT (a letter or 0 for natural format). The data at VALADDR is in
+// OBSOLETE target byte order.
+// OBSOLETE
+// OBSOLETE If the data are a string pointer, returns the number of string characters
+// OBSOLETE printed.
+// OBSOLETE
+// OBSOLETE If DEREF_REF is nonzero, then dereference references, otherwise just print
+// OBSOLETE them like pointers.
+// OBSOLETE
+// OBSOLETE The PRETTY parameter controls prettyprinting. */
+// OBSOLETE
+// OBSOLETE int
+// OBSOLETE chill_val_print (struct type *type, char *valaddr, int embedded_offset,
+// OBSOLETE CORE_ADDR address, struct ui_file *stream, int format,
+// OBSOLETE int deref_ref, int recurse, enum val_prettyprint pretty)
+// OBSOLETE {
+// OBSOLETE LONGEST val;
+// OBSOLETE unsigned int i = 0; /* Number of characters printed. */
+// OBSOLETE struct type *elttype;
+// OBSOLETE CORE_ADDR addr;
+// OBSOLETE
+// OBSOLETE CHECK_TYPEDEF (type);
+// OBSOLETE
+// OBSOLETE switch (TYPE_CODE (type))
+// OBSOLETE {
+// OBSOLETE case TYPE_CODE_ARRAY:
+// OBSOLETE if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
+// OBSOLETE {
+// OBSOLETE if (prettyprint_arrays)
+// OBSOLETE {
+// OBSOLETE print_spaces_filtered (2 + 2 * recurse, stream);
+// OBSOLETE }
+// OBSOLETE fprintf_filtered (stream, "[");
+// OBSOLETE chill_val_print_array_elements (type, valaddr, address, stream,
+// OBSOLETE format, deref_ref, recurse, pretty);
+// OBSOLETE fprintf_filtered (stream, "]");
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE error ("unimplemented in chill_val_print; unspecified array length");
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_INT:
+// OBSOLETE format = format ? format : output_format;
+// OBSOLETE if (format)
+// OBSOLETE {
+// OBSOLETE print_scalar_formatted (valaddr, type, format, 0, stream);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE val_print_type_code_int (type, valaddr, stream);
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_CHAR:
+// OBSOLETE format = format ? format : output_format;
+// OBSOLETE if (format)
+// OBSOLETE {
+// OBSOLETE print_scalar_formatted (valaddr, type, format, 0, stream);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE LA_PRINT_CHAR ((unsigned char) unpack_long (type, valaddr),
+// OBSOLETE stream);
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_FLT:
+// OBSOLETE if (format)
+// OBSOLETE {
+// OBSOLETE print_scalar_formatted (valaddr, type, format, 0, stream);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE print_floating (valaddr, type, stream);
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_BOOL:
+// OBSOLETE format = format ? format : output_format;
+// OBSOLETE if (format)
+// OBSOLETE {
+// OBSOLETE print_scalar_formatted (valaddr, type, format, 0, stream);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE /* FIXME: Why is this using builtin_type_chill_bool not type? */
+// OBSOLETE val = unpack_long (builtin_type_chill_bool, valaddr);
+// OBSOLETE fprintf_filtered (stream, val ? "TRUE" : "FALSE");
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_UNDEF:
+// OBSOLETE /* This happens (without TYPE_FLAG_STUB set) on systems which don't use
+// OBSOLETE dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
+// OBSOLETE and no complete type for struct foo in that file. */
+// OBSOLETE fprintf_filtered (stream, "<incomplete type>");
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_PTR:
+// OBSOLETE if (format && format != 's')
+// OBSOLETE {
+// OBSOLETE print_scalar_formatted (valaddr, type, format, 0, stream);
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE addr = unpack_pointer (type, valaddr);
+// OBSOLETE elttype = check_typedef (TYPE_TARGET_TYPE (type));
+// OBSOLETE
+// OBSOLETE /* We assume a NULL pointer is all zeros ... */
+// OBSOLETE if (addr == 0)
+// OBSOLETE {
+// OBSOLETE fputs_filtered ("NULL", stream);
+// OBSOLETE return 0;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
+// OBSOLETE {
+// OBSOLETE /* Try to print what function it points to. */
+// OBSOLETE print_address_demangle (addr, stream, demangle);
+// OBSOLETE /* Return value is irrelevant except for string pointers. */
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE if (addressprint && format != 's')
+// OBSOLETE {
+// OBSOLETE print_address_numeric (addr, 1, stream);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* For a pointer to char or unsigned char, also print the string
+// OBSOLETE pointed to, unless pointer is null. */
+// OBSOLETE if (TYPE_LENGTH (elttype) == 1
+// OBSOLETE && TYPE_CODE (elttype) == TYPE_CODE_CHAR
+// OBSOLETE && (format == 0 || format == 's')
+// OBSOLETE && addr != 0
+// OBSOLETE && /* If print_max is UINT_MAX, the alloca below will fail.
+// OBSOLETE In that case don't try to print the string. */
+// OBSOLETE print_max < UINT_MAX)
+// OBSOLETE i = val_print_string (addr, -1, TYPE_LENGTH (elttype), stream);
+// OBSOLETE
+// OBSOLETE /* Return number of characters printed, plus one for the
+// OBSOLETE terminating null if we have "reached the end". */
+// OBSOLETE return (i + (print_max && i != print_max));
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_STRING:
+// OBSOLETE i = TYPE_LENGTH (type);
+// OBSOLETE LA_PRINT_STRING (stream, valaddr, i, 1, 0);
+// OBSOLETE /* Return number of characters printed, plus one for the terminating
+// OBSOLETE null if we have "reached the end". */
+// OBSOLETE return (i + (print_max && i != print_max));
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_BITSTRING:
+// OBSOLETE case TYPE_CODE_SET:
+// OBSOLETE elttype = TYPE_INDEX_TYPE (type);
+// OBSOLETE CHECK_TYPEDEF (elttype);
+// OBSOLETE if (TYPE_STUB (elttype))
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, "<incomplete type>");
+// OBSOLETE gdb_flush (stream);
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE {
+// OBSOLETE struct type *range = elttype;
+// OBSOLETE LONGEST low_bound, high_bound;
+// OBSOLETE int i;
+// OBSOLETE int is_bitstring = TYPE_CODE (type) == TYPE_CODE_BITSTRING;
+// OBSOLETE int need_comma = 0;
+// OBSOLETE
+// OBSOLETE if (is_bitstring)
+// OBSOLETE fputs_filtered ("B'", stream);
+// OBSOLETE else
+// OBSOLETE fputs_filtered ("[", stream);
+// OBSOLETE
+// OBSOLETE i = get_discrete_bounds (range, &low_bound, &high_bound);
+// OBSOLETE maybe_bad_bstring:
+// OBSOLETE if (i < 0)
+// OBSOLETE {
+// OBSOLETE fputs_filtered ("<error value>", stream);
+// OBSOLETE goto done;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE for (i = low_bound; i <= high_bound; i++)
+// OBSOLETE {
+// OBSOLETE int element = value_bit_index (type, valaddr, i);
+// OBSOLETE if (element < 0)
+// OBSOLETE {
+// OBSOLETE i = element;
+// OBSOLETE goto maybe_bad_bstring;
+// OBSOLETE }
+// OBSOLETE if (is_bitstring)
+// OBSOLETE fprintf_filtered (stream, "%d", element);
+// OBSOLETE else if (element)
+// OBSOLETE {
+// OBSOLETE if (need_comma)
+// OBSOLETE fputs_filtered (", ", stream);
+// OBSOLETE chill_print_type_scalar (range, (LONGEST) i, stream);
+// OBSOLETE need_comma = 1;
+// OBSOLETE
+// OBSOLETE /* Look for a continuous range of true elements. */
+// OBSOLETE if (i + 1 <= high_bound && value_bit_index (type, valaddr, ++i))
+// OBSOLETE {
+// OBSOLETE int j = i; /* j is the upper bound so far of the range */
+// OBSOLETE fputs_filtered (":", stream);
+// OBSOLETE while (i + 1 <= high_bound
+// OBSOLETE && value_bit_index (type, valaddr, ++i))
+// OBSOLETE j = i;
+// OBSOLETE chill_print_type_scalar (range, (LONGEST) j, stream);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE done:
+// OBSOLETE if (is_bitstring)
+// OBSOLETE fputs_filtered ("'", stream);
+// OBSOLETE else
+// OBSOLETE fputs_filtered ("]", stream);
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_STRUCT:
+// OBSOLETE if (chill_varying_type (type))
+// OBSOLETE {
+// OBSOLETE struct type *inner = check_typedef (TYPE_FIELD_TYPE (type, 1));
+// OBSOLETE long length = unpack_long (TYPE_FIELD_TYPE (type, 0), valaddr);
+// OBSOLETE char *data_addr = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8;
+// OBSOLETE
+// OBSOLETE switch (TYPE_CODE (inner))
+// OBSOLETE {
+// OBSOLETE case TYPE_CODE_STRING:
+// OBSOLETE if (length > TYPE_LENGTH (type) - 2)
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream,
+// OBSOLETE "<dynamic length %ld > static length %d> *invalid*",
+// OBSOLETE length, TYPE_LENGTH (type));
+// OBSOLETE
+// OBSOLETE /* Don't print the string; doing so might produce a
+// OBSOLETE segfault. */
+// OBSOLETE return length;
+// OBSOLETE }
+// OBSOLETE LA_PRINT_STRING (stream, data_addr, length, 1, 0);
+// OBSOLETE return length;
+// OBSOLETE default:
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
+// OBSOLETE 0);
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_REF:
+// OBSOLETE if (addressprint)
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, "LOC(");
+// OBSOLETE print_address_numeric
+// OBSOLETE (extract_address (valaddr, TARGET_PTR_BIT / HOST_CHAR_BIT),
+// OBSOLETE 1,
+// OBSOLETE stream);
+// OBSOLETE fprintf_filtered (stream, ")");
+// OBSOLETE if (deref_ref)
+// OBSOLETE fputs_filtered (": ", stream);
+// OBSOLETE }
+// OBSOLETE /* De-reference the reference. */
+// OBSOLETE if (deref_ref)
+// OBSOLETE {
+// OBSOLETE if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_UNDEF)
+// OBSOLETE {
+// OBSOLETE struct value *deref_val =
+// OBSOLETE value_at
+// OBSOLETE (TYPE_TARGET_TYPE (type),
+// OBSOLETE unpack_pointer (lookup_pointer_type (builtin_type_void),
+// OBSOLETE valaddr),
+// OBSOLETE NULL);
+// OBSOLETE val_print (VALUE_TYPE (deref_val),
+// OBSOLETE VALUE_CONTENTS (deref_val),
+// OBSOLETE 0,
+// OBSOLETE VALUE_ADDRESS (deref_val), stream, format,
+// OBSOLETE deref_ref, recurse + 1, pretty);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE fputs_filtered ("???", stream);
+// OBSOLETE }
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_ENUM:
+// OBSOLETE c_val_print (type, valaddr, 0, address, stream, format,
+// OBSOLETE deref_ref, recurse, pretty);
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_RANGE:
+// OBSOLETE if (TYPE_TARGET_TYPE (type))
+// OBSOLETE chill_val_print (TYPE_TARGET_TYPE (type), valaddr, 0, address, stream,
+// OBSOLETE format, deref_ref, recurse, pretty);
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case TYPE_CODE_MEMBER:
+// OBSOLETE case TYPE_CODE_UNION:
+// OBSOLETE case TYPE_CODE_FUNC:
+// OBSOLETE case TYPE_CODE_VOID:
+// OBSOLETE case TYPE_CODE_ERROR:
+// OBSOLETE default:
+// OBSOLETE /* Let's defer printing to the C printer, rather than
+// OBSOLETE print an error message. FIXME! */
+// OBSOLETE c_val_print (type, valaddr, 0, address, stream, format,
+// OBSOLETE deref_ref, recurse, pretty);
+// OBSOLETE }
+// OBSOLETE gdb_flush (stream);
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Mutually recursive subroutines of cplus_print_value and c_val_print to
+// OBSOLETE print out a structure's fields: cp_print_value_fields and cplus_print_value.
+// OBSOLETE
+// OBSOLETE TYPE, VALADDR, STREAM, RECURSE, and PRETTY have the
+// OBSOLETE same meanings as in cplus_print_value and c_val_print.
+// OBSOLETE
+// OBSOLETE DONT_PRINT is an array of baseclass types that we
+// OBSOLETE should not print, or zero if called from top level. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE chill_print_value_fields (struct type *type, char *valaddr,
+// OBSOLETE struct ui_file *stream, int format, int recurse,
+// OBSOLETE enum val_prettyprint pretty, struct type **dont_print)
+// OBSOLETE {
+// OBSOLETE int i, len;
+// OBSOLETE int fields_seen = 0;
+// OBSOLETE
+// OBSOLETE CHECK_TYPEDEF (type);
+// OBSOLETE
+// OBSOLETE fprintf_filtered (stream, "[");
+// OBSOLETE len = TYPE_NFIELDS (type);
+// OBSOLETE if (len == 0)
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, "<No data fields>");
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE for (i = 0; i < len; i++)
+// OBSOLETE {
+// OBSOLETE if (fields_seen)
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, ", ");
+// OBSOLETE }
+// OBSOLETE fields_seen = 1;
+// OBSOLETE if (pretty)
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, "\n");
+// OBSOLETE print_spaces_filtered (2 + 2 * recurse, stream);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE wrap_here (n_spaces (2 + 2 * recurse));
+// OBSOLETE }
+// OBSOLETE fputs_filtered (".", stream);
+// OBSOLETE fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
+// OBSOLETE language_chill, DMGL_NO_OPTS);
+// OBSOLETE fputs_filtered (": ", stream);
+// OBSOLETE if (TYPE_FIELD_PACKED (type, i))
+// OBSOLETE {
+// OBSOLETE struct value *v;
+// OBSOLETE
+// OBSOLETE /* Bitfields require special handling, especially due to byte
+// OBSOLETE order problems. */
+// OBSOLETE v = value_from_longest (TYPE_FIELD_TYPE (type, i),
+// OBSOLETE unpack_field_as_long (type, valaddr, i));
+// OBSOLETE
+// OBSOLETE chill_val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, 0,
+// OBSOLETE stream, format, 0, recurse + 1, pretty);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE chill_val_print (TYPE_FIELD_TYPE (type, i),
+// OBSOLETE valaddr + TYPE_FIELD_BITPOS (type, i) / 8, 0,
+// OBSOLETE 0, stream, format, 0, recurse + 1, pretty);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE if (pretty)
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, "\n");
+// OBSOLETE print_spaces_filtered (2 * recurse, stream);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE fprintf_filtered (stream, "]");
+// OBSOLETE }
+// OBSOLETE \f
+// OBSOLETE int
+// OBSOLETE chill_value_print (struct value *val, struct ui_file *stream, int format,
+// OBSOLETE enum val_prettyprint pretty)
+// OBSOLETE {
+// OBSOLETE struct type *type = VALUE_TYPE (val);
+// OBSOLETE struct type *real_type = check_typedef (type);
+// OBSOLETE
+// OBSOLETE /* If it is a pointer, indicate what it points to.
+// OBSOLETE
+// OBSOLETE Print type also if it is a reference. */
+// OBSOLETE
+// OBSOLETE if (TYPE_CODE (real_type) == TYPE_CODE_PTR ||
+// OBSOLETE TYPE_CODE (real_type) == TYPE_CODE_REF)
+// OBSOLETE {
+// OBSOLETE char *valaddr = VALUE_CONTENTS (val);
+// OBSOLETE CORE_ADDR addr = unpack_pointer (type, valaddr);
+// OBSOLETE if (TYPE_CODE (type) != TYPE_CODE_PTR || addr != 0)
+// OBSOLETE {
+// OBSOLETE int i;
+// OBSOLETE char *name = TYPE_NAME (type);
+// OBSOLETE if (name)
+// OBSOLETE fputs_filtered (name, stream);
+// OBSOLETE else if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID)
+// OBSOLETE fputs_filtered ("PTR", stream);
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (stream, "(");
+// OBSOLETE type_print (type, "", stream, -1);
+// OBSOLETE fprintf_filtered (stream, ")");
+// OBSOLETE }
+// OBSOLETE fprintf_filtered (stream, "(");
+// OBSOLETE i = val_print (type, valaddr, 0, VALUE_ADDRESS (val),
+// OBSOLETE stream, format, 1, 0, pretty);
+// OBSOLETE fprintf_filtered (stream, ")");
+// OBSOLETE return i;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE return (val_print (type, VALUE_CONTENTS (val), 0,
+// OBSOLETE VALUE_ADDRESS (val), stream, format, 1, 0, pretty));
+// OBSOLETE }
#include "target.h" /* For baud_rate, remote_debug and remote_timeout */
#include "gdb_wait.h" /* For shell escape implementation */
#include "gdb_regex.h" /* Used by apropos_command */
+#include "gdb_string.h"
#include "filenames.h" /* for DOSish file names */
#include "ui-out.h"
#include "symtab.h"
#include <ctype.h>
#include "gdb_regex.h"
+#include "gdb_string.h"
#include "ui-out.h"
static void
dump_srec_memory (char *args, int from_tty)
{
- dump_memory_to_file (args, "w", "srec");
+ dump_memory_to_file (args, FOPEN_WB, "srec");
}
static void
dump_srec_value (char *args, int from_tty)
{
- dump_value_to_file (args, "w", "srec");
+ dump_value_to_file (args, FOPEN_WB, "srec");
}
static void
dump_ihex_memory (char *args, int from_tty)
{
- dump_memory_to_file (args, "w", "ihex");
+ dump_memory_to_file (args, FOPEN_WB, "ihex");
}
static void
dump_ihex_value (char *args, int from_tty)
{
- dump_value_to_file (args, "w", "ihex");
+ dump_value_to_file (args, FOPEN_WB, "ihex");
}
static void
dump_tekhex_memory (char *args, int from_tty)
{
- dump_memory_to_file (args, "w", "tekhex");
+ dump_memory_to_file (args, FOPEN_WB, "tekhex");
}
static void
dump_tekhex_value (char *args, int from_tty)
{
- dump_value_to_file (args, "w", "tekhex");
+ dump_value_to_file (args, FOPEN_WB, "tekhex");
}
static void
dump_binary_memory (char *args, int from_tty)
{
- dump_memory_to_file (args, "w", "binary");
+ dump_memory_to_file (args, FOPEN_WB, "binary");
}
static void
dump_binary_value (char *args, int from_tty)
{
- dump_value_to_file (args, "w", "binary");
+ dump_value_to_file (args, FOPEN_WB, "binary");
}
static void
append_binary_memory (char *args, int from_tty)
{
- dump_memory_to_file (args, "a", "binary");
+ dump_memory_to_file (args, FOPEN_AB, "binary");
}
static void
append_binary_value (char *args, int from_tty)
{
- dump_value_to_file (args, "a", "binary");
+ dump_value_to_file (args, FOPEN_AB, "binary");
}
struct dump_context
c->completer = filename_completer;
d = XMALLOC (struct dump_context);
d->func = func;
- d->mode = "w";
+ d->mode = FOPEN_WB;
set_cmd_context (c, d);
c->func = call_dump_func;
c->completer = filename_completer;
d = XMALLOC (struct dump_context);
d->func = func;
- d->mode = "a";
+ d->mode = FOPEN_AB;
set_cmd_context (c, d);
c->func = call_dump_func;
static void
restore_binary_file (char *filename, struct callback_data *data)
{
- FILE *file = fopen_with_cleanup (filename, "r");
+ FILE *file = fopen_with_cleanup (filename, FOPEN_RB);
int status;
char *buf;
long len;
#include <ctype.h>
#include "ui-out.h"
+#include "gdb_string.h"
#include "top.h"
#include "cli/cli-cmds.h"
#include "defs.h"
#include "value.h"
#include <ctype.h>
-#if 0
#include "gdb_string.h"
-#endif
#include "ui-out.h"
#include "breakpoint.h"
#include "bfd.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "gdb_string.h"
#include <ctype.h>
-# Target: ARC processor
-TDEPFILES = arc-tdep.o
-TM_FILE = tm-arc.h
+# OBSOLETE # Target: ARC processor
+# OBSOLETE TDEPFILES = arc-tdep.o
+# OBSOLETE TM_FILE = tm-arc.h
-/* Parameters for target machine ARC, for GDB, the GNU debugger.
- Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
- Contributed by Cygnus Support.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "regcache.h"
-
-/* Used by arc-tdep.c to set the default cpu type. */
-#define DEFAULT_ARC_CPU_TYPE "base"
-
-/* Offset from address of function to start of its code.
- Zero on most machines. */
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions
- to reach some "real" code. */
-
-#define SKIP_PROLOGUE(pc) (arc_skip_prologue (pc, 0))
-extern CORE_ADDR arc_skip_prologue (CORE_ADDR, int);
-
-#define PROLOGUE_FRAMELESS_P(pc) arc_prologue_frameless_p(pc)
-extern int arc_prologue_frameless_p (CORE_ADDR);
-
-/* Sequence of bytes for breakpoint instruction.
- ??? The current value is "sr -1,[-1]" and is for the simulator only.
- The simulator watches for this and does the right thing.
- The hardware version will have to associate with each breakpoint
- the sequence "flag 1; nop; nop; nop". IE: The breakpoint insn will not
- be a fixed set of bits but instead will be a branch to a semi-random
- address. Presumably this will be cleaned up for "second silicon". */
-#define BIG_BREAKPOINT { 0x12, 0x1f, 0xff, 0xff }
-#define LITTLE_BREAKPOINT { 0xff, 0xff, 0x1f, 0x12 }
-
-/* Given the exposed pipeline, there isn't any one correct value.
- However, this value must be 4. GDB can't handle any other value (other than
- zero). See for example infrun.c:
- "prev_pc != stop_pc - DECR_PC_AFTER_BREAK" */
-/* FIXME */
-#define DECR_PC_AFTER_BREAK 8
-
-/* We don't have a reliable single step facility.
- ??? We do have a cycle single step facility, but that won't work. */
-#define SOFTWARE_SINGLE_STEP_P() 1
-extern void arc_software_single_step (enum target_signal, int);
-#define SOFTWARE_SINGLE_STEP(sig,bp_p) arc_software_single_step (sig, bp_p)
-
-/* FIXME: Need to set STEP_SKIPS_DELAY. */
-
-/* Given a pc value as defined by the hardware, return the real address.
- Remember that on the ARC blink contains that status register which
- includes PC + flags (so we have to mask out the flags). */
-#define ARC_PC_TO_REAL_ADDRESS(pc) (((pc) & 0xffffff) << 2)
-
-/* Immediately after a function call, return the saved pc.
- Can't always go through the frames for this because on some machines
- the new frame is not set up until the new function
- executes some instructions. */
-
-#define SAVED_PC_AFTER_CALL(frame) \
- (ARC_PC_TO_REAL_ADDRESS (read_register (BLINK_REGNUM)))
-
-/* Stack grows upward */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* Say how long (ordinary) registers are. This is a piece of bogosity
- used in push_word and a few other places; REGISTER_RAW_SIZE is the
- real way to know how big a register is. */
-#define REGISTER_SIZE 4
-
-/* Number of machine registers */
-#define NUM_REGS 92
-
-/* Initializer for an array of names of registers.
- There should be NUM_REGS strings in this initializer. */
-
-#define REGISTER_NAMES \
-{ \
- /* 0 */ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
- /* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
- /* 16 */ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
- /* 24 */ "r24", "r25", "r26", "fp", "sp", "ilink1", "ilink2", "blink", \
- /* 32 */ "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", \
- /* 40 */ "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47", \
- /* 48 */ "r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55", \
- /* 56 */ "r56", "mlo", "mmid", "mhi", "lp_count", \
- /* 61 */ "status", "sema", "lp_start", "lp_end", "identity", "debug", \
- /* 67 */ "aux10", "aux11", "aux12", "aux13", "aux14", \
- /* 72 */ "aux15", "aux16", "aux17", "aux18", "aux19", \
- /* 77 */ "aux1a", "aux1b", "aux1c", "aux1d", "aux1e", \
- /* 82 */ "aux1f", "aux20", "aux21", "aux22", \
- /* 86 */ "aux30", "aux31", "aux32", "aux33", "aux40", \
- /* 91 */ "pc" \
-}
-
-/* Register numbers of various important registers (used to index
- into arrays of register names and register values). */
-
-#define R0_REGNUM 0 /* First local register */
-#define R59_REGNUM 59 /* Last local register */
-#define FP_REGNUM 27 /* Contains address of executing stack frame */
-#define SP_REGNUM 28 /* stack pointer */
-#define BLINK_REGNUM 31 /* link register */
-#define STA_REGNUM 61 /* processor status word */
-#define PC_REGNUM 91 /* instruction pointer */
-#define AUX_BEG_REGNUM 61 /* aux reg begins */
-#define AUX_END_REGNUM 90 /* aux reg ends, pc not real aux reg */
-
-/* Fake registers used to mark immediate data. */
-#define SHIMM_FLAG_REGNUM 61
-#define LIMM_REGNUM 62
-#define SHIMM_REGNUM 63
-
-#define AUX_REG_MAP \
-{ \
- { 0, 1, 2, 3, 4, 5, \
- 16, -1, -1, -1, -1, \
- -1, -1, -1, -1, -1, \
- -1, -1, -1, -1, 30, \
- -1, 32, 33, -1, \
- 48, 49, 50, 51, 64, \
- 0 \
- }, \
- { 0, 1, 2, 3, 4, 5, \
- 16, -1, -1, -1, -1, \
- -1, -1, -1, -1, -1, \
- -1, -1, -1, -1, 30, \
- 31, 32, 33, -1, \
- -1, -1, -1, -1, -1, \
- 0 \
- }, \
- { 0, 1, 2, 3, 4, 5, \
- 16, 17, 18, 19, 20, \
- 21, 22, 23, 24, 25, \
- 26, 27, 28, 29, 30, \
- 31, 32, 33, 34, \
- -1, -1, -1, -1, -1, \
- 0 \
- } \
-}
-
-#define PFP_REGNUM R0_REGNUM /* Previous frame pointer */
-
-/* Total amount of space needed to store our copies of the machine's
- register state, the array `registers'. */
-#define REGISTER_BYTES (NUM_REGS * 4)
-
-/* Index within `registers' of the first byte of the space for register N. */
-#define REGISTER_BYTE(N) (4*(N))
-
-/* Number of bytes of storage in the actual machine representation
- for register N. */
-#define REGISTER_RAW_SIZE(N) 4
-
-/* Number of bytes of storage in the program's representation for register N. */
-#define REGISTER_VIRTUAL_SIZE(N) 4
-
-/* Largest value REGISTER_RAW_SIZE can have. */
-#define MAX_REGISTER_RAW_SIZE 4
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-#define MAX_REGISTER_VIRTUAL_SIZE 4
-
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
-#define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int)
-\f
-
-/* Macros for understanding function return values... */
-
-/* Does the specified function use the "struct returning" convention
- or the "value returning" convention? The "value returning" convention
- almost invariably returns the entire value in registers. The
- "struct returning" convention often returns the entire value in
- memory, and passes a pointer (out of or into the function) saying
- where the value (is or should go).
-
- Since this sometimes depends on whether it was compiled with GCC,
- this is also an argument. This is used in call_function to build a
- stack, and in value_being_returned to print return values.
-
- On arc, a structure is always retunred with pointer in r0. */
-
-#define USE_STRUCT_CONVENTION(gcc_p, type) 1
-
-/* Extract from an array REGBUF containing the (raw) register state
- a function return value of type TYPE, and copy that, in virtual format,
- into VALBUF. This is only called if USE_STRUCT_CONVENTION for this
- type is 0.
- */
-#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- memcpy(VALBUF, REGBUF+REGISTER_BYTE(R0_REGNUM), TYPE_LENGTH (TYPE))
-
-/* If USE_STRUCT_CONVENTION produces a 1,
- extract from an array REGBUF containing the (raw) register state
- the address in which a function should return its structure value,
- as a CORE_ADDR (or an expression that can be used as one). */
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
- (error("Don't know where large structure is returned on arc"), 0)
-
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format, for "value returning" functions.
- For 'return' command: not (yet) implemented for arc. */
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
- error ("Returning values from functions is not implemented in arc gdb")
-
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
-#define STORE_STRUCT_RETURN(ADDR, SP) \
- error ("Returning values from functions is not implemented in arc gdb")
-\f
-
-/* Describe the pointer in each stack frame to the previous stack frame
- (its caller). */
-
-/* We cache information about saved registers in the frame structure,
- to save us from having to re-scan function prologues every time
- a register in a non-current frame is accessed. */
-
-#define EXTRA_FRAME_INFO \
- struct frame_saved_regs *fsr; \
- CORE_ADDR arg_pointer;
-
-/* Zero the frame_saved_regs pointer when the frame is initialized,
- so that FRAME_FIND_SAVED_REGS () will know to allocate and
- initialize a frame_saved_regs struct the first time it is called.
- Set the arg_pointer to -1, which is not valid; 0 and other values
- indicate real, cached values. */
-
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
- ((fi)->fsr = 0, (fi)->arg_pointer = -1)
-
-/* FRAME_CHAIN takes a frame's nominal address
- and produces the frame's chain-pointer.
- However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller. */
-/* On the arc, we get the chain pointer by reading the PFP saved
- on the stack. */
-/* The PFP and RPC is in fp and fp+4. */
-
-#define FRAME_CHAIN(thisframe) \
- (read_memory_integer (FRAME_FP (thisframe), 4))
-
-/* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
- and has no caller. */
-#define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
-
-/* An expression that tells us whether the function invocation represented
- by FI does not have a frame on the stack associated with it. */
-
-#define FRAMELESS_FUNCTION_INVOCATION(FI) \
- (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue (FI))
-
-/* Where is the PC for a specific frame.
- A leaf function may never save blink, so we have to check for that here. */
-
-#define FRAME_SAVED_PC(frame) (arc_frame_saved_pc (frame))
-struct frame_info; /* in case frame.h not included yet */
-CORE_ADDR arc_frame_saved_pc (struct frame_info *);
-
-/* If the argument is on the stack, it will be here.
- We cache this value in the frame info if we've already looked it up. */
-/* ??? Is the arg_pointer check necessary? */
-
-#define FRAME_ARGS_ADDRESS(fi) \
- (((fi)->arg_pointer != -1) ? (fi)->arg_pointer : (fi)->frame)
-
-/* This is the same except it should return 0 when
- it does not really know where the args are, rather than guessing.
- This value is not cached since it is only used infrequently. */
-
-#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-
-/* Set NUMARGS to the number of args passed to a frame.
- Can return -1, meaning no way to tell. */
-
-#define FRAME_NUM_ARGS(fi) (-1)
-
-/* Return number of bytes at start of arglist that are not really args. */
-
-#define FRAME_ARGS_SKIP 0
-
-/* Produce the positions of the saved registers in a stack frame. */
-
-#define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \
- frame_find_saved_regs (frame_info_addr, &sr)
-extern void frame_find_saved_regs (); /* See arc-tdep.c */
-\f
-
-/* Things needed for making calls to functions in the inferior process */
-void arc_push_dummy_frame (void);
-#define PUSH_DUMMY_FRAME \
- arc_push_dummy_frame ()
-
-/* Discard from the stack the innermost frame, restoring all registers. */
-void arc_pop_frame (void);
-#define POP_FRAME \
- arc_pop_frame ()
-
-/* This sequence of words is the instructions bl xxxx, flag 1 */
-#define CALL_DUMMY { 0x28000000, 0x1fbe8001 }
-#define CALL_DUMMY_LENGTH 8
-
-/* Start execution at beginning of dummy */
-#define CALL_DUMMY_START_OFFSET 0
-
-/* Insert the specified number of args and function address
- into a call sequence of the above form stored at 'dummyname'. */
-#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
-{ \
- int from, to, delta, loc; \
- loc = (int)(read_register (SP_REGNUM) - CALL_DUMMY_LENGTH); \
- from = loc + 4; \
- to = (int)(fun); \
- delta = (to - from) >> 2; \
- *((char *)(dummyname) + 1) = (delta & 0x1); \
- *((char *)(dummyname) + 2) = ((delta >> 1) & 0xff); \
- *((char *)(dummyname) + 3) = ((delta >> 9) & 0xff); \
- *((char *)(dummyname) + 4) = ((delta >> 17) & 0x7); \
-}
+// OBSOLETE /* Parameters for target machine ARC, for GDB, the GNU debugger.
+// OBSOLETE Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
+// OBSOLETE Contributed by Cygnus Support.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "regcache.h"
+// OBSOLETE
+// OBSOLETE /* Used by arc-tdep.c to set the default cpu type. */
+// OBSOLETE #define DEFAULT_ARC_CPU_TYPE "base"
+// OBSOLETE
+// OBSOLETE /* Offset from address of function to start of its code.
+// OBSOLETE Zero on most machines. */
+// OBSOLETE #define FUNCTION_START_OFFSET 0
+// OBSOLETE
+// OBSOLETE /* Advance PC across any function entry prologue instructions
+// OBSOLETE to reach some "real" code. */
+// OBSOLETE
+// OBSOLETE #define SKIP_PROLOGUE(pc) (arc_skip_prologue (pc, 0))
+// OBSOLETE extern CORE_ADDR arc_skip_prologue (CORE_ADDR, int);
+// OBSOLETE
+// OBSOLETE #define PROLOGUE_FRAMELESS_P(pc) arc_prologue_frameless_p(pc)
+// OBSOLETE extern int arc_prologue_frameless_p (CORE_ADDR);
+// OBSOLETE
+// OBSOLETE /* Sequence of bytes for breakpoint instruction.
+// OBSOLETE ??? The current value is "sr -1,[-1]" and is for the simulator only.
+// OBSOLETE The simulator watches for this and does the right thing.
+// OBSOLETE The hardware version will have to associate with each breakpoint
+// OBSOLETE the sequence "flag 1; nop; nop; nop". IE: The breakpoint insn will not
+// OBSOLETE be a fixed set of bits but instead will be a branch to a semi-random
+// OBSOLETE address. Presumably this will be cleaned up for "second silicon". */
+// OBSOLETE #define BIG_BREAKPOINT { 0x12, 0x1f, 0xff, 0xff }
+// OBSOLETE #define LITTLE_BREAKPOINT { 0xff, 0xff, 0x1f, 0x12 }
+// OBSOLETE
+// OBSOLETE /* Given the exposed pipeline, there isn't any one correct value.
+// OBSOLETE However, this value must be 4. GDB can't handle any other value (other than
+// OBSOLETE zero). See for example infrun.c:
+// OBSOLETE "prev_pc != stop_pc - DECR_PC_AFTER_BREAK" */
+// OBSOLETE /* FIXME */
+// OBSOLETE #define DECR_PC_AFTER_BREAK 8
+// OBSOLETE
+// OBSOLETE /* We don't have a reliable single step facility.
+// OBSOLETE ??? We do have a cycle single step facility, but that won't work. */
+// OBSOLETE #define SOFTWARE_SINGLE_STEP_P() 1
+// OBSOLETE extern void arc_software_single_step (enum target_signal, int);
+// OBSOLETE #define SOFTWARE_SINGLE_STEP(sig,bp_p) arc_software_single_step (sig, bp_p)
+// OBSOLETE
+// OBSOLETE /* FIXME: Need to set STEP_SKIPS_DELAY. */
+// OBSOLETE
+// OBSOLETE /* Given a pc value as defined by the hardware, return the real address.
+// OBSOLETE Remember that on the ARC blink contains that status register which
+// OBSOLETE includes PC + flags (so we have to mask out the flags). */
+// OBSOLETE #define ARC_PC_TO_REAL_ADDRESS(pc) (((pc) & 0xffffff) << 2)
+// OBSOLETE
+// OBSOLETE /* Immediately after a function call, return the saved pc.
+// OBSOLETE Can't always go through the frames for this because on some machines
+// OBSOLETE the new frame is not set up until the new function
+// OBSOLETE executes some instructions. */
+// OBSOLETE
+// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \
+// OBSOLETE (ARC_PC_TO_REAL_ADDRESS (read_register (BLINK_REGNUM)))
+// OBSOLETE
+// OBSOLETE /* Stack grows upward */
+// OBSOLETE
+// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
+// OBSOLETE
+// OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity
+// OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the
+// OBSOLETE real way to know how big a register is. */
+// OBSOLETE #define REGISTER_SIZE 4
+// OBSOLETE
+// OBSOLETE /* Number of machine registers */
+// OBSOLETE #define NUM_REGS 92
+// OBSOLETE
+// OBSOLETE /* Initializer for an array of names of registers.
+// OBSOLETE There should be NUM_REGS strings in this initializer. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_NAMES \
+// OBSOLETE { \
+// OBSOLETE /* 0 */ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
+// OBSOLETE /* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
+// OBSOLETE /* 16 */ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \
+// OBSOLETE /* 24 */ "r24", "r25", "r26", "fp", "sp", "ilink1", "ilink2", "blink", \
+// OBSOLETE /* 32 */ "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", \
+// OBSOLETE /* 40 */ "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47", \
+// OBSOLETE /* 48 */ "r48", "r49", "r50", "r51", "r52", "r53", "r54", "r55", \
+// OBSOLETE /* 56 */ "r56", "mlo", "mmid", "mhi", "lp_count", \
+// OBSOLETE /* 61 */ "status", "sema", "lp_start", "lp_end", "identity", "debug", \
+// OBSOLETE /* 67 */ "aux10", "aux11", "aux12", "aux13", "aux14", \
+// OBSOLETE /* 72 */ "aux15", "aux16", "aux17", "aux18", "aux19", \
+// OBSOLETE /* 77 */ "aux1a", "aux1b", "aux1c", "aux1d", "aux1e", \
+// OBSOLETE /* 82 */ "aux1f", "aux20", "aux21", "aux22", \
+// OBSOLETE /* 86 */ "aux30", "aux31", "aux32", "aux33", "aux40", \
+// OBSOLETE /* 91 */ "pc" \
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Register numbers of various important registers (used to index
+// OBSOLETE into arrays of register names and register values). */
+// OBSOLETE
+// OBSOLETE #define R0_REGNUM 0 /* First local register */
+// OBSOLETE #define R59_REGNUM 59 /* Last local register */
+// OBSOLETE #define FP_REGNUM 27 /* Contains address of executing stack frame */
+// OBSOLETE #define SP_REGNUM 28 /* stack pointer */
+// OBSOLETE #define BLINK_REGNUM 31 /* link register */
+// OBSOLETE #define STA_REGNUM 61 /* processor status word */
+// OBSOLETE #define PC_REGNUM 91 /* instruction pointer */
+// OBSOLETE #define AUX_BEG_REGNUM 61 /* aux reg begins */
+// OBSOLETE #define AUX_END_REGNUM 90 /* aux reg ends, pc not real aux reg */
+// OBSOLETE
+// OBSOLETE /* Fake registers used to mark immediate data. */
+// OBSOLETE #define SHIMM_FLAG_REGNUM 61
+// OBSOLETE #define LIMM_REGNUM 62
+// OBSOLETE #define SHIMM_REGNUM 63
+// OBSOLETE
+// OBSOLETE #define AUX_REG_MAP \
+// OBSOLETE { \
+// OBSOLETE { 0, 1, 2, 3, 4, 5, \
+// OBSOLETE 16, -1, -1, -1, -1, \
+// OBSOLETE -1, -1, -1, -1, -1, \
+// OBSOLETE -1, -1, -1, -1, 30, \
+// OBSOLETE -1, 32, 33, -1, \
+// OBSOLETE 48, 49, 50, 51, 64, \
+// OBSOLETE 0 \
+// OBSOLETE }, \
+// OBSOLETE { 0, 1, 2, 3, 4, 5, \
+// OBSOLETE 16, -1, -1, -1, -1, \
+// OBSOLETE -1, -1, -1, -1, -1, \
+// OBSOLETE -1, -1, -1, -1, 30, \
+// OBSOLETE 31, 32, 33, -1, \
+// OBSOLETE -1, -1, -1, -1, -1, \
+// OBSOLETE 0 \
+// OBSOLETE }, \
+// OBSOLETE { 0, 1, 2, 3, 4, 5, \
+// OBSOLETE 16, 17, 18, 19, 20, \
+// OBSOLETE 21, 22, 23, 24, 25, \
+// OBSOLETE 26, 27, 28, 29, 30, \
+// OBSOLETE 31, 32, 33, 34, \
+// OBSOLETE -1, -1, -1, -1, -1, \
+// OBSOLETE 0 \
+// OBSOLETE } \
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #define PFP_REGNUM R0_REGNUM /* Previous frame pointer */
+// OBSOLETE
+// OBSOLETE /* Total amount of space needed to store our copies of the machine's
+// OBSOLETE register state, the array `registers'. */
+// OBSOLETE #define REGISTER_BYTES (NUM_REGS * 4)
+// OBSOLETE
+// OBSOLETE /* Index within `registers' of the first byte of the space for register N. */
+// OBSOLETE #define REGISTER_BYTE(N) (4*(N))
+// OBSOLETE
+// OBSOLETE /* Number of bytes of storage in the actual machine representation
+// OBSOLETE for register N. */
+// OBSOLETE #define REGISTER_RAW_SIZE(N) 4
+// OBSOLETE
+// OBSOLETE /* Number of bytes of storage in the program's representation for register N. */
+// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) 4
+// OBSOLETE
+// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
+// OBSOLETE #define MAX_REGISTER_RAW_SIZE 4
+// OBSOLETE
+// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. */
+// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4
+// OBSOLETE
+// OBSOLETE /* Return the GDB type object for the "standard" data type
+// OBSOLETE of data in register N. */
+// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) (builtin_type_int)
+// OBSOLETE \f
+// OBSOLETE
+// OBSOLETE /* Macros for understanding function return values... */
+// OBSOLETE
+// OBSOLETE /* Does the specified function use the "struct returning" convention
+// OBSOLETE or the "value returning" convention? The "value returning" convention
+// OBSOLETE almost invariably returns the entire value in registers. The
+// OBSOLETE "struct returning" convention often returns the entire value in
+// OBSOLETE memory, and passes a pointer (out of or into the function) saying
+// OBSOLETE where the value (is or should go).
+// OBSOLETE
+// OBSOLETE Since this sometimes depends on whether it was compiled with GCC,
+// OBSOLETE this is also an argument. This is used in call_function to build a
+// OBSOLETE stack, and in value_being_returned to print return values.
+// OBSOLETE
+// OBSOLETE On arc, a structure is always retunred with pointer in r0. */
+// OBSOLETE
+// OBSOLETE #define USE_STRUCT_CONVENTION(gcc_p, type) 1
+// OBSOLETE
+// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
+// OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
+// OBSOLETE into VALBUF. This is only called if USE_STRUCT_CONVENTION for this
+// OBSOLETE type is 0.
+// OBSOLETE */
+// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+// OBSOLETE memcpy(VALBUF, REGBUF+REGISTER_BYTE(R0_REGNUM), TYPE_LENGTH (TYPE))
+// OBSOLETE
+// OBSOLETE /* If USE_STRUCT_CONVENTION produces a 1,
+// OBSOLETE extract from an array REGBUF containing the (raw) register state
+// OBSOLETE the address in which a function should return its structure value,
+// OBSOLETE as a CORE_ADDR (or an expression that can be used as one). */
+// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
+// OBSOLETE (error("Don't know where large structure is returned on arc"), 0)
+// OBSOLETE
+// OBSOLETE /* Write into appropriate registers a function return value
+// OBSOLETE of type TYPE, given in virtual format, for "value returning" functions.
+// OBSOLETE For 'return' command: not (yet) implemented for arc. */
+// OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \
+// OBSOLETE error ("Returning values from functions is not implemented in arc gdb")
+// OBSOLETE
+// OBSOLETE /* Store the address of the place in which to copy the structure the
+// OBSOLETE subroutine will return. This is called from call_function. */
+// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \
+// OBSOLETE error ("Returning values from functions is not implemented in arc gdb")
+// OBSOLETE \f
+// OBSOLETE
+// OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame
+// OBSOLETE (its caller). */
+// OBSOLETE
+// OBSOLETE /* We cache information about saved registers in the frame structure,
+// OBSOLETE to save us from having to re-scan function prologues every time
+// OBSOLETE a register in a non-current frame is accessed. */
+// OBSOLETE
+// OBSOLETE #define EXTRA_FRAME_INFO \
+// OBSOLETE struct frame_saved_regs *fsr; \
+// OBSOLETE CORE_ADDR arg_pointer;
+// OBSOLETE
+// OBSOLETE /* Zero the frame_saved_regs pointer when the frame is initialized,
+// OBSOLETE so that FRAME_FIND_SAVED_REGS () will know to allocate and
+// OBSOLETE initialize a frame_saved_regs struct the first time it is called.
+// OBSOLETE Set the arg_pointer to -1, which is not valid; 0 and other values
+// OBSOLETE indicate real, cached values. */
+// OBSOLETE
+// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
+// OBSOLETE ((fi)->fsr = 0, (fi)->arg_pointer = -1)
+// OBSOLETE
+// OBSOLETE /* FRAME_CHAIN takes a frame's nominal address
+// OBSOLETE and produces the frame's chain-pointer.
+// OBSOLETE However, if FRAME_CHAIN_VALID returns zero,
+// OBSOLETE it means the given frame is the outermost one and has no caller. */
+// OBSOLETE /* On the arc, we get the chain pointer by reading the PFP saved
+// OBSOLETE on the stack. */
+// OBSOLETE /* The PFP and RPC is in fp and fp+4. */
+// OBSOLETE
+// OBSOLETE #define FRAME_CHAIN(thisframe) \
+// OBSOLETE (read_memory_integer (FRAME_FP (thisframe), 4))
+// OBSOLETE
+// OBSOLETE /* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
+// OBSOLETE and has no caller. */
+// OBSOLETE #define FRAME_CHAIN_VALID(chain, thisframe) nonnull_frame_chain_valid (chain, thisframe)
+// OBSOLETE
+// OBSOLETE /* An expression that tells us whether the function invocation represented
+// OBSOLETE by FI does not have a frame on the stack associated with it. */
+// OBSOLETE
+// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \
+// OBSOLETE (((FI)->signal_handler_caller) ? 0 : frameless_look_for_prologue (FI))
+// OBSOLETE
+// OBSOLETE /* Where is the PC for a specific frame.
+// OBSOLETE A leaf function may never save blink, so we have to check for that here. */
+// OBSOLETE
+// OBSOLETE #define FRAME_SAVED_PC(frame) (arc_frame_saved_pc (frame))
+// OBSOLETE struct frame_info; /* in case frame.h not included yet */
+// OBSOLETE CORE_ADDR arc_frame_saved_pc (struct frame_info *);
+// OBSOLETE
+// OBSOLETE /* If the argument is on the stack, it will be here.
+// OBSOLETE We cache this value in the frame info if we've already looked it up. */
+// OBSOLETE /* ??? Is the arg_pointer check necessary? */
+// OBSOLETE
+// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \
+// OBSOLETE (((fi)->arg_pointer != -1) ? (fi)->arg_pointer : (fi)->frame)
+// OBSOLETE
+// OBSOLETE /* This is the same except it should return 0 when
+// OBSOLETE it does not really know where the args are, rather than guessing.
+// OBSOLETE This value is not cached since it is only used infrequently. */
+// OBSOLETE
+// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
+// OBSOLETE
+// OBSOLETE /* Set NUMARGS to the number of args passed to a frame.
+// OBSOLETE Can return -1, meaning no way to tell. */
+// OBSOLETE
+// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
+// OBSOLETE
+// OBSOLETE /* Return number of bytes at start of arglist that are not really args. */
+// OBSOLETE
+// OBSOLETE #define FRAME_ARGS_SKIP 0
+// OBSOLETE
+// OBSOLETE /* Produce the positions of the saved registers in a stack frame. */
+// OBSOLETE
+// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info_addr, sr) \
+// OBSOLETE frame_find_saved_regs (frame_info_addr, &sr)
+// OBSOLETE extern void frame_find_saved_regs (); /* See arc-tdep.c */
+// OBSOLETE \f
+// OBSOLETE
+// OBSOLETE /* Things needed for making calls to functions in the inferior process */
+// OBSOLETE void arc_push_dummy_frame (void);
+// OBSOLETE #define PUSH_DUMMY_FRAME \
+// OBSOLETE arc_push_dummy_frame ()
+// OBSOLETE
+// OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. */
+// OBSOLETE void arc_pop_frame (void);
+// OBSOLETE #define POP_FRAME \
+// OBSOLETE arc_pop_frame ()
+// OBSOLETE
+// OBSOLETE /* This sequence of words is the instructions bl xxxx, flag 1 */
+// OBSOLETE #define CALL_DUMMY { 0x28000000, 0x1fbe8001 }
+// OBSOLETE #define CALL_DUMMY_LENGTH 8
+// OBSOLETE
+// OBSOLETE /* Start execution at beginning of dummy */
+// OBSOLETE #define CALL_DUMMY_START_OFFSET 0
+// OBSOLETE
+// OBSOLETE /* Insert the specified number of args and function address
+// OBSOLETE into a call sequence of the above form stored at 'dummyname'. */
+// OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
+// OBSOLETE { \
+// OBSOLETE int from, to, delta, loc; \
+// OBSOLETE loc = (int)(read_register (SP_REGNUM) - CALL_DUMMY_LENGTH); \
+// OBSOLETE from = loc + 4; \
+// OBSOLETE to = (int)(fun); \
+// OBSOLETE delta = (to - from) >> 2; \
+// OBSOLETE *((char *)(dummyname) + 1) = (delta & 0x1); \
+// OBSOLETE *((char *)(dummyname) + 2) = ((delta >> 1) & 0xff); \
+// OBSOLETE *((char *)(dummyname) + 3) = ((delta >> 9) & 0xff); \
+// OBSOLETE *((char *)(dummyname) + 4) = ((delta >> 17) & 0x7); \
+// OBSOLETE }
@V@/bfd/cpu-m68hc12.c @V@/bfd/cm68hc12.c
@V@/bfd/efi-app-ia32.c @V@/bfd/efi-ia32-app.c
@V@/bfd/efi-app-ia64.c @V@/bfd/efi-ia64-app.c
+@V@/bfd/elf32-fr30.c @V@/bfd/elf32f30.c
+@V@/bfd/elf32-frv.c @V@/bfd/elf32fv.c
@V@/bfd/elf32-i370.c @V@/bfd/e32i370.c
@V@/bfd/elf32-i386.c @V@/bfd/e32i86.c
@V@/bfd/elf32-i386qnx.c @V@/bfd/e32i86q.c
/* override the standard get_saved_register function with
one that takes account of generic CALL_DUMMY frames */
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
- generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
+ generic_unwind_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
-# Host: Motorola 88k running SVR3
-
-XM_FILE= xm-delta88.h
-
-NAT_FILE= nm-m88k.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o corelow.o core-aout.o
+# OBSOLETE # Host: Motorola 88k running SVR3
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-delta88.h
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-m88k.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o corelow.o core-aout.o
-# Target: Motorola 88k running SVR3
-TDEPFILES= m88k-tdep.o
-TM_FILE= tm-delta88.h
+# OBSOLETE # Target: Motorola 88k running SVR3
+# OBSOLETE TDEPFILES= m88k-tdep.o
+# OBSOLETE TM_FILE= tm-delta88.h
-# Host: Motorola 88k running SVR4
-
-XM_FILE= xm-delta88v4.h
-
-NAT_FILE= nm-delta88v4.h
-NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o \
- solib.o solib-svr4.o solib-legacy.o \
- procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
+# OBSOLETE # Host: Motorola 88k running SVR4
+# OBSOLETE
+# OBSOLETE XM_FILE= xm-delta88v4.h
+# OBSOLETE
+# OBSOLETE NAT_FILE= nm-delta88v4.h
+# OBSOLETE NATDEPFILES= fork-child.o m88k-nat.o corelow.o core-regset.o \
+# OBSOLETE solib.o solib-svr4.o solib-legacy.o \
+# OBSOLETE procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
-# Target: Motorola 88k running SVR4
-TDEPFILES= m88k-tdep.o
-TM_FILE= tm-delta88v4.h
+# OBSOLETE # Target: Motorola 88k running SVR4
+# OBSOLETE TDEPFILES= m88k-tdep.o
+# OBSOLETE TM_FILE= tm-delta88v4.h
-# Host: Motorola 88000 running DGUX
-XM_FILE= xm-dgux.h
-NAT_FILE= nm-m88k.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o
+# OBSOLETE # Host: Motorola 88000 running DGUX
+# OBSOLETE XM_FILE= xm-dgux.h
+# OBSOLETE NAT_FILE= nm-m88k.h
+# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o m88k-nat.o
-# Target: Motorola 88k Binary Compatibility Standard
-TDEPFILES= m88k-tdep.o remote-bug.o
-TM_FILE= tm-m88k.h
+# OBSOLETE # Target: Motorola 88k Binary Compatibility Standard
+# OBSOLETE TDEPFILES= m88k-tdep.o remote-bug.o
+# OBSOLETE TM_FILE= tm-m88k.h
-/* Native machine description for Motorola Delta 88 box, for GDB.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "m88k/nm-m88k.h"
-#include "config/nm-sysv4.h"
+// OBSOLETE /* Native machine description for Motorola Delta 88 box, for GDB.
+// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "m88k/nm-m88k.h"
+// OBSOLETE #include "config/nm-sysv4.h"
-/* Native support macros for m88k, for GDB.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define FETCH_INFERIOR_REGISTERS
-
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- (addr) = m88k_register_u_addr ((blockend),(regno));
+// OBSOLETE /* Native support macros for m88k, for GDB.
+// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #define FETCH_INFERIOR_REGISTERS
+// OBSOLETE
+// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
+// OBSOLETE (addr) = m88k_register_u_addr ((blockend),(regno));
-/* Target machine description for Motorola Delta 88 box, for GDB.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "m88k/tm-m88k.h"
-
-#define DELTA88
-
-#define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", (name)))
-#define SIGTRAMP_FRAME_FIXUP(frame) (frame) += 0x20
-#define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp), 4)
+// OBSOLETE /* Target machine description for Motorola Delta 88 box, for GDB.
+// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "m88k/tm-m88k.h"
+// OBSOLETE
+// OBSOLETE #define DELTA88
+// OBSOLETE
+// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", (name)))
+// OBSOLETE #define SIGTRAMP_FRAME_FIXUP(frame) (frame) += 0x20
+// OBSOLETE #define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp), 4)
-/* Target machine description for Motorola Delta 88 box, for GDB.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1998, 1999
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define DELTA88
-
-#include "m88k/tm-m88k.h"
-#include "config/tm-sysv4.h"
-
-/* If we don't define this, backtraces go on forever. */
-#define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
-#define IN_SIGTRAMP(pc, name) ((name) && (STREQ ("signalhandler", (name)) \
- || STREQ("sigacthandler", (name))))
-#define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp)+0xcd8, 4)
+// OBSOLETE /* Target machine description for Motorola Delta 88 box, for GDB.
+// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1998, 1999
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #define DELTA88
+// OBSOLETE
+// OBSOLETE #include "m88k/tm-m88k.h"
+// OBSOLETE #include "config/tm-sysv4.h"
+// OBSOLETE
+// OBSOLETE /* If we don't define this, backtraces go on forever. */
+// OBSOLETE #define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
+// OBSOLETE
+// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && (STREQ ("signalhandler", (name)) \
+// OBSOLETE || STREQ("sigacthandler", (name))))
+// OBSOLETE #define SIGTRAMP_SP_FIXUP(sp) (sp) = read_memory_integer((sp)+0xcd8, 4)
-/* Target machine description for generic Motorola 88000, for GDB.
-
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1996,
- 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "doublest.h"
-#include "regcache.h"
-
-/* g++ support is not yet included. */
-
-/* We cache information about saved registers in the frame structure,
- to save us from having to re-scan function prologues every time
- a register in a non-current frame is accessed. */
-
-#define EXTRA_FRAME_INFO \
- struct frame_saved_regs *fsr; \
- CORE_ADDR locals_pointer; \
- CORE_ADDR args_pointer;
-
-/* Zero the frame_saved_regs pointer when the frame is initialized,
- so that FRAME_FIND_SAVED_REGS () will know to allocate and
- initialize a frame_saved_regs struct the first time it is called.
- Set the arg_pointer to -1, which is not valid; 0 and other values
- indicate real, cached values. */
-
-#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
- init_extra_frame_info (fromleaf, fi)
-extern void init_extra_frame_info ();
-
-/* Offset from address of function to start of its code.
- Zero on most machines. */
-
-#define FUNCTION_START_OFFSET 0
-
-/* Advance PC across any function entry prologue instructions
- to reach some "real" code. */
-
-extern CORE_ADDR m88k_skip_prologue (CORE_ADDR);
-#define SKIP_PROLOGUE(frompc) (m88k_skip_prologue (frompc))
-
-/* The m88k kernel aligns all instructions on 4-byte boundaries. The
- kernel also uses the least significant two bits for its own hocus
- pocus. When gdb receives an address from the kernel, it needs to
- preserve those right-most two bits, but gdb also needs to be careful
- to realize that those two bits are not really a part of the address
- of an instruction. Shrug. */
-
-extern CORE_ADDR m88k_addr_bits_remove (CORE_ADDR);
-#define ADDR_BITS_REMOVE(addr) m88k_addr_bits_remove (addr)
-
-/* Immediately after a function call, return the saved pc.
- Can't always go through the frames for this because on some machines
- the new frame is not set up until the new function executes
- some instructions. */
-
-#define SAVED_PC_AFTER_CALL(frame) \
- (ADDR_BITS_REMOVE (read_register (SRP_REGNUM)))
-
-/* Stack grows downward. */
-
-#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-
-/* Sequence of bytes for breakpoint instruction. */
-
-/* instruction 0xF000D1FF is 'tb0 0,r0,511'
- If Bit bit 0 of r0 is clear (always true),
- initiate exception processing (trap).
- */
-#define BREAKPOINT {0xF0, 0x00, 0xD1, 0xFF}
-
-/* Amount PC must be decremented by after a breakpoint.
- This is often the number of bytes in BREAKPOINT
- but not always. */
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* Say how long (ordinary) registers are. This is a piece of bogosity
- used in push_word and a few other places; REGISTER_RAW_SIZE is the
- real way to know how big a register is. */
-
-#define REGISTER_SIZE 4
-
-/* Number of machine registers */
-
-#define GP_REGS (38)
-#define FP_REGS (32)
-#define NUM_REGS (GP_REGS + FP_REGS)
-
-/* Initializer for an array of names of registers.
- There should be NUM_REGS strings in this initializer. */
-
-#define REGISTER_NAMES {\
- "r0",\
- "r1",\
- "r2",\
- "r3",\
- "r4",\
- "r5",\
- "r6",\
- "r7",\
- "r8",\
- "r9",\
- "r10",\
- "r11",\
- "r12",\
- "r13",\
- "r14",\
- "r15",\
- "r16",\
- "r17",\
- "r18",\
- "r19",\
- "r20",\
- "r21",\
- "r22",\
- "r23",\
- "r24",\
- "r25",\
- "r26",\
- "r27",\
- "r28",\
- "r29",\
- "r30",\
- "r31",\
- "psr",\
- "fpsr",\
- "fpcr",\
- "sxip",\
- "snip",\
- "sfip",\
- "x0",\
- "x1",\
- "x2",\
- "x3",\
- "x4",\
- "x5",\
- "x6",\
- "x7",\
- "x8",\
- "x9",\
- "x10",\
- "x11",\
- "x12",\
- "x13",\
- "x14",\
- "x15",\
- "x16",\
- "x17",\
- "x18",\
- "x19",\
- "x20",\
- "x21",\
- "x22",\
- "x23",\
- "x24",\
- "x25",\
- "x26",\
- "x27",\
- "x28",\
- "x29",\
- "x30",\
- "x31",\
- "vbr",\
- "dmt0",\
- "dmd0",\
- "dma0",\
- "dmt1",\
- "dmd1",\
- "dma1",\
- "dmt2",\
- "dmd2",\
- "dma2",\
- "sr0",\
- "sr1",\
- "sr2",\
- "sr3",\
- "fpecr",\
- "fphs1",\
- "fpls1",\
- "fphs2",\
- "fpls2",\
- "fppt",\
- "fprh",\
- "fprl",\
- "fpit",\
- "fpsr",\
- "fpcr",\
- }
-
-
-/* Register numbers of various important registers.
- Note that some of these values are "real" register numbers,
- and correspond to the general registers of the machine,
- and some are "phony" register numbers which are too large
- to be actual register numbers as far as the user is concerned
- but do serve to get the desired values when passed to read_register. */
-
-#define R0_REGNUM 0 /* Contains the constant zero */
-#define SRP_REGNUM 1 /* Contains subroutine return pointer */
-#define RV_REGNUM 2 /* Contains simple return values */
-#define SRA_REGNUM 12 /* Contains address of struct return values */
-#define SP_REGNUM 31 /* Contains address of top of stack */
-
-/* Instruction pointer notes...
-
- On the m88100:
-
- * cr04 = sxip. On exception, contains the excepting pc (probably).
- On rte, is ignored.
-
- * cr05 = snip. On exception, contains the NPC (next pc). On rte,
- pc is loaded from here.
-
- * cr06 = sfip. On exception, contains the NNPC (next next pc). On
- rte, the NPC is loaded from here.
-
- * lower two bits of each are flag bits. Bit 1 is V means address
- is valid. If address is not valid, bit 0 is ignored. Otherwise,
- bit 0 is E and asks for an exception to be taken if this
- instruction is executed.
-
- On the m88110:
-
- * cr04 = exip. On exception, contains the address of the excepting
- pc (always). On rte, pc is loaded from here. Bit 0, aka the D
- bit, is a flag saying that the offending instruction was in a
- branch delay slot. If set, then cr05 contains the NPC.
-
- * cr05 = enip. On exception, if the instruction pointed to by cr04
- was in a delay slot as indicated by the bit 0 of cr04, aka the D
- bit, the cr05 contains the NPC. Otherwise ignored.
-
- * cr06 is invalid */
-
-/* Note that the Harris Unix kernels emulate the m88100's behavior on
- the m88110. */
-
-#define SXIP_REGNUM 35 /* On m88100, Contains Shadow Execute
- Instruction Pointer. */
-#define SNIP_REGNUM 36 /* On m88100, Contains Shadow Next
- Instruction Pointer. */
-#define SFIP_REGNUM 37 /* On m88100, Contains Shadow Fetched
- Intruction pointer. */
-
-#define EXIP_REGNUM 35 /* On m88110, Contains Exception
- Executing Instruction Pointer. */
-#define ENIP_REGNUM 36 /* On m88110, Contains the Exception
- Next Instruction Pointer. */
-
-#define PC_REGNUM SXIP_REGNUM /* Program Counter */
-#define NPC_REGNUM SNIP_REGNUM /* Next Program Counter */
-#define M88K_NNPC_REGNUM SFIP_REGNUM /* Next Next Program Counter */
-
-
-#define PSR_REGNUM 32 /* Processor Status Register */
-#define FPSR_REGNUM 33 /* Floating Point Status Register */
-#define FPCR_REGNUM 34 /* Floating Point Control Register */
-#define XFP_REGNUM 38 /* First Extended Float Register */
-#define X0_REGNUM XFP_REGNUM /* Which also contains the constant zero */
-
-/* This is rather a confusing lie. Our m88k port using a stack pointer value
- for the frame address. Hence, the frame address and the frame pointer are
- only indirectly related. The value of this macro is the register number
- fetched by the machine "independent" portions of gdb when they want to know
- about a frame address. Thus, we lie here and claim that FP_REGNUM is
- SP_REGNUM. */
-#define FP_REGNUM SP_REGNUM /* Reg fetched to locate frame when pgm stops */
-#define ACTUAL_FP_REGNUM 30
-
-/* PSR status bit definitions. */
-
-#define PSR_MODE 0x80000000
-#define PSR_BYTE_ORDER 0x40000000
-#define PSR_SERIAL_MODE 0x20000000
-#define PSR_CARRY 0x10000000
-#define PSR_SFU_DISABLE 0x000003f0
-#define PSR_SFU1_DISABLE 0x00000008
-#define PSR_MXM 0x00000004
-#define PSR_IND 0x00000002
-#define PSR_SFRZ 0x00000001
-
-
-
-/* The following two comments come from the days prior to the m88110
- port. The m88110 handles the instruction pointers differently. I
- do not know what any m88110 kernels do as the m88110 port I'm
- working with is for an embedded system. rich@cygnus.com
- 13-sept-93. */
-
-/* BCS requires that the SXIP_REGNUM (or PC_REGNUM) contain the
- address of the next instr to be executed when a breakpoint occurs.
- Because the kernel gets the next instr (SNIP_REGNUM), the instr in
- SNIP needs to be put back into SFIP, and the instr in SXIP should
- be shifted to SNIP */
-
-/* Are you sitting down? It turns out that the 88K BCS (binary
- compatibility standard) folks originally felt that the debugger
- should be responsible for backing up the IPs, not the kernel (as is
- usually done). Well, they have reversed their decision, and in
- future releases our kernel will be handling the backing up of the
- IPs. So, eventually, we won't need to do the SHIFT_INST_REGS
- stuff. But, for now, since there are 88K systems out there that do
- need the debugger to do the IP shifting, and since there will be
- systems where the kernel does the shifting, the code is a little
- more complex than perhaps it needs to be (we still go inside
- SHIFT_INST_REGS, and if the shifting hasn't occurred then gdb goes
- ahead and shifts). */
-
-extern int target_is_m88110;
-#define SHIFT_INST_REGS() \
-if (!target_is_m88110) \
-{ \
- CORE_ADDR pc = read_register (PC_REGNUM); \
- CORE_ADDR npc = read_register (NPC_REGNUM); \
- if (pc != npc) \
- { \
- write_register (M88K_NNPC_REGNUM, npc); \
- write_register (NPC_REGNUM, pc); \
- } \
-}
-
- /* Storing the following registers is a no-op. */
-#define CANNOT_STORE_REGISTER(regno) (((regno) == R0_REGNUM) \
- || ((regno) == X0_REGNUM))
-
- /* Number of bytes of storage in the actual machine representation
- for register N. On the m88k, the general purpose registers are 4
- bytes and the 88110 extended registers are 10 bytes. */
-
-#define REGISTER_RAW_SIZE(N) ((N) < XFP_REGNUM ? 4 : 10)
-
- /* Total amount of space needed to store our copies of the machine's
- register state, the array `registers'. */
-
-#define REGISTER_BYTES ((GP_REGS * REGISTER_RAW_SIZE(0)) \
- + (FP_REGS * REGISTER_RAW_SIZE(XFP_REGNUM)))
-
- /* Index within `registers' of the first byte of the space for
- register N. */
-
-#define REGISTER_BYTE(N) (((N) * REGISTER_RAW_SIZE(0)) \
- + ((N) >= XFP_REGNUM \
- ? (((N) - XFP_REGNUM) \
- * REGISTER_RAW_SIZE(XFP_REGNUM)) \
- : 0))
-
- /* Number of bytes of storage in the program's representation for
- register N. On the m88k, all registers are 4 bytes excepting the
- m88110 extended registers which are 8 byte doubles. */
-
-#define REGISTER_VIRTUAL_SIZE(N) ((N) < XFP_REGNUM ? 4 : 8)
-
- /* Largest value REGISTER_RAW_SIZE can have. */
-
-#define MAX_REGISTER_RAW_SIZE (REGISTER_RAW_SIZE(XFP_REGNUM))
-
- /* Largest value REGISTER_VIRTUAL_SIZE can have.
- Are FPS1, FPS2, FPR "virtual" regisers? */
-
-#define MAX_REGISTER_VIRTUAL_SIZE (REGISTER_RAW_SIZE(XFP_REGNUM))
-
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
-
-struct type *m88k_register_type (int regnum);
-#define REGISTER_VIRTUAL_TYPE(N) m88k_register_type (N)
-
-/* The 88k call/return conventions call for "small" values to be returned
- into consecutive registers starting from r2. */
-
-#define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
- memcpy ((VALBUF), &(((char *)REGBUF)[REGISTER_BYTE(RV_REGNUM)]), TYPE_LENGTH (TYPE))
-
-#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
-
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. */
-
-#define STORE_RETURN_VALUE(TYPE,VALBUF) \
- write_register_bytes (2*REGISTER_RAW_SIZE(0), (VALBUF), TYPE_LENGTH (TYPE))
-
-/* In COFF, if PCC says a parameter is a short or a char, do not
- change it to int (it seems the convention is to change it). */
-
-#define BELIEVE_PCC_PROMOTION 1
-
-/* Describe the pointer in each stack frame to the previous stack frame
- (its caller). */
-
-/* FRAME_CHAIN takes a frame's nominal address
- and produces the frame's chain-pointer.
-
- However, if FRAME_CHAIN_VALID returns zero,
- it means the given frame is the outermost one and has no caller. */
-
-extern CORE_ADDR frame_chain ();
-extern int frame_chain_valid ();
-extern int frameless_function_invocation ();
-
-#define FRAME_CHAIN(thisframe) \
- frame_chain (thisframe)
-
-#define FRAMELESS_FUNCTION_INVOCATION(frame) \
- (frameless_function_invocation (frame))
-
-/* Define other aspects of the stack frame. */
-
-#define FRAME_SAVED_PC(FRAME) \
- frame_saved_pc (FRAME)
-extern CORE_ADDR frame_saved_pc ();
-
-#define FRAME_ARGS_ADDRESS(fi) \
- frame_args_address (fi)
-extern CORE_ADDR frame_args_address ();
-
-#define FRAME_LOCALS_ADDRESS(fi) \
- frame_locals_address (fi)
-extern CORE_ADDR frame_locals_address ();
-
-/* Return number of args passed to a frame.
- Can return -1, meaning no way to tell. */
-
-#define FRAME_NUM_ARGS(fi) (-1)
-
-/* Return number of bytes at start of arglist that are not really args. */
-
-#define FRAME_ARGS_SKIP 0
-
-/* Put here the code to store, into a struct frame_saved_regs,
- the addresses of the saved registers of frame described by FRAME_INFO.
- This includes special registers such as pc and fp saved in special
- ways in the stack frame. sp is even more special:
- the address we return for it IS the sp for the next frame. */
-
-/* On the 88k, parameter registers get stored into the so called "homing"
- area. This *always* happens when you compiled with GCC and use -g.
- Also, (with GCC and -g) the saving of the parameter register values
- always happens right within the function prologue code, so these register
- values can generally be relied upon to be already copied into their
- respective homing slots by the time you will normally try to look at
- them (we hope).
-
- Note that homing area stack slots are always at *positive* offsets from
- the frame pointer. Thus, the homing area stack slots for the parameter
- registers (passed values) for a given function are actually part of the
- frame area of the caller. This is unusual, but it should not present
- any special problems for GDB.
-
- Note also that on the 88k, we are only interested in finding the
- registers that might have been saved in memory. This is a subset of
- the whole set of registers because the standard calling sequence allows
- the called routine to clobber many registers.
-
- We could manage to locate values for all of the so called "preserved"
- registers (some of which may get saved within any particular frame) but
- that would require decoding all of the tdesc information. That would be
- nice information for GDB to have, but it is not strictly manditory if we
- can live without the ability to look at values within (or backup to)
- previous frames.
- */
-
-struct frame_saved_regs;
-struct frame_info;
-
-void frame_find_saved_regs (struct frame_info *fi,
- struct frame_saved_regs *fsr);
-
-#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
- frame_find_saved_regs (frame_info, &frame_saved_regs)
-\f
-
-#define POP_FRAME pop_frame ()
-extern void pop_frame ();
-
-/* Call function stuff contributed by Kevin Buettner of Motorola. */
-
-#define CALL_DUMMY_LOCATION AFTER_TEXT_END
-
-extern void m88k_push_dummy_frame ();
-#define PUSH_DUMMY_FRAME m88k_push_dummy_frame()
-
-#define CALL_DUMMY { \
-0x67ff00c0, /* 0: subu #sp,#sp,0xc0 */ \
-0x243f0004, /* 4: st #r1,#sp,0x4 */ \
-0x245f0008, /* 8: st #r2,#sp,0x8 */ \
-0x247f000c, /* c: st #r3,#sp,0xc */ \
-0x249f0010, /* 10: st #r4,#sp,0x10 */ \
-0x24bf0014, /* 14: st #r5,#sp,0x14 */ \
-0x24df0018, /* 18: st #r6,#sp,0x18 */ \
-0x24ff001c, /* 1c: st #r7,#sp,0x1c */ \
-0x251f0020, /* 20: st #r8,#sp,0x20 */ \
-0x253f0024, /* 24: st #r9,#sp,0x24 */ \
-0x255f0028, /* 28: st #r10,#sp,0x28 */ \
-0x257f002c, /* 2c: st #r11,#sp,0x2c */ \
-0x259f0030, /* 30: st #r12,#sp,0x30 */ \
-0x25bf0034, /* 34: st #r13,#sp,0x34 */ \
-0x25df0038, /* 38: st #r14,#sp,0x38 */ \
-0x25ff003c, /* 3c: st #r15,#sp,0x3c */ \
-0x261f0040, /* 40: st #r16,#sp,0x40 */ \
-0x263f0044, /* 44: st #r17,#sp,0x44 */ \
-0x265f0048, /* 48: st #r18,#sp,0x48 */ \
-0x267f004c, /* 4c: st #r19,#sp,0x4c */ \
-0x269f0050, /* 50: st #r20,#sp,0x50 */ \
-0x26bf0054, /* 54: st #r21,#sp,0x54 */ \
-0x26df0058, /* 58: st #r22,#sp,0x58 */ \
-0x26ff005c, /* 5c: st #r23,#sp,0x5c */ \
-0x271f0060, /* 60: st #r24,#sp,0x60 */ \
-0x273f0064, /* 64: st #r25,#sp,0x64 */ \
-0x275f0068, /* 68: st #r26,#sp,0x68 */ \
-0x277f006c, /* 6c: st #r27,#sp,0x6c */ \
-0x279f0070, /* 70: st #r28,#sp,0x70 */ \
-0x27bf0074, /* 74: st #r29,#sp,0x74 */ \
-0x27df0078, /* 78: st #r30,#sp,0x78 */ \
-0x63df0000, /* 7c: addu #r30,#sp,0x0 */ \
-0x145f0000, /* 80: ld #r2,#sp,0x0 */ \
-0x147f0004, /* 84: ld #r3,#sp,0x4 */ \
-0x149f0008, /* 88: ld #r4,#sp,0x8 */ \
-0x14bf000c, /* 8c: ld #r5,#sp,0xc */ \
-0x14df0010, /* 90: ld #r6,#sp,0x10 */ \
-0x14ff0014, /* 94: ld #r7,#sp,0x14 */ \
-0x151f0018, /* 98: ld #r8,#sp,0x18 */ \
-0x153f001c, /* 9c: ld #r9,#sp,0x1c */ \
-0x5c200000, /* a0: or.u #r1,#r0,0x0 */ \
-0x58210000, /* a4: or #r1,#r1,0x0 */ \
-0xf400c801, /* a8: jsr #r1 */ \
-0xf000d1ff /* ac: tb0 0x0,#r0,0x1ff */ \
-}
-
-#define CALL_DUMMY_START_OFFSET 0x80
-#define CALL_DUMMY_LENGTH 0xb0
-
-/* FIXME: byteswapping. */
-#define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) \
-{ \
- *(unsigned long *)((char *) (dummy) + 0xa0) |= \
- (((unsigned long) (fun)) >> 16); \
- *(unsigned long *)((char *) (dummy) + 0xa4) |= \
- (((unsigned long) (fun)) & 0xffff); \
-}
-
-/* Stack must be aligned on 64-bit boundaries when synthesizing
- function calls. */
-
-#define STACK_ALIGN(addr) (((addr) + 7) & -8)
-
-#define STORE_STRUCT_RETURN(addr, sp) \
- write_register (SRA_REGNUM, (addr))
-
-#define NEED_TEXT_START_END 1
-
-/* According to the MC88100 RISC Microprocessor User's Manual, section
- 6.4.3.1.2:
-
- ... can be made to return to a particular instruction by placing a
- valid instruction address in the SNIP and the next sequential
- instruction address in the SFIP (with V bits set and E bits clear).
- The rte resumes execution at the instruction pointed to by the
- SNIP, then the SFIP.
-
- The E bit is the least significant bit (bit 0). The V (valid) bit is
- bit 1. This is why we logical or 2 into the values we are writing
- below. It turns out that SXIP plays no role when returning from an
- exception so nothing special has to be done with it. We could even
- (presumably) give it a totally bogus value.
-
- -- Kevin Buettner
- */
-
-extern void m88k_target_write_pc (CORE_ADDR pc, ptid_t ptid);
-#define TARGET_WRITE_PC(VAL, PID) m88k_target_write_pc (VAL, PID)
+// OBSOLETE /* Target machine description for generic Motorola 88000, for GDB.
+// OBSOLETE
+// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1996,
+// OBSOLETE 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "doublest.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE
+// OBSOLETE /* g++ support is not yet included. */
+// OBSOLETE
+// OBSOLETE /* We cache information about saved registers in the frame structure,
+// OBSOLETE to save us from having to re-scan function prologues every time
+// OBSOLETE a register in a non-current frame is accessed. */
+// OBSOLETE
+// OBSOLETE #define EXTRA_FRAME_INFO \
+// OBSOLETE struct frame_saved_regs *fsr; \
+// OBSOLETE CORE_ADDR locals_pointer; \
+// OBSOLETE CORE_ADDR args_pointer;
+// OBSOLETE
+// OBSOLETE /* Zero the frame_saved_regs pointer when the frame is initialized,
+// OBSOLETE so that FRAME_FIND_SAVED_REGS () will know to allocate and
+// OBSOLETE initialize a frame_saved_regs struct the first time it is called.
+// OBSOLETE Set the arg_pointer to -1, which is not valid; 0 and other values
+// OBSOLETE indicate real, cached values. */
+// OBSOLETE
+// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
+// OBSOLETE init_extra_frame_info (fromleaf, fi)
+// OBSOLETE extern void init_extra_frame_info ();
+// OBSOLETE
+// OBSOLETE /* Offset from address of function to start of its code.
+// OBSOLETE Zero on most machines. */
+// OBSOLETE
+// OBSOLETE #define FUNCTION_START_OFFSET 0
+// OBSOLETE
+// OBSOLETE /* Advance PC across any function entry prologue instructions
+// OBSOLETE to reach some "real" code. */
+// OBSOLETE
+// OBSOLETE extern CORE_ADDR m88k_skip_prologue (CORE_ADDR);
+// OBSOLETE #define SKIP_PROLOGUE(frompc) (m88k_skip_prologue (frompc))
+// OBSOLETE
+// OBSOLETE /* The m88k kernel aligns all instructions on 4-byte boundaries. The
+// OBSOLETE kernel also uses the least significant two bits for its own hocus
+// OBSOLETE pocus. When gdb receives an address from the kernel, it needs to
+// OBSOLETE preserve those right-most two bits, but gdb also needs to be careful
+// OBSOLETE to realize that those two bits are not really a part of the address
+// OBSOLETE of an instruction. Shrug. */
+// OBSOLETE
+// OBSOLETE extern CORE_ADDR m88k_addr_bits_remove (CORE_ADDR);
+// OBSOLETE #define ADDR_BITS_REMOVE(addr) m88k_addr_bits_remove (addr)
+// OBSOLETE
+// OBSOLETE /* Immediately after a function call, return the saved pc.
+// OBSOLETE Can't always go through the frames for this because on some machines
+// OBSOLETE the new frame is not set up until the new function executes
+// OBSOLETE some instructions. */
+// OBSOLETE
+// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \
+// OBSOLETE (ADDR_BITS_REMOVE (read_register (SRP_REGNUM)))
+// OBSOLETE
+// OBSOLETE /* Stack grows downward. */
+// OBSOLETE
+// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
+// OBSOLETE
+// OBSOLETE /* Sequence of bytes for breakpoint instruction. */
+// OBSOLETE
+// OBSOLETE /* instruction 0xF000D1FF is 'tb0 0,r0,511'
+// OBSOLETE If Bit bit 0 of r0 is clear (always true),
+// OBSOLETE initiate exception processing (trap).
+// OBSOLETE */
+// OBSOLETE #define BREAKPOINT {0xF0, 0x00, 0xD1, 0xFF}
+// OBSOLETE
+// OBSOLETE /* Amount PC must be decremented by after a breakpoint.
+// OBSOLETE This is often the number of bytes in BREAKPOINT
+// OBSOLETE but not always. */
+// OBSOLETE
+// OBSOLETE #define DECR_PC_AFTER_BREAK 0
+// OBSOLETE
+// OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity
+// OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the
+// OBSOLETE real way to know how big a register is. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_SIZE 4
+// OBSOLETE
+// OBSOLETE /* Number of machine registers */
+// OBSOLETE
+// OBSOLETE #define GP_REGS (38)
+// OBSOLETE #define FP_REGS (32)
+// OBSOLETE #define NUM_REGS (GP_REGS + FP_REGS)
+// OBSOLETE
+// OBSOLETE /* Initializer for an array of names of registers.
+// OBSOLETE There should be NUM_REGS strings in this initializer. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_NAMES {\
+// OBSOLETE "r0",\
+// OBSOLETE "r1",\
+// OBSOLETE "r2",\
+// OBSOLETE "r3",\
+// OBSOLETE "r4",\
+// OBSOLETE "r5",\
+// OBSOLETE "r6",\
+// OBSOLETE "r7",\
+// OBSOLETE "r8",\
+// OBSOLETE "r9",\
+// OBSOLETE "r10",\
+// OBSOLETE "r11",\
+// OBSOLETE "r12",\
+// OBSOLETE "r13",\
+// OBSOLETE "r14",\
+// OBSOLETE "r15",\
+// OBSOLETE "r16",\
+// OBSOLETE "r17",\
+// OBSOLETE "r18",\
+// OBSOLETE "r19",\
+// OBSOLETE "r20",\
+// OBSOLETE "r21",\
+// OBSOLETE "r22",\
+// OBSOLETE "r23",\
+// OBSOLETE "r24",\
+// OBSOLETE "r25",\
+// OBSOLETE "r26",\
+// OBSOLETE "r27",\
+// OBSOLETE "r28",\
+// OBSOLETE "r29",\
+// OBSOLETE "r30",\
+// OBSOLETE "r31",\
+// OBSOLETE "psr",\
+// OBSOLETE "fpsr",\
+// OBSOLETE "fpcr",\
+// OBSOLETE "sxip",\
+// OBSOLETE "snip",\
+// OBSOLETE "sfip",\
+// OBSOLETE "x0",\
+// OBSOLETE "x1",\
+// OBSOLETE "x2",\
+// OBSOLETE "x3",\
+// OBSOLETE "x4",\
+// OBSOLETE "x5",\
+// OBSOLETE "x6",\
+// OBSOLETE "x7",\
+// OBSOLETE "x8",\
+// OBSOLETE "x9",\
+// OBSOLETE "x10",\
+// OBSOLETE "x11",\
+// OBSOLETE "x12",\
+// OBSOLETE "x13",\
+// OBSOLETE "x14",\
+// OBSOLETE "x15",\
+// OBSOLETE "x16",\
+// OBSOLETE "x17",\
+// OBSOLETE "x18",\
+// OBSOLETE "x19",\
+// OBSOLETE "x20",\
+// OBSOLETE "x21",\
+// OBSOLETE "x22",\
+// OBSOLETE "x23",\
+// OBSOLETE "x24",\
+// OBSOLETE "x25",\
+// OBSOLETE "x26",\
+// OBSOLETE "x27",\
+// OBSOLETE "x28",\
+// OBSOLETE "x29",\
+// OBSOLETE "x30",\
+// OBSOLETE "x31",\
+// OBSOLETE "vbr",\
+// OBSOLETE "dmt0",\
+// OBSOLETE "dmd0",\
+// OBSOLETE "dma0",\
+// OBSOLETE "dmt1",\
+// OBSOLETE "dmd1",\
+// OBSOLETE "dma1",\
+// OBSOLETE "dmt2",\
+// OBSOLETE "dmd2",\
+// OBSOLETE "dma2",\
+// OBSOLETE "sr0",\
+// OBSOLETE "sr1",\
+// OBSOLETE "sr2",\
+// OBSOLETE "sr3",\
+// OBSOLETE "fpecr",\
+// OBSOLETE "fphs1",\
+// OBSOLETE "fpls1",\
+// OBSOLETE "fphs2",\
+// OBSOLETE "fpls2",\
+// OBSOLETE "fppt",\
+// OBSOLETE "fprh",\
+// OBSOLETE "fprl",\
+// OBSOLETE "fpit",\
+// OBSOLETE "fpsr",\
+// OBSOLETE "fpcr",\
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Register numbers of various important registers.
+// OBSOLETE Note that some of these values are "real" register numbers,
+// OBSOLETE and correspond to the general registers of the machine,
+// OBSOLETE and some are "phony" register numbers which are too large
+// OBSOLETE to be actual register numbers as far as the user is concerned
+// OBSOLETE but do serve to get the desired values when passed to read_register. */
+// OBSOLETE
+// OBSOLETE #define R0_REGNUM 0 /* Contains the constant zero */
+// OBSOLETE #define SRP_REGNUM 1 /* Contains subroutine return pointer */
+// OBSOLETE #define RV_REGNUM 2 /* Contains simple return values */
+// OBSOLETE #define SRA_REGNUM 12 /* Contains address of struct return values */
+// OBSOLETE #define SP_REGNUM 31 /* Contains address of top of stack */
+// OBSOLETE
+// OBSOLETE /* Instruction pointer notes...
+// OBSOLETE
+// OBSOLETE On the m88100:
+// OBSOLETE
+// OBSOLETE * cr04 = sxip. On exception, contains the excepting pc (probably).
+// OBSOLETE On rte, is ignored.
+// OBSOLETE
+// OBSOLETE * cr05 = snip. On exception, contains the NPC (next pc). On rte,
+// OBSOLETE pc is loaded from here.
+// OBSOLETE
+// OBSOLETE * cr06 = sfip. On exception, contains the NNPC (next next pc). On
+// OBSOLETE rte, the NPC is loaded from here.
+// OBSOLETE
+// OBSOLETE * lower two bits of each are flag bits. Bit 1 is V means address
+// OBSOLETE is valid. If address is not valid, bit 0 is ignored. Otherwise,
+// OBSOLETE bit 0 is E and asks for an exception to be taken if this
+// OBSOLETE instruction is executed.
+// OBSOLETE
+// OBSOLETE On the m88110:
+// OBSOLETE
+// OBSOLETE * cr04 = exip. On exception, contains the address of the excepting
+// OBSOLETE pc (always). On rte, pc is loaded from here. Bit 0, aka the D
+// OBSOLETE bit, is a flag saying that the offending instruction was in a
+// OBSOLETE branch delay slot. If set, then cr05 contains the NPC.
+// OBSOLETE
+// OBSOLETE * cr05 = enip. On exception, if the instruction pointed to by cr04
+// OBSOLETE was in a delay slot as indicated by the bit 0 of cr04, aka the D
+// OBSOLETE bit, the cr05 contains the NPC. Otherwise ignored.
+// OBSOLETE
+// OBSOLETE * cr06 is invalid */
+// OBSOLETE
+// OBSOLETE /* Note that the Harris Unix kernels emulate the m88100's behavior on
+// OBSOLETE the m88110. */
+// OBSOLETE
+// OBSOLETE #define SXIP_REGNUM 35 /* On m88100, Contains Shadow Execute
+// OBSOLETE Instruction Pointer. */
+// OBSOLETE #define SNIP_REGNUM 36 /* On m88100, Contains Shadow Next
+// OBSOLETE Instruction Pointer. */
+// OBSOLETE #define SFIP_REGNUM 37 /* On m88100, Contains Shadow Fetched
+// OBSOLETE Intruction pointer. */
+// OBSOLETE
+// OBSOLETE #define EXIP_REGNUM 35 /* On m88110, Contains Exception
+// OBSOLETE Executing Instruction Pointer. */
+// OBSOLETE #define ENIP_REGNUM 36 /* On m88110, Contains the Exception
+// OBSOLETE Next Instruction Pointer. */
+// OBSOLETE
+// OBSOLETE #define PC_REGNUM SXIP_REGNUM /* Program Counter */
+// OBSOLETE #define NPC_REGNUM SNIP_REGNUM /* Next Program Counter */
+// OBSOLETE #define M88K_NNPC_REGNUM SFIP_REGNUM /* Next Next Program Counter */
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE #define PSR_REGNUM 32 /* Processor Status Register */
+// OBSOLETE #define FPSR_REGNUM 33 /* Floating Point Status Register */
+// OBSOLETE #define FPCR_REGNUM 34 /* Floating Point Control Register */
+// OBSOLETE #define XFP_REGNUM 38 /* First Extended Float Register */
+// OBSOLETE #define X0_REGNUM XFP_REGNUM /* Which also contains the constant zero */
+// OBSOLETE
+// OBSOLETE /* This is rather a confusing lie. Our m88k port using a stack pointer value
+// OBSOLETE for the frame address. Hence, the frame address and the frame pointer are
+// OBSOLETE only indirectly related. The value of this macro is the register number
+// OBSOLETE fetched by the machine "independent" portions of gdb when they want to know
+// OBSOLETE about a frame address. Thus, we lie here and claim that FP_REGNUM is
+// OBSOLETE SP_REGNUM. */
+// OBSOLETE #define FP_REGNUM SP_REGNUM /* Reg fetched to locate frame when pgm stops */
+// OBSOLETE #define ACTUAL_FP_REGNUM 30
+// OBSOLETE
+// OBSOLETE /* PSR status bit definitions. */
+// OBSOLETE
+// OBSOLETE #define PSR_MODE 0x80000000
+// OBSOLETE #define PSR_BYTE_ORDER 0x40000000
+// OBSOLETE #define PSR_SERIAL_MODE 0x20000000
+// OBSOLETE #define PSR_CARRY 0x10000000
+// OBSOLETE #define PSR_SFU_DISABLE 0x000003f0
+// OBSOLETE #define PSR_SFU1_DISABLE 0x00000008
+// OBSOLETE #define PSR_MXM 0x00000004
+// OBSOLETE #define PSR_IND 0x00000002
+// OBSOLETE #define PSR_SFRZ 0x00000001
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* The following two comments come from the days prior to the m88110
+// OBSOLETE port. The m88110 handles the instruction pointers differently. I
+// OBSOLETE do not know what any m88110 kernels do as the m88110 port I'm
+// OBSOLETE working with is for an embedded system. rich@cygnus.com
+// OBSOLETE 13-sept-93. */
+// OBSOLETE
+// OBSOLETE /* BCS requires that the SXIP_REGNUM (or PC_REGNUM) contain the
+// OBSOLETE address of the next instr to be executed when a breakpoint occurs.
+// OBSOLETE Because the kernel gets the next instr (SNIP_REGNUM), the instr in
+// OBSOLETE SNIP needs to be put back into SFIP, and the instr in SXIP should
+// OBSOLETE be shifted to SNIP */
+// OBSOLETE
+// OBSOLETE /* Are you sitting down? It turns out that the 88K BCS (binary
+// OBSOLETE compatibility standard) folks originally felt that the debugger
+// OBSOLETE should be responsible for backing up the IPs, not the kernel (as is
+// OBSOLETE usually done). Well, they have reversed their decision, and in
+// OBSOLETE future releases our kernel will be handling the backing up of the
+// OBSOLETE IPs. So, eventually, we won't need to do the SHIFT_INST_REGS
+// OBSOLETE stuff. But, for now, since there are 88K systems out there that do
+// OBSOLETE need the debugger to do the IP shifting, and since there will be
+// OBSOLETE systems where the kernel does the shifting, the code is a little
+// OBSOLETE more complex than perhaps it needs to be (we still go inside
+// OBSOLETE SHIFT_INST_REGS, and if the shifting hasn't occurred then gdb goes
+// OBSOLETE ahead and shifts). */
+// OBSOLETE
+// OBSOLETE extern int target_is_m88110;
+// OBSOLETE #define SHIFT_INST_REGS() \
+// OBSOLETE if (!target_is_m88110) \
+// OBSOLETE { \
+// OBSOLETE CORE_ADDR pc = read_register (PC_REGNUM); \
+// OBSOLETE CORE_ADDR npc = read_register (NPC_REGNUM); \
+// OBSOLETE if (pc != npc) \
+// OBSOLETE { \
+// OBSOLETE write_register (M88K_NNPC_REGNUM, npc); \
+// OBSOLETE write_register (NPC_REGNUM, pc); \
+// OBSOLETE } \
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Storing the following registers is a no-op. */
+// OBSOLETE #define CANNOT_STORE_REGISTER(regno) (((regno) == R0_REGNUM) \
+// OBSOLETE || ((regno) == X0_REGNUM))
+// OBSOLETE
+// OBSOLETE /* Number of bytes of storage in the actual machine representation
+// OBSOLETE for register N. On the m88k, the general purpose registers are 4
+// OBSOLETE bytes and the 88110 extended registers are 10 bytes. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_RAW_SIZE(N) ((N) < XFP_REGNUM ? 4 : 10)
+// OBSOLETE
+// OBSOLETE /* Total amount of space needed to store our copies of the machine's
+// OBSOLETE register state, the array `registers'. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_BYTES ((GP_REGS * REGISTER_RAW_SIZE(0)) \
+// OBSOLETE + (FP_REGS * REGISTER_RAW_SIZE(XFP_REGNUM)))
+// OBSOLETE
+// OBSOLETE /* Index within `registers' of the first byte of the space for
+// OBSOLETE register N. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_BYTE(N) (((N) * REGISTER_RAW_SIZE(0)) \
+// OBSOLETE + ((N) >= XFP_REGNUM \
+// OBSOLETE ? (((N) - XFP_REGNUM) \
+// OBSOLETE * REGISTER_RAW_SIZE(XFP_REGNUM)) \
+// OBSOLETE : 0))
+// OBSOLETE
+// OBSOLETE /* Number of bytes of storage in the program's representation for
+// OBSOLETE register N. On the m88k, all registers are 4 bytes excepting the
+// OBSOLETE m88110 extended registers which are 8 byte doubles. */
+// OBSOLETE
+// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) ((N) < XFP_REGNUM ? 4 : 8)
+// OBSOLETE
+// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
+// OBSOLETE
+// OBSOLETE #define MAX_REGISTER_RAW_SIZE (REGISTER_RAW_SIZE(XFP_REGNUM))
+// OBSOLETE
+// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have.
+// OBSOLETE Are FPS1, FPS2, FPR "virtual" regisers? */
+// OBSOLETE
+// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE (REGISTER_RAW_SIZE(XFP_REGNUM))
+// OBSOLETE
+// OBSOLETE /* Return the GDB type object for the "standard" data type
+// OBSOLETE of data in register N. */
+// OBSOLETE
+// OBSOLETE struct type *m88k_register_type (int regnum);
+// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) m88k_register_type (N)
+// OBSOLETE
+// OBSOLETE /* The 88k call/return conventions call for "small" values to be returned
+// OBSOLETE into consecutive registers starting from r2. */
+// OBSOLETE
+// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
+// OBSOLETE memcpy ((VALBUF), &(((char *)REGBUF)[REGISTER_BYTE(RV_REGNUM)]), TYPE_LENGTH (TYPE))
+// OBSOLETE
+// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(int *)(REGBUF))
+// OBSOLETE
+// OBSOLETE /* Write into appropriate registers a function return value
+// OBSOLETE of type TYPE, given in virtual format. */
+// OBSOLETE
+// OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \
+// OBSOLETE write_register_bytes (2*REGISTER_RAW_SIZE(0), (VALBUF), TYPE_LENGTH (TYPE))
+// OBSOLETE
+// OBSOLETE /* In COFF, if PCC says a parameter is a short or a char, do not
+// OBSOLETE change it to int (it seems the convention is to change it). */
+// OBSOLETE
+// OBSOLETE #define BELIEVE_PCC_PROMOTION 1
+// OBSOLETE
+// OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame
+// OBSOLETE (its caller). */
+// OBSOLETE
+// OBSOLETE /* FRAME_CHAIN takes a frame's nominal address
+// OBSOLETE and produces the frame's chain-pointer.
+// OBSOLETE
+// OBSOLETE However, if FRAME_CHAIN_VALID returns zero,
+// OBSOLETE it means the given frame is the outermost one and has no caller. */
+// OBSOLETE
+// OBSOLETE extern CORE_ADDR frame_chain ();
+// OBSOLETE extern int frame_chain_valid ();
+// OBSOLETE extern int frameless_function_invocation ();
+// OBSOLETE
+// OBSOLETE #define FRAME_CHAIN(thisframe) \
+// OBSOLETE frame_chain (thisframe)
+// OBSOLETE
+// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(frame) \
+// OBSOLETE (frameless_function_invocation (frame))
+// OBSOLETE
+// OBSOLETE /* Define other aspects of the stack frame. */
+// OBSOLETE
+// OBSOLETE #define FRAME_SAVED_PC(FRAME) \
+// OBSOLETE frame_saved_pc (FRAME)
+// OBSOLETE extern CORE_ADDR frame_saved_pc ();
+// OBSOLETE
+// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) \
+// OBSOLETE frame_args_address (fi)
+// OBSOLETE extern CORE_ADDR frame_args_address ();
+// OBSOLETE
+// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) \
+// OBSOLETE frame_locals_address (fi)
+// OBSOLETE extern CORE_ADDR frame_locals_address ();
+// OBSOLETE
+// OBSOLETE /* Return number of args passed to a frame.
+// OBSOLETE Can return -1, meaning no way to tell. */
+// OBSOLETE
+// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
+// OBSOLETE
+// OBSOLETE /* Return number of bytes at start of arglist that are not really args. */
+// OBSOLETE
+// OBSOLETE #define FRAME_ARGS_SKIP 0
+// OBSOLETE
+// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
+// OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO.
+// OBSOLETE This includes special registers such as pc and fp saved in special
+// OBSOLETE ways in the stack frame. sp is even more special:
+// OBSOLETE the address we return for it IS the sp for the next frame. */
+// OBSOLETE
+// OBSOLETE /* On the 88k, parameter registers get stored into the so called "homing"
+// OBSOLETE area. This *always* happens when you compiled with GCC and use -g.
+// OBSOLETE Also, (with GCC and -g) the saving of the parameter register values
+// OBSOLETE always happens right within the function prologue code, so these register
+// OBSOLETE values can generally be relied upon to be already copied into their
+// OBSOLETE respective homing slots by the time you will normally try to look at
+// OBSOLETE them (we hope).
+// OBSOLETE
+// OBSOLETE Note that homing area stack slots are always at *positive* offsets from
+// OBSOLETE the frame pointer. Thus, the homing area stack slots for the parameter
+// OBSOLETE registers (passed values) for a given function are actually part of the
+// OBSOLETE frame area of the caller. This is unusual, but it should not present
+// OBSOLETE any special problems for GDB.
+// OBSOLETE
+// OBSOLETE Note also that on the 88k, we are only interested in finding the
+// OBSOLETE registers that might have been saved in memory. This is a subset of
+// OBSOLETE the whole set of registers because the standard calling sequence allows
+// OBSOLETE the called routine to clobber many registers.
+// OBSOLETE
+// OBSOLETE We could manage to locate values for all of the so called "preserved"
+// OBSOLETE registers (some of which may get saved within any particular frame) but
+// OBSOLETE that would require decoding all of the tdesc information. That would be
+// OBSOLETE nice information for GDB to have, but it is not strictly manditory if we
+// OBSOLETE can live without the ability to look at values within (or backup to)
+// OBSOLETE previous frames.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE struct frame_saved_regs;
+// OBSOLETE struct frame_info;
+// OBSOLETE
+// OBSOLETE void frame_find_saved_regs (struct frame_info *fi,
+// OBSOLETE struct frame_saved_regs *fsr);
+// OBSOLETE
+// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
+// OBSOLETE frame_find_saved_regs (frame_info, &frame_saved_regs)
+// OBSOLETE \f
+// OBSOLETE
+// OBSOLETE #define POP_FRAME pop_frame ()
+// OBSOLETE extern void pop_frame ();
+// OBSOLETE
+// OBSOLETE /* Call function stuff contributed by Kevin Buettner of Motorola. */
+// OBSOLETE
+// OBSOLETE #define CALL_DUMMY_LOCATION AFTER_TEXT_END
+// OBSOLETE
+// OBSOLETE extern void m88k_push_dummy_frame ();
+// OBSOLETE #define PUSH_DUMMY_FRAME m88k_push_dummy_frame()
+// OBSOLETE
+// OBSOLETE #define CALL_DUMMY { \
+// OBSOLETE 0x67ff00c0, /* 0: subu #sp,#sp,0xc0 */ \
+// OBSOLETE 0x243f0004, /* 4: st #r1,#sp,0x4 */ \
+// OBSOLETE 0x245f0008, /* 8: st #r2,#sp,0x8 */ \
+// OBSOLETE 0x247f000c, /* c: st #r3,#sp,0xc */ \
+// OBSOLETE 0x249f0010, /* 10: st #r4,#sp,0x10 */ \
+// OBSOLETE 0x24bf0014, /* 14: st #r5,#sp,0x14 */ \
+// OBSOLETE 0x24df0018, /* 18: st #r6,#sp,0x18 */ \
+// OBSOLETE 0x24ff001c, /* 1c: st #r7,#sp,0x1c */ \
+// OBSOLETE 0x251f0020, /* 20: st #r8,#sp,0x20 */ \
+// OBSOLETE 0x253f0024, /* 24: st #r9,#sp,0x24 */ \
+// OBSOLETE 0x255f0028, /* 28: st #r10,#sp,0x28 */ \
+// OBSOLETE 0x257f002c, /* 2c: st #r11,#sp,0x2c */ \
+// OBSOLETE 0x259f0030, /* 30: st #r12,#sp,0x30 */ \
+// OBSOLETE 0x25bf0034, /* 34: st #r13,#sp,0x34 */ \
+// OBSOLETE 0x25df0038, /* 38: st #r14,#sp,0x38 */ \
+// OBSOLETE 0x25ff003c, /* 3c: st #r15,#sp,0x3c */ \
+// OBSOLETE 0x261f0040, /* 40: st #r16,#sp,0x40 */ \
+// OBSOLETE 0x263f0044, /* 44: st #r17,#sp,0x44 */ \
+// OBSOLETE 0x265f0048, /* 48: st #r18,#sp,0x48 */ \
+// OBSOLETE 0x267f004c, /* 4c: st #r19,#sp,0x4c */ \
+// OBSOLETE 0x269f0050, /* 50: st #r20,#sp,0x50 */ \
+// OBSOLETE 0x26bf0054, /* 54: st #r21,#sp,0x54 */ \
+// OBSOLETE 0x26df0058, /* 58: st #r22,#sp,0x58 */ \
+// OBSOLETE 0x26ff005c, /* 5c: st #r23,#sp,0x5c */ \
+// OBSOLETE 0x271f0060, /* 60: st #r24,#sp,0x60 */ \
+// OBSOLETE 0x273f0064, /* 64: st #r25,#sp,0x64 */ \
+// OBSOLETE 0x275f0068, /* 68: st #r26,#sp,0x68 */ \
+// OBSOLETE 0x277f006c, /* 6c: st #r27,#sp,0x6c */ \
+// OBSOLETE 0x279f0070, /* 70: st #r28,#sp,0x70 */ \
+// OBSOLETE 0x27bf0074, /* 74: st #r29,#sp,0x74 */ \
+// OBSOLETE 0x27df0078, /* 78: st #r30,#sp,0x78 */ \
+// OBSOLETE 0x63df0000, /* 7c: addu #r30,#sp,0x0 */ \
+// OBSOLETE 0x145f0000, /* 80: ld #r2,#sp,0x0 */ \
+// OBSOLETE 0x147f0004, /* 84: ld #r3,#sp,0x4 */ \
+// OBSOLETE 0x149f0008, /* 88: ld #r4,#sp,0x8 */ \
+// OBSOLETE 0x14bf000c, /* 8c: ld #r5,#sp,0xc */ \
+// OBSOLETE 0x14df0010, /* 90: ld #r6,#sp,0x10 */ \
+// OBSOLETE 0x14ff0014, /* 94: ld #r7,#sp,0x14 */ \
+// OBSOLETE 0x151f0018, /* 98: ld #r8,#sp,0x18 */ \
+// OBSOLETE 0x153f001c, /* 9c: ld #r9,#sp,0x1c */ \
+// OBSOLETE 0x5c200000, /* a0: or.u #r1,#r0,0x0 */ \
+// OBSOLETE 0x58210000, /* a4: or #r1,#r1,0x0 */ \
+// OBSOLETE 0xf400c801, /* a8: jsr #r1 */ \
+// OBSOLETE 0xf000d1ff /* ac: tb0 0x0,#r0,0x1ff */ \
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #define CALL_DUMMY_START_OFFSET 0x80
+// OBSOLETE #define CALL_DUMMY_LENGTH 0xb0
+// OBSOLETE
+// OBSOLETE /* FIXME: byteswapping. */
+// OBSOLETE #define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) \
+// OBSOLETE { \
+// OBSOLETE *(unsigned long *)((char *) (dummy) + 0xa0) |= \
+// OBSOLETE (((unsigned long) (fun)) >> 16); \
+// OBSOLETE *(unsigned long *)((char *) (dummy) + 0xa4) |= \
+// OBSOLETE (((unsigned long) (fun)) & 0xffff); \
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Stack must be aligned on 64-bit boundaries when synthesizing
+// OBSOLETE function calls. */
+// OBSOLETE
+// OBSOLETE #define STACK_ALIGN(addr) (((addr) + 7) & -8)
+// OBSOLETE
+// OBSOLETE #define STORE_STRUCT_RETURN(addr, sp) \
+// OBSOLETE write_register (SRA_REGNUM, (addr))
+// OBSOLETE
+// OBSOLETE #define NEED_TEXT_START_END 1
+// OBSOLETE
+// OBSOLETE /* According to the MC88100 RISC Microprocessor User's Manual, section
+// OBSOLETE 6.4.3.1.2:
+// OBSOLETE
+// OBSOLETE ... can be made to return to a particular instruction by placing a
+// OBSOLETE valid instruction address in the SNIP and the next sequential
+// OBSOLETE instruction address in the SFIP (with V bits set and E bits clear).
+// OBSOLETE The rte resumes execution at the instruction pointed to by the
+// OBSOLETE SNIP, then the SFIP.
+// OBSOLETE
+// OBSOLETE The E bit is the least significant bit (bit 0). The V (valid) bit is
+// OBSOLETE bit 1. This is why we logical or 2 into the values we are writing
+// OBSOLETE below. It turns out that SXIP plays no role when returning from an
+// OBSOLETE exception so nothing special has to be done with it. We could even
+// OBSOLETE (presumably) give it a totally bogus value.
+// OBSOLETE
+// OBSOLETE -- Kevin Buettner
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE extern void m88k_target_write_pc (CORE_ADDR pc, ptid_t ptid);
+// OBSOLETE #define TARGET_WRITE_PC(VAL, PID) m88k_target_write_pc (VAL, PID)
-/* Host machine description for Motorola Delta 88 system, for GDB.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#if !defined (USG)
-#define USG 1
-#endif
-
-#include <sys/param.h>
-#include <sys/time.h>
-
-#define HAVE_TERMIO
-
-/*#define USIZE 2048 */
-/*#define NBPG NBPC */
-/* Might be defined in <sys/param.h>. I suspect this define was a relic
- from before when BFD did core files. */
-/* #define UPAGES USIZE */
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-
-/* Since registers r0 through r31 are stored directly in the struct ptrace_user,
- (for m88k BCS)
- the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
-
-#define KERNEL_U_ADDR 0
+// OBSOLETE /* Host machine description for Motorola Delta 88 system, for GDB.
+// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #if !defined (USG)
+// OBSOLETE #define USG 1
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE #include <sys/param.h>
+// OBSOLETE #include <sys/time.h>
+// OBSOLETE
+// OBSOLETE #define HAVE_TERMIO
+// OBSOLETE
+// OBSOLETE /*#define USIZE 2048 */
+// OBSOLETE /*#define NBPG NBPC */
+// OBSOLETE /* Might be defined in <sys/param.h>. I suspect this define was a relic
+// OBSOLETE from before when BFD did core files. */
+// OBSOLETE /* #define UPAGES USIZE */
+// OBSOLETE
+// OBSOLETE /* This is the amount to subtract from u.u_ar0
+// OBSOLETE to get the offset in the core file of the register values. */
+// OBSOLETE
+// OBSOLETE /* Since registers r0 through r31 are stored directly in the struct ptrace_user,
+// OBSOLETE (for m88k BCS)
+// OBSOLETE the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
+// OBSOLETE
+// OBSOLETE #define KERNEL_U_ADDR 0
-/* Host-machine dependent parameters for Motorola 88000, for GDB.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#if !defined (USG)
-#define USG 1
-#endif
-
-#include <sys/param.h>
-
-#ifdef __GNUC__
-#define memcpy __builtin_memcpy
-/* gcc doesn't have this, at least not gcc 1.92. */
-/* #define memset __builtin_memset */
-#define strcmp __builtin_strcmp
-#endif
-
-#define x_foff _x_x._x_offset
-#define x_fname _x_name
-#define USER ptrace_user
-#define _BSD_WAIT_FLAVOR
-
-#define HAVE_TERMIO
-
-#ifndef USIZE
-#define USIZE 2048
-#endif
-#define NBPG NBPC
-#define UPAGES USIZE
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-
-/* Since registers r0 through r31 are stored directly in the struct ptrace_user,
- (for m88k BCS)
- the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
-
-#define KERNEL_U_ADDR 0
+// OBSOLETE /* Host-machine dependent parameters for Motorola 88000, for GDB.
+// OBSOLETE Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #if !defined (USG)
+// OBSOLETE #define USG 1
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE #include <sys/param.h>
+// OBSOLETE
+// OBSOLETE #ifdef __GNUC__
+// OBSOLETE #define memcpy __builtin_memcpy
+// OBSOLETE /* gcc doesn't have this, at least not gcc 1.92. */
+// OBSOLETE /* #define memset __builtin_memset */
+// OBSOLETE #define strcmp __builtin_strcmp
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE #define x_foff _x_x._x_offset
+// OBSOLETE #define x_fname _x_name
+// OBSOLETE #define USER ptrace_user
+// OBSOLETE #define _BSD_WAIT_FLAVOR
+// OBSOLETE
+// OBSOLETE #define HAVE_TERMIO
+// OBSOLETE
+// OBSOLETE #ifndef USIZE
+// OBSOLETE #define USIZE 2048
+// OBSOLETE #endif
+// OBSOLETE #define NBPG NBPC
+// OBSOLETE #define UPAGES USIZE
+// OBSOLETE
+// OBSOLETE /* This is the amount to subtract from u.u_ar0
+// OBSOLETE to get the offset in the core file of the register values. */
+// OBSOLETE
+// OBSOLETE /* Since registers r0 through r31 are stored directly in the struct ptrace_user,
+// OBSOLETE (for m88k BCS)
+// OBSOLETE the ptrace_user offsets are sufficient and KERNEL_U_ADDRESS can be 0 */
+// OBSOLETE
+// OBSOLETE #define KERNEL_U_ADDR 0
# Target: MIPS SGI running Irix 5
-TDEPFILES= mips-tdep.o
+TDEPFILES= mips-tdep.o mips-irix-tdep.o solib.o solib-irix.o
TM_FILE= tm-irix5.h
# Host: SGI Iris running irix 6.x
XM_FILE= xm-irix6.h
NAT_FILE= nm-irix6.h
-NATDEPFILES= fork-child.o solib.o irix5-nat.o corelow.o procfs.o \
+NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \
proc-api.o proc-events.o proc-flags.o proc-why.o
XM_CLIBS=-lbsd
# Target: MIPS SGI running Irix 6.x
-TDEPFILES= mips-tdep.o
+TDEPFILES= mips-tdep.o mips-irix-tdep.o solib.o solib-irix.o
TM_FILE= tm-irix6.h
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-bigmips.h"
+#include "mips/tm-bigmips64.h"
/* SGI's assembler doesn't grok dollar signs in identifiers.
So we use dots instead. This item must be coordinated with G++. */
((N) - FP0_REGNUM) * sizeof(double) : \
32 * sizeof(double) + ((N) - 32) * MIPS_REGSIZE)
-#undef REGISTER_VIRTUAL_TYPE
-#define REGISTER_VIRTUAL_TYPE(N) \
- (((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_double \
- : ((N) == 32 /*SR*/) ? builtin_type_uint32 \
- : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
- : builtin_type_int)
-
/* Force N32 ABI as the default. */
#define MIPS_DEFAULT_ABI MIPS_ABI_N32
/* Select the disassembler */
#undef TM_PRINT_INSN_MACH
#define TM_PRINT_INSN_MACH bfd_mach_mips8000
+
+/* Undefine those methods which have been multiarched. */
+#undef REGISTER_VIRTUAL_TYPE
(extract_address (REGBUF + REGISTER_BYTE (V0_REGNUM), \
REGISTER_RAW_SIZE (V0_REGNUM)))
-extern use_struct_convention_fn mips_use_struct_convention;
-#define USE_STRUCT_CONVENTION(gcc_p, type) mips_use_struct_convention (gcc_p, type)
\f
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
#define FRAME_ARGS_SKIP 0
-/* Put here the code to store, into a struct frame_saved_regs,
- the addresses of the saved registers of frame described by FRAME_INFO.
- This includes special registers such as pc and fp saved in special
- ways in the stack frame. sp is even more special:
- the address we return for it IS the sp for the next frame. */
-
-#define FRAME_INIT_SAVED_REGS(frame_info) \
- do { \
- if ((frame_info)->saved_regs == NULL) \
- mips_find_saved_regs (frame_info); \
- (frame_info)->saved_regs[SP_REGNUM] = (frame_info)->frame; \
- } while (0)
-extern void mips_find_saved_regs (struct frame_info *);
\f
/* Things needed for making the inferior call functions. */
/* Override the default get_saved_register function with
one that takes account of generic CALL_DUMMY frames. */
#define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \
- generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
+ generic_unwind_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
/* Define this for Wingdb */
#define TARGET_MN10200
XM_CLIBS=
NAT_FILE= nm-linux.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o linux-proc.o \
- core-regset.o ppc-linux-nat.o proc-service.o thread-db.o lin-lwp.o \
+NATDEPFILES= infptrace.o inftarg.o fork-child.o linux-proc.o \
+ ppc-linux-nat.o proc-service.o thread-db.o lin-lwp.o \
gcore.o
LOADLIBES = -ldl -rdynamic
# Target: Motorola PPC on Linux
TDEPFILES= rs6000-tdep.o ppc-linux-tdep.o ppc-sysv-tdep.o solib.o \
- solib-svr4.o solib-legacy.o
+ solib-svr4.o solib-legacy.o corelow.o
TM_FILE= tm-linux.h
SIM_OBS = remote-sim.o
#define FP0_REGNUM 32 /* Floating point register 0 */
#define FPLAST_REGNUM 63 /* Last floating point register */
-/* These #defines are used to parse core files and talk to ptrace, so they
- must remain fixed. */
-#define FIRST_UISA_SP_REGNUM 64 /* first special register number */
-#define LAST_UISA_SP_REGNUM 70 /* last special register number */
-
/* Define other aspects of the stack frame. */
#define INIT_FRAME_PC_FIRST(fromleaf, prev) \
hppa*) gdb_host_cpu=pa ;;
i[3456]86*) gdb_host_cpu=i386 ;;
m68*) gdb_host_cpu=m68k ;;
-m88*) gdb_host_cpu=m88k ;;
+# OBSOLETE m88*) gdb_host_cpu=m88k ;;
mips*) gdb_host_cpu=mips ;;
powerpc*) gdb_host_cpu=powerpc ;;
sparcv9 | sparc64) gdb_host_cpu=sparc ;;
m68*-sun-sunos4*) gdb_host=sun3os4 ;;
m68*-sun-*) gdb_host=sun3os4 ;;
-m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
-m88*-motorola-sysv*) gdb_host=delta88 ;;
-m88*-*-*) gdb_host=m88k ;;
+# OBSOLETE m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
+# OBSOLETE m88*-motorola-sysv*) gdb_host=delta88 ;;
+# OBSOLETE m88*-*-*) gdb_host=m88k ;;
mips-dec-mach3*) gdb_host=mipsm3 ;;
mips-dec-*) gdb_host=decstation ;;
ns32k-*-netbsd*) gdb_host=nbsdaout ;;
-powerpc-*-aix*) gdb_host=aix ;;
+powerpc-*-aix3*) gdb_host=aix ;;
+powerpc-*-aix4.[0-2]*) gdb_host=aix ;;
+powerpc-*-aix4.3.[0-1]*) gdb_host=aix ;;
+powerpc-*-aix*) gdb_host=aix432 ;;
powerpc-*-linux*) gdb_host=linux ;;
powerpc-*-netbsd*) gdb_host=nbsd ;;
i[3456]86*) gdb_target_cpu=i386 ;;
m68hc11*|m6811*) gdb_target_cpu=m68hc11 ;;
m68*) gdb_target_cpu=m68k ;;
-m88*) gdb_target_cpu=m88k ;;
+# OBSOLETE m88*) gdb_target_cpu=m88k ;;
mips*) gdb_target_cpu=mips ;;
powerpc*) gdb_target_cpu=powerpc ;;
sparc*) gdb_target_cpu=sparc ;;
alpha*-*-freebsd*) gdb_target=fbsd ;;
alpha*-*-netbsd*) gdb_target=nbsd ;;
-arc-*-*) gdb_target=arc ;;
+# OBSOLETE arc-*-*) gdb_target=arc ;;
arm*-wince-pe) gdb_target=wince ;;
arm*-*-linux*) gdb_target=linux
m68*-*-sysv4*) gdb_target=m68kv4 ;;
m68*-*-vxworks*) gdb_target=vxworks68 ;;
-m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
-m88*-motorola-*) gdb_target=delta88 ;;
-m88*-*-*) gdb_target=m88k ;;
+# OBSOLETE m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
+# OBSOLETE m88*-motorola-*) gdb_target=delta88 ;;
+# OBSOLETE m88*-*-*) gdb_target=m88k ;;
mcore*-*-*) gdb_target=mcore ;;
mips64*-big-*) gdb_target=bigmips64 ;;
powerpc-*-netbsd*) gdb_target=nbsd ;;
powerpc-*-aix*) gdb_target=aix ;;
-powerpc-*-eabi* | powerpc-*-sysv* | powerpc-*-elf*)
- if test -f ../sim/ppc/Makefile; then
- gdb_target=ppc-sim
- else
- gdb_target=ppc-eabi
- fi ;;
-powerpcle-*-eabi* | powerpcle-*-sysv* | powerpcle-*-elf*)
- if test -f ../sim/ppc/Makefile; then
- gdb_target=ppcle-sim
- else
- gdb_target=ppcle-eabi
- fi ;;
powerpc-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
powerpc-*-vxworks*) gdb_target=vxworks ;;
+powerpc*-*-*) if test -f ../sim/ppc/Makefile; then
+ gdb_target=ppc-sim
+ else
+ gdb_target=ppc-eabi
+ fi ;;
rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
rs6000-*-aix4*) gdb_target=aix4 ;;
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
-/* Native support for Motorola 88k running Harris CX/UX.
- Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000,
- 2001 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include "gdbcore.h"
-#include <sys/user.h>
-
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "symtab.h"
-#include "regcache.h"
-
-#ifndef USER /* added to support BCS ptrace_user */
-#define USER ptrace_user
-#endif
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <sys/file.h>
-#include "gdb_stat.h"
-
-#include "symtab.h"
-#include "setjmp.h"
-#include "value.h"
-
-#include <sys/ptrace.h>
-
-/* CX/UX provides them already, but as word offsets instead of char offsets */
-#define SXIP_OFFSET (PT_SXIP * 4)
-#define SNIP_OFFSET (PT_SNIP * 4)
-#define SFIP_OFFSET (PT_SFIP * 4)
-#define PSR_OFFSET (PT_PSR * sizeof(int))
-#define FPSR_OFFSET (PT_FPSR * sizeof(int))
-#define FPCR_OFFSET (PT_FPCR * sizeof(int))
-
-#define XREGADDR(r) (((char *)&u.pt_x0-(char *)&u) + \
- ((r)-X0_REGNUM)*sizeof(X_REGISTER_RAW_TYPE))
-
-extern int have_symbol_file_p ();
-
-extern jmp_buf stack_jmp;
-
-extern int errno;
-
-void
-fetch_inferior_registers (int regno)
-{
- register unsigned int regaddr;
- char buf[MAX_REGISTER_RAW_SIZE];
- register int i;
-
- struct USER u;
- unsigned int offset;
-
- offset = (char *) &u.pt_r0 - (char *) &u;
- regaddr = offset; /* byte offset to r0; */
-
-/* offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
- for (regno = 0; regno < PC_REGNUM; regno++)
- {
- /*regaddr = register_addr (regno, offset); */
- /* 88k enhancement */
-
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0);
- regaddr += sizeof (int);
- }
- supply_register (regno, buf);
- }
- /* now load up registers 32-37; special pc registers */
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) PSR_OFFSET, 0);
- supply_register (PSR_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPSR_OFFSET, 0);
- supply_register (FPSR_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPCR_OFFSET, 0);
- supply_register (FPCR_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
- supply_register (SXIP_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
- supply_register (SNIP_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
- supply_register (SFIP_REGNUM, buf);
-
- if (target_is_m88110)
- {
- for (regaddr = XREGADDR (X0_REGNUM), regno = X0_REGNUM;
- regno < NUM_REGS;
- regno++, regaddr += 16)
- {
- X_REGISTER_RAW_TYPE xval;
-
- *(int *) &xval.w1 = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0);
- *(int *) &xval.w2 = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) (regaddr + 4), 0);
- *(int *) &xval.w3 = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) (regaddr + 8), 0);
- *(int *) &xval.w4 = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) (regaddr + 12), 0);
- supply_register (regno, (void *) &xval);
- }
- }
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int regno)
-{
- register unsigned int regaddr;
- char buf[80];
-
- struct USER u;
-
- unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
-
- regaddr = offset;
-
- /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
- svr3 doesn't run on an 88110, or the kernel isolates the different (not
- completely sure this is true, but seems to be. */
- if (regno >= 0)
- {
- /* regaddr = register_addr (regno, offset); */
- if (regno < PC_REGNUM)
- {
- regaddr = offset + regno * sizeof (int);
- errno = 0;
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- else if (regno == PSR_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
- else if (regno == FPSR_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
- else if (regno == FPCR_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
- else if (regno == SXIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
- else if (regno == SNIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
- else if (regno == SFIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
- else if (target_is_m88110 && regno < NUM_REGS)
- {
- X_REGISTER_RAW_TYPE xval;
-
- read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
- sizeof (X_REGISTER_RAW_TYPE));
- regaddr = XREGADDR (regno);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 4, xval.w2);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 8, xval.w3);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 12, xval.w4);
- }
- else
- printf_unfiltered ("Bad register number for store_inferior routine\n");
- }
- else
- {
- for (regno = 0; regno < PC_REGNUM; regno++)
- {
- /* regaddr = register_addr (regno, offset); */
- errno = 0;
- regaddr = offset + regno * sizeof (int);
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
- if (target_is_m88110)
- {
- for (regno = X0_REGNUM; regno < NUM_REGS; regno++)
- {
- X_REGISTER_RAW_TYPE xval;
-
- read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
- sizeof (X_REGISTER_RAW_TYPE));
- regaddr = XREGADDR (regno);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 4), xval.w2);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 8), xval.w3);
- ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 12), xval.w4);
- }
- }
- }
-}
-
-/* blockend is the address of the end of the user structure */
-
-m88k_register_u_addr (int blockend, int regnum)
-{
- struct USER u;
- int ustart = blockend - sizeof (struct USER);
-
- if (regnum < PSR_REGNUM)
- return (ustart + ((int) &u.pt_r0 - (int) &u) +
- REGISTER_SIZE * regnum);
- else if (regnum == PSR_REGNUM)
- return (ustart + ((int) &u.pt_psr) - (int) &u);
- else if (regnum == FPSR_REGNUM)
- return (ustart + ((int) &u.pt_fpsr) - (int) &u);
- else if (regnum == FPCR_REGNUM)
- return (ustart + ((int) &u.pt_fpcr) - (int) &u);
- else if (regnum == SXIP_REGNUM)
- return (ustart + SXIP_OFFSET);
- else if (regnum == SNIP_REGNUM)
- return (ustart + SNIP_OFFSET);
- else if (regnum == SFIP_REGNUM)
- return (ustart + SFIP_OFFSET);
- else if (target_is_m88110)
- return (ustart + ((int) &u.pt_x0 - (int) &u) + /* Must be X register */
- sizeof (u.pt_x0) * (regnum - X0_REGNUM));
- else
- return (blockend + REGISTER_SIZE * regnum);
-}
-
-#ifdef USE_PROC_FS
-
-#include <sys/procfs.h>
-
-/* Prototypes for supply_gregset etc. */
-#include "gregset.h"
-
-/* Given a pointer to a general register set in /proc format (gregset_t *),
- unpack the register contents and supply them as gdb's idea of the current
- register values. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
- register int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi <= SP_REGNUM; regi++)
- supply_register (regi, (char *) (regp + regi));
-
- supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
- supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
- supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
- supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
- supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
- supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
- int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi <= R_R31; regi++)
- if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(int *) ®isters[REGISTER_BYTE (regi)];
-
- if ((regno == -1) || (regno == SXIP_REGNUM))
- *(regp + R_XIP) = *(int *) ®isters[REGISTER_BYTE (SXIP_REGNUM)];
- if ((regno == -1) || (regno == SNIP_REGNUM))
- *(regp + R_NIP) = *(int *) ®isters[REGISTER_BYTE (SNIP_REGNUM)];
- if ((regno == -1) || (regno == SFIP_REGNUM))
- *(regp + R_FIP) = *(int *) ®isters[REGISTER_BYTE (SFIP_REGNUM)];
- if ((regno == -1) || (regno == PSR_REGNUM))
- *(regp + R_PSR) = *(int *) ®isters[REGISTER_BYTE (PSR_REGNUM)];
- if ((regno == -1) || (regno == FPSR_REGNUM))
- *(regp + R_FPSR) = *(int *) ®isters[REGISTER_BYTE (FPSR_REGNUM)];
- if ((regno == -1) || (regno == FPCR_REGNUM))
- *(regp + R_FPCR) = *(int *) ®isters[REGISTER_BYTE (FPCR_REGNUM)];
-}
-
-#endif /* USE_PROC_FS */
-
-/* This support adds the equivalent of adb's % command. When
- the `add-shared-symbol-files' command is given, this routine scans
- the dynamic linker's link map and reads the minimal symbols
- from each shared object file listed in the map. */
-
-struct link_map
-{
- unsigned long l_addr; /* address at which object is mapped */
- char *l_name; /* full name of loaded object */
- void *l_ld; /* dynamic structure of object */
- struct link_map *l_next; /* next link object */
- struct link_map *l_prev; /* previous link object */
-};
-
-#define LINKS_MAP_POINTER "_ld_tail"
-#define LIBC_FILE "/usr/lib/libc.so.1"
-#define SHARED_OFFSET 0xf0001000
-
-#ifndef PATH_MAX
-#define PATH_MAX 1023 /* maximum size of path name on OS */
-#endif
-
-void
-add_shared_symbol_files (void)
-{
- void *desc;
- struct link_map *ld_map, *lm, lms;
- struct minimal_symbol *minsym;
- struct objfile *objfile;
- char *path_name;
-
- if (ptid_equal (inferior_ptid, null_ptid))
- {
- warning ("The program has not yet been started.");
- return;
- }
-
- objfile = symbol_file_add (LIBC_FILE, 0, NULL, 0, OBJF_READNOW);
- minsym = lookup_minimal_symbol (LINKS_MAP_POINTER, objfile);
-
- ld_map = (struct link_map *)
- read_memory_integer (((int) SYMBOL_VALUE_ADDRESS (minsym) + SHARED_OFFSET), 4);
- lm = ld_map;
- while (lm)
- {
- int local_errno = 0;
-
- read_memory ((CORE_ADDR) lm, (char *) &lms, sizeof (struct link_map));
- if (lms.l_name)
- {
- if (target_read_string ((CORE_ADDR) lms.l_name, &path_name,
- PATH_MAX, &local_errno))
- {
- struct section_addr_info section_addrs;
- memset (§ion_addrs, 0, sizeof (section_addrs));
- section_addrs.other[0].addr = lms.l_addr;
- section_addrs.other[0].name = ".text";
- symbol_file_add (path_name, 1, §ion_addrs, 0, 0);
- xfree (path_name);
- }
- }
- /* traverse links in reverse order so that we get the
- the symbols the user actually gets. */
- lm = lms.l_prev;
- }
-
- /* Getting new symbols may change our opinion about what is
- frameless. */
- reinit_frame_cache ();
-}
-
-#if defined(_ES_MP)
-
-#include <sys/regset.h>
-
-unsigned int
-m88k_harris_core_register_addr (int regno, int reg_ptr)
-{
- unsigned int word_offset;
-
- switch (regno)
- {
- case PSR_REGNUM:
- word_offset = R_EPSR;
- break;
- case FPSR_REGNUM:
- word_offset = R_FPSR;
- break;
- case FPCR_REGNUM:
- word_offset = R_FPCR;
- break;
- case SXIP_REGNUM:
- word_offset = R_EXIP;
- break;
- case SNIP_REGNUM:
- word_offset = R_ENIP;
- break;
- case SFIP_REGNUM:
- word_offset = R_EFIP;
- break;
- default:
- if (regno <= FP_REGNUM)
- word_offset = regno;
- else
- word_offset = ((regno - X0_REGNUM) * 4);
- }
- return (word_offset * 4);
-}
-
-#endif /* _ES_MP */
-
-void
-_initialize_m88k_nat (void)
-{
-#ifdef _ES_MP
- /* Enable 88110 support, as we don't support the 88100 under ES/MP. */
-
- target_is_m88110 = 1;
-#elif defined(_CX_UX)
- /* Determine whether we're running on an 88100 or an 88110. */
- target_is_m88110 = (sinfo (SYSMACHINE, 0) == SYS5800);
-#endif /* _CX_UX */
-}
-
-#ifdef _ES_MP
-/* Given a pointer to a general register set in /proc format (gregset_t *),
- unpack the register contents and supply them as gdb's idea of the current
- register values. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
- register int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi < R_R31; regi++)
- {
- supply_register (regi, (char *) (regp + regi));
- }
- supply_register (PSR_REGNUM, (char *) (regp + R_EPSR));
- supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
- supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
- supply_register (SXIP_REGNUM, (char *) (regp + R_EXIP));
- supply_register (SNIP_REGNUM, (char *) (regp + R_ENIP));
- supply_register (SFIP_REGNUM, (char *) (regp + R_EFIP));
-}
-
-/* Given a pointer to a floating point register set in /proc format
- (fpregset_t *), unpack the register contents and supply them as gdb's
- idea of the current floating point register values. */
-
-void
-supply_fpregset (fpregset_t *fpregsetp)
-{
- register int regi;
- char *from;
-
- for (regi = FP0_REGNUM; regi <= FPLAST_REGNUM; regi++)
- {
- from = (char *) &((*fpregsetp)[regi - FP0_REGNUM]);
- supply_register (regi, from);
- }
-}
-
-#endif /* _ES_MP */
-
-#ifdef _CX_UX
-
-#include <sys/regset.h>
-
-unsigned int
-m88k_harris_core_register_addr (int regno, int reg_ptr)
-{
- unsigned int word_offset;
-
- switch (regno)
- {
- case PSR_REGNUM:
- word_offset = R_PSR;
- break;
- case FPSR_REGNUM:
- word_offset = R_FPSR;
- break;
- case FPCR_REGNUM:
- word_offset = R_FPCR;
- break;
- case SXIP_REGNUM:
- word_offset = R_XIP;
- break;
- case SNIP_REGNUM:
- word_offset = R_NIP;
- break;
- case SFIP_REGNUM:
- word_offset = R_FIP;
- break;
- default:
- if (regno <= FP_REGNUM)
- word_offset = regno;
- else
- word_offset = ((regno - X0_REGNUM) * 4) + R_X0;
- }
- return (word_offset * 4);
-}
-
-#endif /* _CX_UX */
+// OBSOLETE /* Native support for Motorola 88k running Harris CX/UX.
+// OBSOLETE Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000,
+// OBSOLETE 2001 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #include <sys/param.h>
+// OBSOLETE #include <sys/dir.h>
+// OBSOLETE #include <signal.h>
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include <sys/user.h>
+// OBSOLETE
+// OBSOLETE #include "bfd.h"
+// OBSOLETE #include "symfile.h"
+// OBSOLETE #include "objfiles.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE
+// OBSOLETE #ifndef USER /* added to support BCS ptrace_user */
+// OBSOLETE #define USER ptrace_user
+// OBSOLETE #endif
+// OBSOLETE #include <sys/ioctl.h>
+// OBSOLETE #include <fcntl.h>
+// OBSOLETE #include <sys/file.h>
+// OBSOLETE #include "gdb_stat.h"
+// OBSOLETE
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "setjmp.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE
+// OBSOLETE #include <sys/ptrace.h>
+// OBSOLETE
+// OBSOLETE /* CX/UX provides them already, but as word offsets instead of char offsets */
+// OBSOLETE #define SXIP_OFFSET (PT_SXIP * 4)
+// OBSOLETE #define SNIP_OFFSET (PT_SNIP * 4)
+// OBSOLETE #define SFIP_OFFSET (PT_SFIP * 4)
+// OBSOLETE #define PSR_OFFSET (PT_PSR * sizeof(int))
+// OBSOLETE #define FPSR_OFFSET (PT_FPSR * sizeof(int))
+// OBSOLETE #define FPCR_OFFSET (PT_FPCR * sizeof(int))
+// OBSOLETE
+// OBSOLETE #define XREGADDR(r) (((char *)&u.pt_x0-(char *)&u) + \
+// OBSOLETE ((r)-X0_REGNUM)*sizeof(X_REGISTER_RAW_TYPE))
+// OBSOLETE
+// OBSOLETE extern int have_symbol_file_p ();
+// OBSOLETE
+// OBSOLETE extern jmp_buf stack_jmp;
+// OBSOLETE
+// OBSOLETE extern int errno;
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE fetch_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE register unsigned int regaddr;
+// OBSOLETE char buf[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE register int i;
+// OBSOLETE
+// OBSOLETE struct USER u;
+// OBSOLETE unsigned int offset;
+// OBSOLETE
+// OBSOLETE offset = (char *) &u.pt_r0 - (char *) &u;
+// OBSOLETE regaddr = offset; /* byte offset to r0; */
+// OBSOLETE
+// OBSOLETE /* offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
+// OBSOLETE for (regno = 0; regno < PC_REGNUM; regno++)
+// OBSOLETE {
+// OBSOLETE /*regaddr = register_addr (regno, offset); */
+// OBSOLETE /* 88k enhancement */
+// OBSOLETE
+// OBSOLETE for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
+// OBSOLETE {
+// OBSOLETE *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, 0);
+// OBSOLETE regaddr += sizeof (int);
+// OBSOLETE }
+// OBSOLETE supply_register (regno, buf);
+// OBSOLETE }
+// OBSOLETE /* now load up registers 32-37; special pc registers */
+// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) PSR_OFFSET, 0);
+// OBSOLETE supply_register (PSR_REGNUM, buf);
+// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) FPSR_OFFSET, 0);
+// OBSOLETE supply_register (FPSR_REGNUM, buf);
+// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) FPCR_OFFSET, 0);
+// OBSOLETE supply_register (FPCR_REGNUM, buf);
+// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
+// OBSOLETE supply_register (SXIP_REGNUM, buf);
+// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
+// OBSOLETE supply_register (SNIP_REGNUM, buf);
+// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
+// OBSOLETE supply_register (SFIP_REGNUM, buf);
+// OBSOLETE
+// OBSOLETE if (target_is_m88110)
+// OBSOLETE {
+// OBSOLETE for (regaddr = XREGADDR (X0_REGNUM), regno = X0_REGNUM;
+// OBSOLETE regno < NUM_REGS;
+// OBSOLETE regno++, regaddr += 16)
+// OBSOLETE {
+// OBSOLETE X_REGISTER_RAW_TYPE xval;
+// OBSOLETE
+// OBSOLETE *(int *) &xval.w1 = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, 0);
+// OBSOLETE *(int *) &xval.w2 = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) (regaddr + 4), 0);
+// OBSOLETE *(int *) &xval.w3 = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) (regaddr + 8), 0);
+// OBSOLETE *(int *) &xval.w4 = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) (regaddr + 12), 0);
+// OBSOLETE supply_register (regno, (void *) &xval);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Store our register values back into the inferior.
+// OBSOLETE If REGNO is -1, do this for all registers.
+// OBSOLETE Otherwise, REGNO specifies which register (so we can save time). */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE store_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE register unsigned int regaddr;
+// OBSOLETE char buf[80];
+// OBSOLETE
+// OBSOLETE struct USER u;
+// OBSOLETE
+// OBSOLETE unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
+// OBSOLETE
+// OBSOLETE regaddr = offset;
+// OBSOLETE
+// OBSOLETE /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
+// OBSOLETE svr3 doesn't run on an 88110, or the kernel isolates the different (not
+// OBSOLETE completely sure this is true, but seems to be. */
+// OBSOLETE if (regno >= 0)
+// OBSOLETE {
+// OBSOLETE /* regaddr = register_addr (regno, offset); */
+// OBSOLETE if (regno < PC_REGNUM)
+// OBSOLETE {
+// OBSOLETE regaddr = offset + regno * sizeof (int);
+// OBSOLETE errno = 0;
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
+// OBSOLETE if (errno != 0)
+// OBSOLETE {
+// OBSOLETE sprintf (buf, "writing register number %d", regno);
+// OBSOLETE perror_with_name (buf);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else if (regno == PSR_REGNUM)
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
+// OBSOLETE else if (regno == FPSR_REGNUM)
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
+// OBSOLETE else if (regno == FPCR_REGNUM)
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
+// OBSOLETE else if (regno == SXIP_REGNUM)
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
+// OBSOLETE else if (regno == SNIP_REGNUM)
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
+// OBSOLETE else if (regno == SFIP_REGNUM)
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
+// OBSOLETE else if (target_is_m88110 && regno < NUM_REGS)
+// OBSOLETE {
+// OBSOLETE X_REGISTER_RAW_TYPE xval;
+// OBSOLETE
+// OBSOLETE read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
+// OBSOLETE sizeof (X_REGISTER_RAW_TYPE));
+// OBSOLETE regaddr = XREGADDR (regno);
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 4, xval.w2);
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 8, xval.w3);
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr + 12, xval.w4);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE printf_unfiltered ("Bad register number for store_inferior routine\n");
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE for (regno = 0; regno < PC_REGNUM; regno++)
+// OBSOLETE {
+// OBSOLETE /* regaddr = register_addr (regno, offset); */
+// OBSOLETE errno = 0;
+// OBSOLETE regaddr = offset + regno * sizeof (int);
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
+// OBSOLETE if (errno != 0)
+// OBSOLETE {
+// OBSOLETE sprintf (buf, "writing register number %d", regno);
+// OBSOLETE perror_with_name (buf);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) PSR_OFFSET, read_register (regno));
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) FPSR_OFFSET, read_register (regno));
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) FPCR_OFFSET, read_register (regno));
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
+// OBSOLETE if (target_is_m88110)
+// OBSOLETE {
+// OBSOLETE for (regno = X0_REGNUM; regno < NUM_REGS; regno++)
+// OBSOLETE {
+// OBSOLETE X_REGISTER_RAW_TYPE xval;
+// OBSOLETE
+// OBSOLETE read_register_bytes (REGISTER_BYTE (regno), (char *) &xval,
+// OBSOLETE sizeof (X_REGISTER_RAW_TYPE));
+// OBSOLETE regaddr = XREGADDR (regno);
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) regaddr, xval.w1);
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 4), xval.w2);
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 8), xval.w3);
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) (regaddr + 12), xval.w4);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* blockend is the address of the end of the user structure */
+// OBSOLETE
+// OBSOLETE m88k_register_u_addr (int blockend, int regnum)
+// OBSOLETE {
+// OBSOLETE struct USER u;
+// OBSOLETE int ustart = blockend - sizeof (struct USER);
+// OBSOLETE
+// OBSOLETE if (regnum < PSR_REGNUM)
+// OBSOLETE return (ustart + ((int) &u.pt_r0 - (int) &u) +
+// OBSOLETE REGISTER_SIZE * regnum);
+// OBSOLETE else if (regnum == PSR_REGNUM)
+// OBSOLETE return (ustart + ((int) &u.pt_psr) - (int) &u);
+// OBSOLETE else if (regnum == FPSR_REGNUM)
+// OBSOLETE return (ustart + ((int) &u.pt_fpsr) - (int) &u);
+// OBSOLETE else if (regnum == FPCR_REGNUM)
+// OBSOLETE return (ustart + ((int) &u.pt_fpcr) - (int) &u);
+// OBSOLETE else if (regnum == SXIP_REGNUM)
+// OBSOLETE return (ustart + SXIP_OFFSET);
+// OBSOLETE else if (regnum == SNIP_REGNUM)
+// OBSOLETE return (ustart + SNIP_OFFSET);
+// OBSOLETE else if (regnum == SFIP_REGNUM)
+// OBSOLETE return (ustart + SFIP_OFFSET);
+// OBSOLETE else if (target_is_m88110)
+// OBSOLETE return (ustart + ((int) &u.pt_x0 - (int) &u) + /* Must be X register */
+// OBSOLETE sizeof (u.pt_x0) * (regnum - X0_REGNUM));
+// OBSOLETE else
+// OBSOLETE return (blockend + REGISTER_SIZE * regnum);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #ifdef USE_PROC_FS
+// OBSOLETE
+// OBSOLETE #include <sys/procfs.h>
+// OBSOLETE
+// OBSOLETE /* Prototypes for supply_gregset etc. */
+// OBSOLETE #include "gregset.h"
+// OBSOLETE
+// OBSOLETE /* Given a pointer to a general register set in /proc format (gregset_t *),
+// OBSOLETE unpack the register contents and supply them as gdb's idea of the current
+// OBSOLETE register values. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE supply_gregset (gregset_t *gregsetp)
+// OBSOLETE {
+// OBSOLETE register int regi;
+// OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
+// OBSOLETE
+// OBSOLETE for (regi = 0; regi <= SP_REGNUM; regi++)
+// OBSOLETE supply_register (regi, (char *) (regp + regi));
+// OBSOLETE
+// OBSOLETE supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
+// OBSOLETE supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
+// OBSOLETE supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
+// OBSOLETE supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
+// OBSOLETE supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
+// OBSOLETE supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE fill_gregset (gregset_t *gregsetp, int regno)
+// OBSOLETE {
+// OBSOLETE int regi;
+// OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
+// OBSOLETE
+// OBSOLETE for (regi = 0; regi <= R_R31; regi++)
+// OBSOLETE if ((regno == -1) || (regno == regi))
+// OBSOLETE *(regp + regi) = *(int *) ®isters[REGISTER_BYTE (regi)];
+// OBSOLETE
+// OBSOLETE if ((regno == -1) || (regno == SXIP_REGNUM))
+// OBSOLETE *(regp + R_XIP) = *(int *) ®isters[REGISTER_BYTE (SXIP_REGNUM)];
+// OBSOLETE if ((regno == -1) || (regno == SNIP_REGNUM))
+// OBSOLETE *(regp + R_NIP) = *(int *) ®isters[REGISTER_BYTE (SNIP_REGNUM)];
+// OBSOLETE if ((regno == -1) || (regno == SFIP_REGNUM))
+// OBSOLETE *(regp + R_FIP) = *(int *) ®isters[REGISTER_BYTE (SFIP_REGNUM)];
+// OBSOLETE if ((regno == -1) || (regno == PSR_REGNUM))
+// OBSOLETE *(regp + R_PSR) = *(int *) ®isters[REGISTER_BYTE (PSR_REGNUM)];
+// OBSOLETE if ((regno == -1) || (regno == FPSR_REGNUM))
+// OBSOLETE *(regp + R_FPSR) = *(int *) ®isters[REGISTER_BYTE (FPSR_REGNUM)];
+// OBSOLETE if ((regno == -1) || (regno == FPCR_REGNUM))
+// OBSOLETE *(regp + R_FPCR) = *(int *) ®isters[REGISTER_BYTE (FPCR_REGNUM)];
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #endif /* USE_PROC_FS */
+// OBSOLETE
+// OBSOLETE /* This support adds the equivalent of adb's % command. When
+// OBSOLETE the `add-shared-symbol-files' command is given, this routine scans
+// OBSOLETE the dynamic linker's link map and reads the minimal symbols
+// OBSOLETE from each shared object file listed in the map. */
+// OBSOLETE
+// OBSOLETE struct link_map
+// OBSOLETE {
+// OBSOLETE unsigned long l_addr; /* address at which object is mapped */
+// OBSOLETE char *l_name; /* full name of loaded object */
+// OBSOLETE void *l_ld; /* dynamic structure of object */
+// OBSOLETE struct link_map *l_next; /* next link object */
+// OBSOLETE struct link_map *l_prev; /* previous link object */
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE #define LINKS_MAP_POINTER "_ld_tail"
+// OBSOLETE #define LIBC_FILE "/usr/lib/libc.so.1"
+// OBSOLETE #define SHARED_OFFSET 0xf0001000
+// OBSOLETE
+// OBSOLETE #ifndef PATH_MAX
+// OBSOLETE #define PATH_MAX 1023 /* maximum size of path name on OS */
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE add_shared_symbol_files (void)
+// OBSOLETE {
+// OBSOLETE void *desc;
+// OBSOLETE struct link_map *ld_map, *lm, lms;
+// OBSOLETE struct minimal_symbol *minsym;
+// OBSOLETE struct objfile *objfile;
+// OBSOLETE char *path_name;
+// OBSOLETE
+// OBSOLETE if (ptid_equal (inferior_ptid, null_ptid))
+// OBSOLETE {
+// OBSOLETE warning ("The program has not yet been started.");
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE objfile = symbol_file_add (LIBC_FILE, 0, NULL, 0, OBJF_READNOW);
+// OBSOLETE minsym = lookup_minimal_symbol (LINKS_MAP_POINTER, objfile);
+// OBSOLETE
+// OBSOLETE ld_map = (struct link_map *)
+// OBSOLETE read_memory_integer (((int) SYMBOL_VALUE_ADDRESS (minsym) + SHARED_OFFSET), 4);
+// OBSOLETE lm = ld_map;
+// OBSOLETE while (lm)
+// OBSOLETE {
+// OBSOLETE int local_errno = 0;
+// OBSOLETE
+// OBSOLETE read_memory ((CORE_ADDR) lm, (char *) &lms, sizeof (struct link_map));
+// OBSOLETE if (lms.l_name)
+// OBSOLETE {
+// OBSOLETE if (target_read_string ((CORE_ADDR) lms.l_name, &path_name,
+// OBSOLETE PATH_MAX, &local_errno))
+// OBSOLETE {
+// OBSOLETE struct section_addr_info section_addrs;
+// OBSOLETE memset (§ion_addrs, 0, sizeof (section_addrs));
+// OBSOLETE section_addrs.other[0].addr = lms.l_addr;
+// OBSOLETE section_addrs.other[0].name = ".text";
+// OBSOLETE symbol_file_add (path_name, 1, §ion_addrs, 0, 0);
+// OBSOLETE xfree (path_name);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE /* traverse links in reverse order so that we get the
+// OBSOLETE the symbols the user actually gets. */
+// OBSOLETE lm = lms.l_prev;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Getting new symbols may change our opinion about what is
+// OBSOLETE frameless. */
+// OBSOLETE reinit_frame_cache ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #if defined(_ES_MP)
+// OBSOLETE
+// OBSOLETE #include <sys/regset.h>
+// OBSOLETE
+// OBSOLETE unsigned int
+// OBSOLETE m88k_harris_core_register_addr (int regno, int reg_ptr)
+// OBSOLETE {
+// OBSOLETE unsigned int word_offset;
+// OBSOLETE
+// OBSOLETE switch (regno)
+// OBSOLETE {
+// OBSOLETE case PSR_REGNUM:
+// OBSOLETE word_offset = R_EPSR;
+// OBSOLETE break;
+// OBSOLETE case FPSR_REGNUM:
+// OBSOLETE word_offset = R_FPSR;
+// OBSOLETE break;
+// OBSOLETE case FPCR_REGNUM:
+// OBSOLETE word_offset = R_FPCR;
+// OBSOLETE break;
+// OBSOLETE case SXIP_REGNUM:
+// OBSOLETE word_offset = R_EXIP;
+// OBSOLETE break;
+// OBSOLETE case SNIP_REGNUM:
+// OBSOLETE word_offset = R_ENIP;
+// OBSOLETE break;
+// OBSOLETE case SFIP_REGNUM:
+// OBSOLETE word_offset = R_EFIP;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE if (regno <= FP_REGNUM)
+// OBSOLETE word_offset = regno;
+// OBSOLETE else
+// OBSOLETE word_offset = ((regno - X0_REGNUM) * 4);
+// OBSOLETE }
+// OBSOLETE return (word_offset * 4);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #endif /* _ES_MP */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE _initialize_m88k_nat (void)
+// OBSOLETE {
+// OBSOLETE #ifdef _ES_MP
+// OBSOLETE /* Enable 88110 support, as we don't support the 88100 under ES/MP. */
+// OBSOLETE
+// OBSOLETE target_is_m88110 = 1;
+// OBSOLETE #elif defined(_CX_UX)
+// OBSOLETE /* Determine whether we're running on an 88100 or an 88110. */
+// OBSOLETE target_is_m88110 = (sinfo (SYSMACHINE, 0) == SYS5800);
+// OBSOLETE #endif /* _CX_UX */
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #ifdef _ES_MP
+// OBSOLETE /* Given a pointer to a general register set in /proc format (gregset_t *),
+// OBSOLETE unpack the register contents and supply them as gdb's idea of the current
+// OBSOLETE register values. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE supply_gregset (gregset_t *gregsetp)
+// OBSOLETE {
+// OBSOLETE register int regi;
+// OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
+// OBSOLETE
+// OBSOLETE for (regi = 0; regi < R_R31; regi++)
+// OBSOLETE {
+// OBSOLETE supply_register (regi, (char *) (regp + regi));
+// OBSOLETE }
+// OBSOLETE supply_register (PSR_REGNUM, (char *) (regp + R_EPSR));
+// OBSOLETE supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
+// OBSOLETE supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
+// OBSOLETE supply_register (SXIP_REGNUM, (char *) (regp + R_EXIP));
+// OBSOLETE supply_register (SNIP_REGNUM, (char *) (regp + R_ENIP));
+// OBSOLETE supply_register (SFIP_REGNUM, (char *) (regp + R_EFIP));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Given a pointer to a floating point register set in /proc format
+// OBSOLETE (fpregset_t *), unpack the register contents and supply them as gdb's
+// OBSOLETE idea of the current floating point register values. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE supply_fpregset (fpregset_t *fpregsetp)
+// OBSOLETE {
+// OBSOLETE register int regi;
+// OBSOLETE char *from;
+// OBSOLETE
+// OBSOLETE for (regi = FP0_REGNUM; regi <= FPLAST_REGNUM; regi++)
+// OBSOLETE {
+// OBSOLETE from = (char *) &((*fpregsetp)[regi - FP0_REGNUM]);
+// OBSOLETE supply_register (regi, from);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #endif /* _ES_MP */
+// OBSOLETE
+// OBSOLETE #ifdef _CX_UX
+// OBSOLETE
+// OBSOLETE #include <sys/regset.h>
+// OBSOLETE
+// OBSOLETE unsigned int
+// OBSOLETE m88k_harris_core_register_addr (int regno, int reg_ptr)
+// OBSOLETE {
+// OBSOLETE unsigned int word_offset;
+// OBSOLETE
+// OBSOLETE switch (regno)
+// OBSOLETE {
+// OBSOLETE case PSR_REGNUM:
+// OBSOLETE word_offset = R_PSR;
+// OBSOLETE break;
+// OBSOLETE case FPSR_REGNUM:
+// OBSOLETE word_offset = R_FPSR;
+// OBSOLETE break;
+// OBSOLETE case FPCR_REGNUM:
+// OBSOLETE word_offset = R_FPCR;
+// OBSOLETE break;
+// OBSOLETE case SXIP_REGNUM:
+// OBSOLETE word_offset = R_XIP;
+// OBSOLETE break;
+// OBSOLETE case SNIP_REGNUM:
+// OBSOLETE word_offset = R_NIP;
+// OBSOLETE break;
+// OBSOLETE case SFIP_REGNUM:
+// OBSOLETE word_offset = R_FIP;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE if (regno <= FP_REGNUM)
+// OBSOLETE word_offset = regno;
+// OBSOLETE else
+// OBSOLETE word_offset = ((regno - X0_REGNUM) * 4) + R_X0;
+// OBSOLETE }
+// OBSOLETE return (word_offset * 4);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #endif /* _CX_UX */
#include "defs.h"
#include "frame.h"
-#include "obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (d10v_call_dummy_words));
set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_deprecated_extract_return_value (gdbarch, d10v_extract_return_value);
#include <fcntl.h>
#endif
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "gdb_stat.h"
#include "symtab.h"
#include "breakpoint.h"
language_c, /* C */
language_cplus, /* C++ */
language_java, /* Java */
- language_chill, /* Chill */
+ /* OBSOLETE language_chill, */ /* Chill */
language_fortran, /* Fortran */
language_m2, /* Modula-2 */
language_asm, /* Assembly language */
extern int inside_main_func (CORE_ADDR pc);
-/* From ch-lang.c, for the moment. (FIXME) */
+/* OBSOLETE From ch-lang.c, for the moment. (FIXME) */
-extern char *chill_demangle (const char *);
+/* OBSOLETE extern char *chill_demangle (const char *); */
/* From utils.c */
extern char *gdb_readline (char *);
+extern char *gdb_readline_wrapper (char *);
+
extern char *command_line_input (char *, int, char *);
extern void print_prompt (void);
/* In findvar.c. */
-extern LONGEST extract_signed_integer (void *, int);
+extern LONGEST extract_signed_integer (const void *, int);
-extern ULONGEST extract_unsigned_integer (void *, int);
+extern ULONGEST extract_unsigned_integer (const void *, int);
extern int extract_long_unsigned_integer (void *, int, LONGEST *);
+2002-08-08 Grace Sainsbury <graces@redhat.com>
+
+ From Mark Salter:
+ * gdb.texinfo (Protocol): Document T packet extension to
+ allow watchpoint address reporting.
+
+
+2002-08-03 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb.texinfo (Dump/Restore Files): Move `[]' to outside of @var.
+
+2002-08-01 Andrew Cagney <cagney@redhat.com>
+
+ * stabs.texinfo, gdb.texinfo, gdbint.texinfo: Obsolete references
+ to CHILL.
+
+2002-08-01 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbint.texinfo (Coding): Revise section "Include Files".
+
+2002-07-24 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo: Obsolete references to m88k.
+ * gdb.texinfo: Ditto.
+
2002-07-10 Joel Brobecker <brobecker@gnat.com>
- * gdb.texinfo (Create a release candiate): Add the location
+ * gdbint.texinfo (Create a release candiate): Add the location
where the proper version of autoconf can be retrieved.
2002-07-09 Don Howard <dhoward@redhat.com>
For more information, see @ref{Support,,Supported languages}.
For more information, see @ref{C,,C and C++}.
-@cindex Chill
+@c OBSOLETE @cindex Chill
@cindex Modula-2
-Support for Modula-2 and Chill is partial. For information on Modula-2,
-see @ref{Modula-2,,Modula-2}. For information on Chill, see @ref{Chill}.
+Support for Modula-2
+@c OBSOLETE and Chill
+is partial. For information on Modula-2, see @ref{Modula-2,,Modula-2}.
+@c OBSOLETE For information on Chill, see @ref{Chill}.
@cindex Pascal
Debugging Pascal programs which use sets, subranges, file variables, or
@item dump tekhex value @var{filename} @var{expression}
Dump value of @var{expression} into tekhex format file @var{filename}.
-@item restore @var{filename} @var{[binary]} @var{bias} @var{start} @var{end}
+@item restore @var{filename} [@var{binary}] @var{bias} @var{start} @var{end}
Restore the contents of file @var{filename} into memory. The @code{restore}
command can automatically recognize any known bfd file format, except for
raw binary. To restore a raw binary file you must use the optional argument
@itemx .F
Fortran source file
-@item .ch
-@itemx .c186
-@itemx .c286
-CHILL source file
+@c OBSOLETE @item .ch
+@c OBSOLETE @itemx .c186
+@c OBSOLETE @itemx .c286
+@c OBSOLETE CHILL source file
@item .mod
Modula-2 source file
@node Support
@section Supported languages
-@value{GDBN} supports C, C@t{++}, Fortran, Java, Chill, assembly, and Modula-2.
+@value{GDBN} supports C, C@t{++}, Fortran, Java,
+@c OBSOLETE Chill,
+assembly, and Modula-2.
@c This is false ...
Some @value{GDBN} features may be used in expressions regardless of the
language you use: the @value{GDBN} @code{@@} and @code{::} operators,
@menu
* C:: C and C@t{++}
* Modula-2:: Modula-2
-* Chill:: Chill
+@c OBSOLETE * Chill:: Chill
@end menu
@node C
In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is
interpreted as the beginning of a comment. Use @code{<>} instead.
-@node Chill
-@subsection Chill
-
-The extensions made to @value{GDBN} to support Chill only support output
-from the @sc{gnu} Chill compiler. Other Chill compilers are not currently
-supported, and attempting to debug executables produced by them is most
-likely to give an error as @value{GDBN} reads in the executable's symbol
-table.
-
-@c This used to say "... following Chill related topics ...", but since
-@c menus are not shown in the printed manual, it would look awkward.
-This section covers the Chill related topics and the features
-of @value{GDBN} which support these topics.
-
-@menu
-* How modes are displayed:: How modes are displayed
-* Locations:: Locations and their accesses
-* Values and their Operations:: Values and their Operations
-* Chill type and range checks::
-* Chill defaults::
-@end menu
-
-@node How modes are displayed
-@subsubsection How modes are displayed
-
-The Chill Datatype- (Mode) support of @value{GDBN} is directly related
-with the functionality of the @sc{gnu} Chill compiler, and therefore deviates
-slightly from the standard specification of the Chill language. The
-provided modes are:
-
-@c FIXME: this @table's contents effectively disable @code by using @r
-@c on every @item. So why does it need @code?
-@table @code
-@item @r{@emph{Discrete modes:}}
-@itemize @bullet
-@item
-@emph{Integer Modes} which are predefined by @code{BYTE, UBYTE, INT,
-UINT, LONG, ULONG},
-@item
-@emph{Boolean Mode} which is predefined by @code{BOOL},
-@item
-@emph{Character Mode} which is predefined by @code{CHAR},
-@item
-@emph{Set Mode} which is displayed by the keyword @code{SET}.
-@smallexample
-(@value{GDBP}) ptype x
-type = SET (karli = 10, susi = 20, fritzi = 100)
-@end smallexample
-If the type is an unnumbered set the set element values are omitted.
-@item
-@emph{Range Mode} which is displayed by
-@smallexample
-@code{type = <basemode>(<lower bound> : <upper bound>)}
-@end smallexample
-where @code{<lower bound>, <upper bound>} can be of any discrete literal
-expression (e.g. set element names).
-@end itemize
-
-@item @r{@emph{Powerset Mode:}}
-A Powerset Mode is displayed by the keyword @code{POWERSET} followed by
-the member mode of the powerset. The member mode can be any discrete mode.
-@smallexample
-(@value{GDBP}) ptype x
-type = POWERSET SET (egon, hugo, otto)
-@end smallexample
-
-@item @r{@emph{Reference Modes:}}
-@itemize @bullet
-@item
-@emph{Bound Reference Mode} which is displayed by the keyword @code{REF}
-followed by the mode name to which the reference is bound.
-@item
-@emph{Free Reference Mode} which is displayed by the keyword @code{PTR}.
-@end itemize
-
-@item @r{@emph{Procedure mode}}
-The procedure mode is displayed by @code{type = PROC(<parameter list>)
-<return mode> EXCEPTIONS (<exception list>)}. The @code{<parameter
-list>} is a list of the parameter modes. @code{<return mode>} indicates
-the mode of the result of the procedure if any. The exceptionlist lists
-all possible exceptions which can be raised by the procedure.
-
-@ignore
-@item @r{@emph{Instance mode}}
-The instance mode is represented by a structure, which has a static
-type, and is therefore not really of interest.
-@end ignore
-
-@item @r{@emph{Synchronization Modes:}}
-@itemize @bullet
-@item
-@emph{Event Mode} which is displayed by
-@smallexample
-@code{EVENT (<event length>)}
-@end smallexample
-where @code{(<event length>)} is optional.
-@item
-@emph{Buffer Mode} which is displayed by
-@smallexample
-@code{BUFFER (<buffer length>)<buffer element mode>}
-@end smallexample
-where @code{(<buffer length>)} is optional.
-@end itemize
-
-@item @r{@emph{Timing Modes:}}
-@itemize @bullet
-@item
-@emph{Duration Mode} which is predefined by @code{DURATION}
-@item
-@emph{Absolute Time Mode} which is predefined by @code{TIME}
-@end itemize
-
-@item @r{@emph{Real Modes:}}
-Real Modes are predefined with @code{REAL} and @code{LONG_REAL}.
-
-@item @r{@emph{String Modes:}}
-@itemize @bullet
-@item
-@emph{Character String Mode} which is displayed by
-@smallexample
-@code{CHARS(<string length>)}
-@end smallexample
-followed by the keyword @code{VARYING} if the String Mode is a varying
-mode
-@item
-@emph{Bit String Mode} which is displayed by
-@smallexample
-@code{BOOLS(<string
-length>)}
-@end smallexample
-@end itemize
-
-@item @r{@emph{Array Mode:}}
-The Array Mode is displayed by the keyword @code{ARRAY(<range>)}
-followed by the element mode (which may in turn be an array mode).
-@smallexample
-(@value{GDBP}) ptype x
-type = ARRAY (1:42)
- ARRAY (1:20)
- SET (karli = 10, susi = 20, fritzi = 100)
-@end smallexample
-
-@item @r{@emph{Structure Mode}}
-The Structure mode is displayed by the keyword @code{STRUCT(<field
-list>)}. The @code{<field list>} consists of names and modes of fields
-of the structure. Variant structures have the keyword @code{CASE <field>
-OF <variant fields> ESAC} in their field list. Since the current version
-of the GNU Chill compiler doesn't implement tag processing (no runtime
-checks of variant fields, and therefore no debugging info), the output
-always displays all variant fields.
-@smallexample
-(@value{GDBP}) ptype str
-type = STRUCT (
- as x,
- bs x,
- CASE bs OF
- (karli):
- cs a
- (ott):
- ds x
- ESAC
-)
-@end smallexample
-@end table
-
-@node Locations
-@subsubsection Locations and their accesses
-
-A location in Chill is an object which can contain values.
-
-A value of a location is generally accessed by the (declared) name of
-the location. The output conforms to the specification of values in
-Chill programs. How values are specified
-is the topic of the next section, @ref{Values and their Operations}.
-
-The pseudo-location @code{RESULT} (or @code{result}) can be used to
-display or change the result of a currently-active procedure:
-
-@smallexample
-set result := EXPR
-@end smallexample
-
-@noindent
-This does the same as the Chill action @code{RESULT EXPR} (which
-is not available in @value{GDBN}).
-
-Values of reference mode locations are printed by @code{PTR(<hex
-value>)} in case of a free reference mode, and by @code{(REF <reference
-mode>) (<hex-value>)} in case of a bound reference. @code{<hex value>}
-represents the address where the reference points to. To access the
-value of the location referenced by the pointer, use the dereference
-operator @samp{->}.
-
-Values of procedure mode locations are displayed by
-@smallexample
-@code{@{ PROC
-(<argument modes> ) <return mode> @} <address> <name of procedure
-location>}
-@end smallexample
-@code{<argument modes>} is a list of modes according to the parameter
-specification of the procedure and @code{<address>} shows the address of
-the entry point.
-
-@ignore
-Locations of instance modes are displayed just like a structure with two
-fields specifying the @emph{process type} and the @emph{copy number} of
-the investigated instance location@footnote{This comes from the current
-implementation of instances. They are implemented as a structure (no
-na). The output should be something like @code{[<name of the process>;
-<instance number>]}.}. The field names are @code{__proc_type} and
-@code{__proc_copy}.
-
-Locations of synchronization modes are displayed like a structure with
-the field name @code{__event_data} in case of a event mode location, and
-like a structure with the field @code{__buffer_data} in case of a buffer
-mode location (refer to previous paragraph).
-
-Structure Mode locations are printed by @code{[.<field name>: <value>,
-...]}. The @code{<field name>} corresponds to the structure mode
-definition and the layout of @code{<value>} varies depending of the mode
-of the field. If the investigated structure mode location is of variant
-structure mode, the variant parts of the structure are enclosed in curled
-braces (@samp{@{@}}). Fields enclosed by @samp{@{,@}} are residing
-on the same memory location and represent the current values of the
-memory location in their specific modes. Since no tag processing is done
-all variants are displayed. A variant field is printed by
-@code{(<variant name>) = .<field name>: <value>}. (who implements the
-stuff ???)
-@smallexample
-(@value{GDBP}) print str1 $4 = [.as: 0, .bs: karli, .<TAG>: { (karli) =
-[.cs: []], (susi) = [.ds: susi]}]
-@end smallexample
-@end ignore
-
-Substructures of string mode-, array mode- or structure mode-values
-(e.g. array slices, fields of structure locations) are accessed using
-certain operations which are described in the next section, @ref{Values
-and their Operations}.
-
-A location value may be interpreted as having a different mode using the
-location conversion. This mode conversion is written as @code{<mode
-name>(<location>)}. The user has to consider that the sizes of the modes
-have to be equal otherwise an error occurs. Furthermore, no range
-checking of the location against the destination mode is performed, and
-therefore the result can be quite confusing.
-
-@smallexample
-(@value{GDBP}) print int (s(3 up 4)) XXX TO be filled in !! XXX
-@end smallexample
-
-@node Values and their Operations
-@subsubsection Values and their Operations
-
-Values are used to alter locations, to investigate complex structures in
-more detail or to filter relevant information out of a large amount of
-data. There are several (mode dependent) operations defined which enable
-such investigations. These operations are not only applicable to
-constant values but also to locations, which can become quite useful
-when debugging complex structures. During parsing the command line
-(e.g. evaluating an expression) @value{GDBN} treats location names as
-the values behind these locations.
-
-This section describes how values have to be specified and which
-operations are legal to be used with such values.
-
-@table @code
-@item Literal Values
-Literal values are specified in the same manner as in @sc{gnu} Chill programs.
-For detailed specification refer to the @sc{gnu} Chill implementation Manual
-chapter 1.5.
-@c FIXME: if the Chill Manual is a Texinfo documents, the above should
-@c be converted to a @ref.
-
-@ignore
-@itemize @bullet
-@item
-@emph{Integer Literals} are specified in the same manner as in Chill
-programs (refer to the Chill Standard z200/88 chpt 5.2.4.2)
-@item
-@emph{Boolean Literals} are defined by @code{TRUE} and @code{FALSE}.
-@item
-@emph{Character Literals} are defined by @code{'<character>'}. (e.g.
-@code{'M'})
-@item
-@emph{Set Literals} are defined by a name which was specified in a set
-mode. The value delivered by a Set Literal is the set value. This is
-comparable to an enumeration in C/C@t{++} language.
-@item
-@emph{Emptiness Literal} is predefined by @code{NULL}. The value of the
-emptiness literal delivers either the empty reference value, the empty
-procedure value or the empty instance value.
-
-@item
-@emph{Character String Literals} are defined by a sequence of characters
-enclosed in single- or double quotes. If a single- or double quote has
-to be part of the string literal it has to be stuffed (specified twice).
-@item
-@emph{Bitstring Literals} are specified in the same manner as in Chill
-programs (refer z200/88 chpt 5.2.4.8).
-@item
-@emph{Floating point literals} are specified in the same manner as in
-(gnu-)Chill programs (refer @sc{gnu} Chill implementation Manual chapter 1.5).
-@end itemize
-@end ignore
-
-@item Tuple Values
-A tuple is specified by @code{<mode name>[<tuple>]}, where @code{<mode
-name>} can be omitted if the mode of the tuple is unambiguous. This
-unambiguity is derived from the context of a evaluated expression.
-@code{<tuple>} can be one of the following:
-
-@itemize @bullet
-@item @emph{Powerset Tuple}
-@item @emph{Array Tuple}
-@item @emph{Structure Tuple}
-Powerset tuples, array tuples and structure tuples are specified in the
-same manner as in Chill programs refer to z200/88 chpt 5.2.5.
-@end itemize
-
-@item String Element Value
-A string element value is specified by
-@smallexample
-@code{<string value>(<index>)}
-@end smallexample
-where @code{<index>} is a integer expression. It delivers a character
-value which is equivalent to the character indexed by @code{<index>} in
-the string.
-
-@item String Slice Value
-A string slice value is specified by @code{<string value>(<slice
-spec>)}, where @code{<slice spec>} can be either a range of integer
-expressions or specified by @code{<start expr> up <size>}.
-@code{<size>} denotes the number of elements which the slice contains.
-The delivered value is a string value, which is part of the specified
-string.
-
-@item Array Element Values
-An array element value is specified by @code{<array value>(<expr>)} and
-delivers a array element value of the mode of the specified array.
-
-@item Array Slice Values
-An array slice is specified by @code{<array value>(<slice spec>)}, where
-@code{<slice spec>} can be either a range specified by expressions or by
-@code{<start expr> up <size>}. @code{<size>} denotes the number of
-arrayelements the slice contains. The delivered value is an array value
-which is part of the specified array.
-
-@item Structure Field Values
-A structure field value is derived by @code{<structure value>.<field
-name>}, where @code{<field name>} indicates the name of a field specified
-in the mode definition of the structure. The mode of the delivered value
-corresponds to this mode definition in the structure definition.
-
-@item Procedure Call Value
-The procedure call value is derived from the return value of the
-procedure@footnote{If a procedure call is used for instance in an
-expression, then this procedure is called with all its side
-effects. This can lead to confusing results if used carelessly.}.
-
-Values of duration mode locations are represented by @code{ULONG} literals.
-
-Values of time mode locations appear as
-@smallexample
-@code{TIME(<secs>:<nsecs>)}
-@end smallexample
-
-
-@ignore
-This is not implemented yet:
-@item Built-in Value
-@noindent
-The following built in functions are provided:
-
-@table @code
-@item @code{ADDR()}
-@item @code{NUM()}
-@item @code{PRED()}
-@item @code{SUCC()}
-@item @code{ABS()}
-@item @code{CARD()}
-@item @code{MAX()}
-@item @code{MIN()}
-@item @code{SIZE()}
-@item @code{UPPER()}
-@item @code{LOWER()}
-@item @code{LENGTH()}
-@item @code{SIN()}
-@item @code{COS()}
-@item @code{TAN()}
-@item @code{ARCSIN()}
-@item @code{ARCCOS()}
-@item @code{ARCTAN()}
-@item @code{EXP()}
-@item @code{LN()}
-@item @code{LOG()}
-@item @code{SQRT()}
-@end table
-
-For a detailed description refer to the GNU Chill implementation manual
-chapter 1.6.
-@end ignore
-
-@item Zero-adic Operator Value
-The zero-adic operator value is derived from the instance value for the
-current active process.
-
-@item Expression Values
-The value delivered by an expression is the result of the evaluation of
-the specified expression. If there are error conditions (mode
-incompatibility, etc.) the evaluation of expressions is aborted with a
-corresponding error message. Expressions may be parenthesised which
-causes the evaluation of this expression before any other expression
-which uses the result of the parenthesised expression. The following
-operators are supported by @value{GDBN}:
-
-@table @code
-@item @code{OR, ORIF, XOR}
-@itemx @code{AND, ANDIF}
-@itemx @code{NOT}
-Logical operators defined over operands of boolean mode.
-
-@item @code{=, /=}
-Equality and inequality operators defined over all modes.
-
-@item @code{>, >=}
-@itemx @code{<, <=}
-Relational operators defined over predefined modes.
-
-@item @code{+, -}
-@itemx @code{*, /, MOD, REM}
-Arithmetic operators defined over predefined modes.
-
-@item @code{-}
-Change sign operator.
-
-@item @code{//}
-String concatenation operator.
-
-@item @code{()}
-String repetition operator.
-
-@item @code{->}
-Referenced location operator which can be used either to take the
-address of a location (@code{->loc}), or to dereference a reference
-location (@code{loc->}).
-
-@item @code{OR, XOR}
-@itemx @code{AND}
-@itemx @code{NOT}
-Powerset and bitstring operators.
-
-@item @code{>, >=}
-@itemx @code{<, <=}
-Powerset inclusion operators.
-
-@item @code{IN}
-Membership operator.
-@end table
-@end table
-
-@node Chill type and range checks
-@subsubsection Chill type and range checks
-
-@value{GDBN} considers two Chill variables mode equivalent if the sizes
-of the two modes are equal. This rule applies recursively to more
-complex datatypes which means that complex modes are treated
-equivalent if all element modes (which also can be complex modes like
-structures, arrays, etc.) have the same size.
-
-Range checking is done on all mathematical operations, assignment, array
-index bounds and all built in procedures.
-
-Strong type checks are forced using the @value{GDBN} command @code{set
-check strong}. This enforces strong type and range checks on all
-operations where Chill constructs are used (expressions, built in
-functions, etc.) in respect to the semantics as defined in the z.200
-language specification.
-
-All checks can be disabled by the @value{GDBN} command @code{set check
-off}.
-
-@ignore
-@c Deviations from the Chill Standard Z200/88
-see last paragraph ?
-@end ignore
-
-@node Chill defaults
-@subsubsection Chill defaults
-
-If type and range checking are set automatically by @value{GDBN}, they
-both default to @code{on} whenever the working language changes to
-Chill. This happens regardless of whether you or @value{GDBN}
-selected the working language.
-
-If you allow @value{GDBN} to set the language automatically, then entering
-code compiled from a file whose name ends with @file{.ch} sets the
-working language to Chill. @xref{Automatically, ,Having @value{GDBN} set
-the language automatically}, for further details.
+@c OBSOLETE @node Chill
+@c OBSOLETE @subsection Chill
+@c OBSOLETE
+@c OBSOLETE The extensions made to @value{GDBN} to support Chill only support output
+@c OBSOLETE from the @sc{gnu} Chill compiler. Other Chill compilers are not currently
+@c OBSOLETE supported, and attempting to debug executables produced by them is most
+@c OBSOLETE likely to give an error as @value{GDBN} reads in the executable's symbol
+@c OBSOLETE table.
+@c OBSOLETE
+@c OBSOLETE @c This used to say "... following Chill related topics ...", but since
+@c OBSOLETE @c menus are not shown in the printed manual, it would look awkward.
+@c OBSOLETE This section covers the Chill related topics and the features
+@c OBSOLETE of @value{GDBN} which support these topics.
+@c OBSOLETE
+@c OBSOLETE @menu
+@c OBSOLETE * How modes are displayed:: How modes are displayed
+@c OBSOLETE * Locations:: Locations and their accesses
+@c OBSOLETE * Values and their Operations:: Values and their Operations
+@c OBSOLETE * Chill type and range checks::
+@c OBSOLETE * Chill defaults::
+@c OBSOLETE @end menu
+@c OBSOLETE
+@c OBSOLETE @node How modes are displayed
+@c OBSOLETE @subsubsection How modes are displayed
+@c OBSOLETE
+@c OBSOLETE The Chill Datatype- (Mode) support of @value{GDBN} is directly related
+@c OBSOLETE with the functionality of the @sc{gnu} Chill compiler, and therefore deviates
+@c OBSOLETE slightly from the standard specification of the Chill language. The
+@c OBSOLETE provided modes are:
+@c OBSOLETE
+@c OBSOLETE @c FIXME: this @table's contents effectively disable @code by using @r
+@c OBSOLETE @c on every @item. So why does it need @code?
+@c OBSOLETE @table @code
+@c OBSOLETE @item @r{@emph{Discrete modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Integer Modes} which are predefined by @code{BYTE, UBYTE, INT,
+@c OBSOLETE UINT, LONG, ULONG},
+@c OBSOLETE @item
+@c OBSOLETE @emph{Boolean Mode} which is predefined by @code{BOOL},
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character Mode} which is predefined by @code{CHAR},
+@c OBSOLETE @item
+@c OBSOLETE @emph{Set Mode} which is displayed by the keyword @code{SET}.
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype x
+@c OBSOLETE type = SET (karli = 10, susi = 20, fritzi = 100)
+@c OBSOLETE @end smallexample
+@c OBSOLETE If the type is an unnumbered set the set element values are omitted.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Range Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{type = <basemode>(<lower bound> : <upper bound>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{<lower bound>, <upper bound>} can be of any discrete literal
+@c OBSOLETE expression (e.g. set element names).
+@c OBSOLETE @end itemize
+@c OBSOLETE
+@c OBSOLETE @item @r{@emph{Powerset Mode:}}
+@c OBSOLETE A Powerset Mode is displayed by the keyword @code{POWERSET} followed by
+@c OBSOLETE the member mode of the powerset. The member mode can be any discrete mode.
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype x
+@c OBSOLETE type = POWERSET SET (egon, hugo, otto)
+@c OBSOLETE @end smallexample
+@c OBSOLETE
+@c OBSOLETE @item @r{@emph{Reference Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Bound Reference Mode} which is displayed by the keyword @code{REF}
+@c OBSOLETE followed by the mode name to which the reference is bound.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Free Reference Mode} which is displayed by the keyword @code{PTR}.
+@c OBSOLETE @end itemize
+@c OBSOLETE
+@c OBSOLETE @item @r{@emph{Procedure mode}}
+@c OBSOLETE The procedure mode is displayed by @code{type = PROC(<parameter list>)
+@c OBSOLETE <return mode> EXCEPTIONS (<exception list>)}. The @code{<parameter
+@c OBSOLETE list>} is a list of the parameter modes. @code{<return mode>} indicates
+@c OBSOLETE the mode of the result of the procedure if any. The exceptionlist lists
+@c OBSOLETE all possible exceptions which can be raised by the procedure.
+@c OBSOLETE
+@c OBSOLETE @ignore
+@c OBSOLETE @item @r{@emph{Instance mode}}
+@c OBSOLETE The instance mode is represented by a structure, which has a static
+@c OBSOLETE type, and is therefore not really of interest.
+@c OBSOLETE @end ignore
+@c OBSOLETE
+@c OBSOLETE @item @r{@emph{Synchronization Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Event Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{EVENT (<event length>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{(<event length>)} is optional.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Buffer Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{BUFFER (<buffer length>)<buffer element mode>}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{(<buffer length>)} is optional.
+@c OBSOLETE @end itemize
+@c OBSOLETE
+@c OBSOLETE @item @r{@emph{Timing Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Duration Mode} which is predefined by @code{DURATION}
+@c OBSOLETE @item
+@c OBSOLETE @emph{Absolute Time Mode} which is predefined by @code{TIME}
+@c OBSOLETE @end itemize
+@c OBSOLETE
+@c OBSOLETE @item @r{@emph{Real Modes:}}
+@c OBSOLETE Real Modes are predefined with @code{REAL} and @code{LONG_REAL}.
+@c OBSOLETE
+@c OBSOLETE @item @r{@emph{String Modes:}}
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character String Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{CHARS(<string length>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE followed by the keyword @code{VARYING} if the String Mode is a varying
+@c OBSOLETE mode
+@c OBSOLETE @item
+@c OBSOLETE @emph{Bit String Mode} which is displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{BOOLS(<string
+@c OBSOLETE length>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE @end itemize
+@c OBSOLETE
+@c OBSOLETE @item @r{@emph{Array Mode:}}
+@c OBSOLETE The Array Mode is displayed by the keyword @code{ARRAY(<range>)}
+@c OBSOLETE followed by the element mode (which may in turn be an array mode).
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype x
+@c OBSOLETE type = ARRAY (1:42)
+@c OBSOLETE ARRAY (1:20)
+@c OBSOLETE SET (karli = 10, susi = 20, fritzi = 100)
+@c OBSOLETE @end smallexample
+@c OBSOLETE
+@c OBSOLETE @item @r{@emph{Structure Mode}}
+@c OBSOLETE The Structure mode is displayed by the keyword @code{STRUCT(<field
+@c OBSOLETE list>)}. The @code{<field list>} consists of names and modes of fields
+@c OBSOLETE of the structure. Variant structures have the keyword @code{CASE <field>
+@c OBSOLETE OF <variant fields> ESAC} in their field list. Since the current version
+@c OBSOLETE of the GNU Chill compiler doesn't implement tag processing (no runtime
+@c OBSOLETE checks of variant fields, and therefore no debugging info), the output
+@c OBSOLETE always displays all variant fields.
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) ptype str
+@c OBSOLETE type = STRUCT (
+@c OBSOLETE as x,
+@c OBSOLETE bs x,
+@c OBSOLETE CASE bs OF
+@c OBSOLETE (karli):
+@c OBSOLETE cs a
+@c OBSOLETE (ott):
+@c OBSOLETE ds x
+@c OBSOLETE ESAC
+@c OBSOLETE )
+@c OBSOLETE @end smallexample
+@c OBSOLETE @end table
+@c OBSOLETE
+@c OBSOLETE @node Locations
+@c OBSOLETE @subsubsection Locations and their accesses
+@c OBSOLETE
+@c OBSOLETE A location in Chill is an object which can contain values.
+@c OBSOLETE
+@c OBSOLETE A value of a location is generally accessed by the (declared) name of
+@c OBSOLETE the location. The output conforms to the specification of values in
+@c OBSOLETE Chill programs. How values are specified
+@c OBSOLETE is the topic of the next section, @ref{Values and their Operations}.
+@c OBSOLETE
+@c OBSOLETE The pseudo-location @code{RESULT} (or @code{result}) can be used to
+@c OBSOLETE display or change the result of a currently-active procedure:
+@c OBSOLETE
+@c OBSOLETE @smallexample
+@c OBSOLETE set result := EXPR
+@c OBSOLETE @end smallexample
+@c OBSOLETE
+@c OBSOLETE @noindent
+@c OBSOLETE This does the same as the Chill action @code{RESULT EXPR} (which
+@c OBSOLETE is not available in @value{GDBN}).
+@c OBSOLETE
+@c OBSOLETE Values of reference mode locations are printed by @code{PTR(<hex
+@c OBSOLETE value>)} in case of a free reference mode, and by @code{(REF <reference
+@c OBSOLETE mode>) (<hex-value>)} in case of a bound reference. @code{<hex value>}
+@c OBSOLETE represents the address where the reference points to. To access the
+@c OBSOLETE value of the location referenced by the pointer, use the dereference
+@c OBSOLETE operator @samp{->}.
+@c OBSOLETE
+@c OBSOLETE Values of procedure mode locations are displayed by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{@{ PROC
+@c OBSOLETE (<argument modes> ) <return mode> @} <address> <name of procedure
+@c OBSOLETE location>}
+@c OBSOLETE @end smallexample
+@c OBSOLETE @code{<argument modes>} is a list of modes according to the parameter
+@c OBSOLETE specification of the procedure and @code{<address>} shows the address of
+@c OBSOLETE the entry point.
+@c OBSOLETE
+@c OBSOLETE @ignore
+@c OBSOLETE Locations of instance modes are displayed just like a structure with two
+@c OBSOLETE fields specifying the @emph{process type} and the @emph{copy number} of
+@c OBSOLETE the investigated instance location@footnote{This comes from the current
+@c OBSOLETE implementation of instances. They are implemented as a structure (no
+@c OBSOLETE na). The output should be something like @code{[<name of the process>;
+@c OBSOLETE <instance number>]}.}. The field names are @code{__proc_type} and
+@c OBSOLETE @code{__proc_copy}.
+@c OBSOLETE
+@c OBSOLETE Locations of synchronization modes are displayed like a structure with
+@c OBSOLETE the field name @code{__event_data} in case of a event mode location, and
+@c OBSOLETE like a structure with the field @code{__buffer_data} in case of a buffer
+@c OBSOLETE mode location (refer to previous paragraph).
+@c OBSOLETE
+@c OBSOLETE Structure Mode locations are printed by @code{[.<field name>: <value>,
+@c OBSOLETE ...]}. The @code{<field name>} corresponds to the structure mode
+@c OBSOLETE definition and the layout of @code{<value>} varies depending of the mode
+@c OBSOLETE of the field. If the investigated structure mode location is of variant
+@c OBSOLETE structure mode, the variant parts of the structure are enclosed in curled
+@c OBSOLETE braces (@samp{@{@}}). Fields enclosed by @samp{@{,@}} are residing
+@c OBSOLETE on the same memory location and represent the current values of the
+@c OBSOLETE memory location in their specific modes. Since no tag processing is done
+@c OBSOLETE all variants are displayed. A variant field is printed by
+@c OBSOLETE @code{(<variant name>) = .<field name>: <value>}. (who implements the
+@c OBSOLETE stuff ???)
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) print str1 $4 = [.as: 0, .bs: karli, .<TAG>: { (karli) =
+@c OBSOLETE [.cs: []], (susi) = [.ds: susi]}]
+@c OBSOLETE @end smallexample
+@c OBSOLETE @end ignore
+@c OBSOLETE
+@c OBSOLETE Substructures of string mode-, array mode- or structure mode-values
+@c OBSOLETE (e.g. array slices, fields of structure locations) are accessed using
+@c OBSOLETE certain operations which are described in the next section, @ref{Values
+@c OBSOLETE and their Operations}.
+@c OBSOLETE
+@c OBSOLETE A location value may be interpreted as having a different mode using the
+@c OBSOLETE location conversion. This mode conversion is written as @code{<mode
+@c OBSOLETE name>(<location>)}. The user has to consider that the sizes of the modes
+@c OBSOLETE have to be equal otherwise an error occurs. Furthermore, no range
+@c OBSOLETE checking of the location against the destination mode is performed, and
+@c OBSOLETE therefore the result can be quite confusing.
+@c OBSOLETE
+@c OBSOLETE @smallexample
+@c OBSOLETE (@value{GDBP}) print int (s(3 up 4)) XXX TO be filled in !! XXX
+@c OBSOLETE @end smallexample
+@c OBSOLETE
+@c OBSOLETE @node Values and their Operations
+@c OBSOLETE @subsubsection Values and their Operations
+@c OBSOLETE
+@c OBSOLETE Values are used to alter locations, to investigate complex structures in
+@c OBSOLETE more detail or to filter relevant information out of a large amount of
+@c OBSOLETE data. There are several (mode dependent) operations defined which enable
+@c OBSOLETE such investigations. These operations are not only applicable to
+@c OBSOLETE constant values but also to locations, which can become quite useful
+@c OBSOLETE when debugging complex structures. During parsing the command line
+@c OBSOLETE (e.g. evaluating an expression) @value{GDBN} treats location names as
+@c OBSOLETE the values behind these locations.
+@c OBSOLETE
+@c OBSOLETE This section describes how values have to be specified and which
+@c OBSOLETE operations are legal to be used with such values.
+@c OBSOLETE
+@c OBSOLETE @table @code
+@c OBSOLETE @item Literal Values
+@c OBSOLETE Literal values are specified in the same manner as in @sc{gnu} Chill programs.
+@c OBSOLETE For detailed specification refer to the @sc{gnu} Chill implementation Manual
+@c OBSOLETE chapter 1.5.
+@c OBSOLETE @c FIXME: if the Chill Manual is a Texinfo documents, the above should
+@c OBSOLETE @c be converted to a @ref.
+@c OBSOLETE
+@c OBSOLETE @ignore
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item
+@c OBSOLETE @emph{Integer Literals} are specified in the same manner as in Chill
+@c OBSOLETE programs (refer to the Chill Standard z200/88 chpt 5.2.4.2)
+@c OBSOLETE @item
+@c OBSOLETE @emph{Boolean Literals} are defined by @code{TRUE} and @code{FALSE}.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character Literals} are defined by @code{'<character>'}. (e.g.
+@c OBSOLETE @code{'M'})
+@c OBSOLETE @item
+@c OBSOLETE @emph{Set Literals} are defined by a name which was specified in a set
+@c OBSOLETE mode. The value delivered by a Set Literal is the set value. This is
+@c OBSOLETE comparable to an enumeration in C/C@t{++} language.
+@c OBSOLETE @item
+@c OBSOLETE @emph{Emptiness Literal} is predefined by @code{NULL}. The value of the
+@c OBSOLETE emptiness literal delivers either the empty reference value, the empty
+@c OBSOLETE procedure value or the empty instance value.
+@c OBSOLETE
+@c OBSOLETE @item
+@c OBSOLETE @emph{Character String Literals} are defined by a sequence of characters
+@c OBSOLETE enclosed in single- or double quotes. If a single- or double quote has
+@c OBSOLETE to be part of the string literal it has to be stuffed (specified twice).
+@c OBSOLETE @item
+@c OBSOLETE @emph{Bitstring Literals} are specified in the same manner as in Chill
+@c OBSOLETE programs (refer z200/88 chpt 5.2.4.8).
+@c OBSOLETE @item
+@c OBSOLETE @emph{Floating point literals} are specified in the same manner as in
+@c OBSOLETE (gnu-)Chill programs (refer @sc{gnu} Chill implementation Manual chapter 1.5).
+@c OBSOLETE @end itemize
+@c OBSOLETE @end ignore
+@c OBSOLETE
+@c OBSOLETE @item Tuple Values
+@c OBSOLETE A tuple is specified by @code{<mode name>[<tuple>]}, where @code{<mode
+@c OBSOLETE name>} can be omitted if the mode of the tuple is unambiguous. This
+@c OBSOLETE unambiguity is derived from the context of a evaluated expression.
+@c OBSOLETE @code{<tuple>} can be one of the following:
+@c OBSOLETE
+@c OBSOLETE @itemize @bullet
+@c OBSOLETE @item @emph{Powerset Tuple}
+@c OBSOLETE @item @emph{Array Tuple}
+@c OBSOLETE @item @emph{Structure Tuple}
+@c OBSOLETE Powerset tuples, array tuples and structure tuples are specified in the
+@c OBSOLETE same manner as in Chill programs refer to z200/88 chpt 5.2.5.
+@c OBSOLETE @end itemize
+@c OBSOLETE
+@c OBSOLETE @item String Element Value
+@c OBSOLETE A string element value is specified by
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{<string value>(<index>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE where @code{<index>} is a integer expression. It delivers a character
+@c OBSOLETE value which is equivalent to the character indexed by @code{<index>} in
+@c OBSOLETE the string.
+@c OBSOLETE
+@c OBSOLETE @item String Slice Value
+@c OBSOLETE A string slice value is specified by @code{<string value>(<slice
+@c OBSOLETE spec>)}, where @code{<slice spec>} can be either a range of integer
+@c OBSOLETE expressions or specified by @code{<start expr> up <size>}.
+@c OBSOLETE @code{<size>} denotes the number of elements which the slice contains.
+@c OBSOLETE The delivered value is a string value, which is part of the specified
+@c OBSOLETE string.
+@c OBSOLETE
+@c OBSOLETE @item Array Element Values
+@c OBSOLETE An array element value is specified by @code{<array value>(<expr>)} and
+@c OBSOLETE delivers a array element value of the mode of the specified array.
+@c OBSOLETE
+@c OBSOLETE @item Array Slice Values
+@c OBSOLETE An array slice is specified by @code{<array value>(<slice spec>)}, where
+@c OBSOLETE @code{<slice spec>} can be either a range specified by expressions or by
+@c OBSOLETE @code{<start expr> up <size>}. @code{<size>} denotes the number of
+@c OBSOLETE arrayelements the slice contains. The delivered value is an array value
+@c OBSOLETE which is part of the specified array.
+@c OBSOLETE
+@c OBSOLETE @item Structure Field Values
+@c OBSOLETE A structure field value is derived by @code{<structure value>.<field
+@c OBSOLETE name>}, where @code{<field name>} indicates the name of a field specified
+@c OBSOLETE in the mode definition of the structure. The mode of the delivered value
+@c OBSOLETE corresponds to this mode definition in the structure definition.
+@c OBSOLETE
+@c OBSOLETE @item Procedure Call Value
+@c OBSOLETE The procedure call value is derived from the return value of the
+@c OBSOLETE procedure@footnote{If a procedure call is used for instance in an
+@c OBSOLETE expression, then this procedure is called with all its side
+@c OBSOLETE effects. This can lead to confusing results if used carelessly.}.
+@c OBSOLETE
+@c OBSOLETE Values of duration mode locations are represented by @code{ULONG} literals.
+@c OBSOLETE
+@c OBSOLETE Values of time mode locations appear as
+@c OBSOLETE @smallexample
+@c OBSOLETE @code{TIME(<secs>:<nsecs>)}
+@c OBSOLETE @end smallexample
+@c OBSOLETE
+@c OBSOLETE
+@c OBSOLETE @ignore
+@c OBSOLETE This is not implemented yet:
+@c OBSOLETE @item Built-in Value
+@c OBSOLETE @noindent
+@c OBSOLETE The following built in functions are provided:
+@c OBSOLETE
+@c OBSOLETE @table @code
+@c OBSOLETE @item @code{ADDR()}
+@c OBSOLETE @item @code{NUM()}
+@c OBSOLETE @item @code{PRED()}
+@c OBSOLETE @item @code{SUCC()}
+@c OBSOLETE @item @code{ABS()}
+@c OBSOLETE @item @code{CARD()}
+@c OBSOLETE @item @code{MAX()}
+@c OBSOLETE @item @code{MIN()}
+@c OBSOLETE @item @code{SIZE()}
+@c OBSOLETE @item @code{UPPER()}
+@c OBSOLETE @item @code{LOWER()}
+@c OBSOLETE @item @code{LENGTH()}
+@c OBSOLETE @item @code{SIN()}
+@c OBSOLETE @item @code{COS()}
+@c OBSOLETE @item @code{TAN()}
+@c OBSOLETE @item @code{ARCSIN()}
+@c OBSOLETE @item @code{ARCCOS()}
+@c OBSOLETE @item @code{ARCTAN()}
+@c OBSOLETE @item @code{EXP()}
+@c OBSOLETE @item @code{LN()}
+@c OBSOLETE @item @code{LOG()}
+@c OBSOLETE @item @code{SQRT()}
+@c OBSOLETE @end table
+@c OBSOLETE
+@c OBSOLETE For a detailed description refer to the GNU Chill implementation manual
+@c OBSOLETE chapter 1.6.
+@c OBSOLETE @end ignore
+@c OBSOLETE
+@c OBSOLETE @item Zero-adic Operator Value
+@c OBSOLETE The zero-adic operator value is derived from the instance value for the
+@c OBSOLETE current active process.
+@c OBSOLETE
+@c OBSOLETE @item Expression Values
+@c OBSOLETE The value delivered by an expression is the result of the evaluation of
+@c OBSOLETE the specified expression. If there are error conditions (mode
+@c OBSOLETE incompatibility, etc.) the evaluation of expressions is aborted with a
+@c OBSOLETE corresponding error message. Expressions may be parenthesised which
+@c OBSOLETE causes the evaluation of this expression before any other expression
+@c OBSOLETE which uses the result of the parenthesised expression. The following
+@c OBSOLETE operators are supported by @value{GDBN}:
+@c OBSOLETE
+@c OBSOLETE @table @code
+@c OBSOLETE @item @code{OR, ORIF, XOR}
+@c OBSOLETE @itemx @code{AND, ANDIF}
+@c OBSOLETE @itemx @code{NOT}
+@c OBSOLETE Logical operators defined over operands of boolean mode.
+@c OBSOLETE
+@c OBSOLETE @item @code{=, /=}
+@c OBSOLETE Equality and inequality operators defined over all modes.
+@c OBSOLETE
+@c OBSOLETE @item @code{>, >=}
+@c OBSOLETE @itemx @code{<, <=}
+@c OBSOLETE Relational operators defined over predefined modes.
+@c OBSOLETE
+@c OBSOLETE @item @code{+, -}
+@c OBSOLETE @itemx @code{*, /, MOD, REM}
+@c OBSOLETE Arithmetic operators defined over predefined modes.
+@c OBSOLETE
+@c OBSOLETE @item @code{-}
+@c OBSOLETE Change sign operator.
+@c OBSOLETE
+@c OBSOLETE @item @code{//}
+@c OBSOLETE String concatenation operator.
+@c OBSOLETE
+@c OBSOLETE @item @code{()}
+@c OBSOLETE String repetition operator.
+@c OBSOLETE
+@c OBSOLETE @item @code{->}
+@c OBSOLETE Referenced location operator which can be used either to take the
+@c OBSOLETE address of a location (@code{->loc}), or to dereference a reference
+@c OBSOLETE location (@code{loc->}).
+@c OBSOLETE
+@c OBSOLETE @item @code{OR, XOR}
+@c OBSOLETE @itemx @code{AND}
+@c OBSOLETE @itemx @code{NOT}
+@c OBSOLETE Powerset and bitstring operators.
+@c OBSOLETE
+@c OBSOLETE @item @code{>, >=}
+@c OBSOLETE @itemx @code{<, <=}
+@c OBSOLETE Powerset inclusion operators.
+@c OBSOLETE
+@c OBSOLETE @item @code{IN}
+@c OBSOLETE Membership operator.
+@c OBSOLETE @end table
+@c OBSOLETE @end table
+@c OBSOLETE
+@c OBSOLETE @node Chill type and range checks
+@c OBSOLETE @subsubsection Chill type and range checks
+@c OBSOLETE
+@c OBSOLETE @value{GDBN} considers two Chill variables mode equivalent if the sizes
+@c OBSOLETE of the two modes are equal. This rule applies recursively to more
+@c OBSOLETE complex datatypes which means that complex modes are treated
+@c OBSOLETE equivalent if all element modes (which also can be complex modes like
+@c OBSOLETE structures, arrays, etc.) have the same size.
+@c OBSOLETE
+@c OBSOLETE Range checking is done on all mathematical operations, assignment, array
+@c OBSOLETE index bounds and all built in procedures.
+@c OBSOLETE
+@c OBSOLETE Strong type checks are forced using the @value{GDBN} command @code{set
+@c OBSOLETE check strong}. This enforces strong type and range checks on all
+@c OBSOLETE operations where Chill constructs are used (expressions, built in
+@c OBSOLETE functions, etc.) in respect to the semantics as defined in the z.200
+@c OBSOLETE language specification.
+@c OBSOLETE
+@c OBSOLETE All checks can be disabled by the @value{GDBN} command @code{set check
+@c OBSOLETE off}.
+@c OBSOLETE
+@c OBSOLETE @ignore
+@c OBSOLETE @c Deviations from the Chill Standard Z200/88
+@c OBSOLETE see last paragraph ?
+@c OBSOLETE @end ignore
+@c OBSOLETE
+@c OBSOLETE @node Chill defaults
+@c OBSOLETE @subsubsection Chill defaults
+@c OBSOLETE
+@c OBSOLETE If type and range checking are set automatically by @value{GDBN}, they
+@c OBSOLETE both default to @code{on} whenever the working language changes to
+@c OBSOLETE Chill. This happens regardless of whether you or @value{GDBN}
+@c OBSOLETE selected the working language.
+@c OBSOLETE
+@c OBSOLETE If you allow @value{GDBN} to set the language automatically, then entering
+@c OBSOLETE code compiled from a file whose name ends with @file{.ch} sets the
+@c OBSOLETE working language to Chill. @xref{Automatically, ,Having @value{GDBN} set
+@c OBSOLETE the language automatically}, for further details.
@node Symbols
@chapter Examining the Symbol Table
* i960:: Intel i960
* M32R/D:: Mitsubishi M32R/D
* M68K:: Motorola M68K
-* M88K:: Motorola M88K
+@c OBSOLETE * M88K:: Motorola M88K
* MIPS Embedded:: MIPS Embedded
* PA:: HP PA Embedded
* PowerPC: PowerPC
@end table
-@node M88K
-@subsection M88K
-
-@table @code
-
-@kindex target bug
-@item target bug @var{dev}
-BUG monitor, running on a MVME187 (m88k) board.
-
-@end table
+@c OBSOLETE @node M88K
+@c OBSOLETE @subsection M88K
+@c OBSOLETE
+@c OBSOLETE @table @code
+@c OBSOLETE
+@c OBSOLETE @kindex target bug
+@c OBSOLETE @item target bug @var{dev}
+@c OBSOLETE BUG monitor, running on a MVME187 (m88k) board.
+@c OBSOLETE
+@c OBSOLETE @end table
@node MIPS Embedded
@subsection MIPS Embedded
@var{AA} = two hex digit signal number; @var{n...} = register number
(hex), @var{r...} = target byte ordered register contents, size defined
by @code{REGISTER_RAW_SIZE}; @var{n...} = @samp{thread}, @var{r...} =
-thread process ID, this is a hex integer; @var{n...} = other string not
-starting with valid hex digit. @value{GDBN} should ignore this
-@var{n...}, @var{r...} pair and go on to the next. This way we can
-extend the protocol.
+thread process ID, this is a hex integer; @var{n...} = (@samp{watch} |
+@samp{rwatch} | @samp{awatch}, @var{r...} = data address, this is a hex
+integer; @var{n...} = other string not starting with valid hex digit.
+@value{GDBN} should ignore this @var{n...}, @var{r...} pair and go on
+to the next. This way we can extend the protocol.
@item @code{W}@var{AA}
@tab
DWARF 1 is a debugging format that was originally designed to be
used with ELF in SVR4 systems.
-@c CHILL_PRODUCER
+@c OBSOLETE CHILL_PRODUCER
@c GCC_PRODUCER
@c GPLUS_PRODUCER
@c LCC_PRODUCER
Define this to convert sdb register numbers into @value{GDBN} regnums. If not
defined, no conversion will be done.
-@item SHIFT_INST_REGS
-@findex SHIFT_INST_REGS
-(Only used for m88k targets.)
+@c OBSOLETE @item SHIFT_INST_REGS
+@c OBSOLETE @findex SHIFT_INST_REGS
+@c OBSOLETE (Only used for m88k targets.)
@item SKIP_PERMANENT_BREAKPOINT
@findex SKIP_PERMANENT_BREAKPOINT
@subsection Include Files
-All @file{.c} files should include @file{defs.h} first.
+A @file{.c} file should include @file{defs.h} first.
-All @file{.c} files should explicitly include the headers for any
-declarations they refer to. They should not rely on files being
-included indirectly.
+A @file{.c} file should directly include the @code{.h} file of every
+declaration and/or definition it directly refers to. It cannot rely on
+indirect inclusion.
-With the exception of the global definitions supplied by @file{defs.h},
-a header file should explicitly include the header declaring any
-@code{typedefs} et.al.@: it refers to.
+A @file{.h} file should directly include the @code{.h} file of every
+declaration and/or definition it directly refers to. It cannot rely on
+indirect inclusion. Exception: The file @file{defs.h} does not need to
+be directly included.
-@code{extern} declarations should never appear in @code{.c} files.
+An external declaration should only appear in one include file.
-All include files should be wrapped in:
+An external declaration should never appear in a @code{.c} file.
+Exception: a declaration for the @code{_initialize} function that
+pacifies @option{-Wmissing-declaration}.
+
+A @code{typedef} definition should only appear in one include file.
+
+An opaque @code{struct} declaration can appear in multiple @file{.h}
+files. Where possible, a @file{.h} file should use an opaque
+@code{struct} declaration instead of an include.
+
+All @file{.h} files should be wrapped in:
@smallexample
#ifndef INCLUDE_FILE_NAME_H
enumeration or a subrange, and the type is a bitmask whose length is
specified by the number of elements in @var{type-information}.
-In CHILL, if it is a bitstring instead of a set, also use the @samp{S}
+In CHILL, @c OBSOLETE
+if it is a bitstring instead of a set, also use the @samp{S}
type attribute (@pxref{String Field}).
@item * @var{type-information}
Pascal Stringptr. What is this? This is an AIX feature.
@end table
-Languages, such as CHILL which have a string type which is basically
+Languages, such as CHILL @c OBSOLETE
+which have a string type which is basically
just an array of characters use the @samp{S} type attribute
(@pxref{String Field}).
{
warning ("Can't store a floating-point number of %d bytes.", len);
memset (addr, 0, len);
+ return;
}
floatformat_from_doublest (fmt, &val, addr);
#include "symfile.h"
#include "objfiles.h"
#include "buildsym.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "gdb_string.h"
cu_language = language_java;
break;
case DW_LANG_Ada83:
+ case DW_LANG_Ada95:
case DW_LANG_Cobol74:
case DW_LANG_Cobol85:
case DW_LANG_Pascal83:
#define LCC_PRODUCER "NCR C/C++"
#endif
-#ifndef CHILL_PRODUCER
-#define CHILL_PRODUCER "GNU Chill "
-#endif
+/* OBSOLETE #ifndef CHILL_PRODUCER */
+/* OBSOLETE #define CHILL_PRODUCER "GNU Chill " */
+/* OBSOLETE #endif */
/* Flags to target_to_host() that tell whether or not the data object is
expected to be signed. Used, for example, when fetching a signed
case LANG_C_PLUS_PLUS:
cu_language = language_cplus;
break;
- case LANG_CHILL:
- cu_language = language_chill;
- break;
+ /* OBSOLETE case LANG_CHILL: */
+ /* OBSOLETE cu_language = language_chill; */
+ /* OBSOLETE break; */
case LANG_MODULA2:
cu_language = language_m2;
break;
else
{
processing_gcc_compilation =
- STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER))
- || STREQN (producer, CHILL_PRODUCER, strlen (CHILL_PRODUCER));
+ STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER));
+ /* OBSOLETE || STREQN (producer, CHILL_PRODUCER, strlen (CHILL_PRODUCER)); */
}
/* Select a demangling style if we can identify the producer and if
|| ((sym->flags & BSF_LOCAL)
&& sym->name[0] == '$'
&& sym->name[1] == 'L'))
- /* Looks like a compiler-generated label. Skip it.
- The assembler should be skipping these (to keep
- executables small), but apparently with gcc on the
- delta m88k SVR4, it loses. So to have us check too
- should be harmless (but I encourage people to fix this
- in the assembler instead of adding checks here). */
+ /* Looks like a compiler-generated label. Skip
+ it. The assembler should be skipping these (to
+ keep executables small), but apparently with
+ gcc on the (OBSOLETE) delta m88k SVR4, it
+ loses. So to have us check too should be
+ harmless (but I encourage people to fix this in
+ the assembler instead of adding checks here). */
continue;
else
{
return NULL;
}
-/* This function evaluates tuples (in Chill) or brace-initializers
- (in C/C++) for structure types. */
+/* This function evaluates tuples (in (OBSOLETE) Chill) or
+ brace-initializers (in C/C++) for structure types. */
static struct value *
evaluate_struct_tuple (struct value *struct_val,
return struct_val;
}
-/* Recursive helper function for setting elements of array tuples for Chill.
- The target is ARRAY (which has bounds LOW_BOUND to HIGH_BOUND);
- the element value is ELEMENT;
- EXP, POS and NOSIDE are as usual.
- Evaluates index expresions and sets the specified element(s) of
- ARRAY to ELEMENT.
- Returns last index value. */
+/* Recursive helper function for setting elements of array tuples for
+ (OBSOLETE) Chill. The target is ARRAY (which has bounds LOW_BOUND
+ to HIGH_BOUND); the element value is ELEMENT; EXP, POS and NOSIDE
+ are as usual. Evaluates index expresions and sets the specified
+ element(s) of ARRAY to ELEMENT. Returns last index value. */
static LONGEST
init_array_element (struct value *array, struct value *element,
}
else
{
- int is_chill = exp->language_defn->la_language == language_chill;
- fputs_filtered (is_chill ? " [" : " {", stream);
+ /* OBSOLETE int is_chill = exp->language_defn->la_language == language_chill; */
+ /* OBSOLETE fputs_filtered (is_chill ? " [" : " {", stream); */
+ fputs_filtered (" {", stream);
for (tem = 0; tem < nargs; tem++)
{
if (tem != 0)
}
print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
}
- fputs_filtered (is_chill ? "]" : "}", stream);
+ /* OBSOLETE fputs_filtered (is_chill ? "]" : "}", stream); */
+ fputs_filtered ("}", stream);
}
return;
tem = longest_to_int (exp->elts[pc + 1].longconst);
(*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
- if (exp->language_defn->la_language == language_chill)
- {
- fputs_filtered (".", stream);
- fputs_filtered (&exp->elts[pc + 2].string, stream);
- fputs_filtered (exp->elts[*pos].opcode == OP_LABELED ? ", "
- : ": ",
- stream);
- }
- else
+#if 0
+ if (0 /* OBSOLETE exp->language_defn->la_language == language_chill */)
+ { /* OBSOLETE */
+ fputs_filtered (".", stream); /* OBSOLETE */
+ fputs_filtered (&exp->elts[pc + 2].string, stream); /* OBSOLETE */
+ fputs_filtered (exp->elts[*pos].opcode == OP_LABELED ? ", " /* OBSOLETE */
+ : ": ", /* OBSOLETE */
+ stream); /* OBSOLETE */
+ } /* OBSOLETE */
+ else /* OBSOLETE */
+#endif
{
/* Gcc support both these syntaxes. Unsure which is preferred. */
#if 1
the second operand with itself that many times. */
BINOP_CONCAT,
- /* For Chill and Pascal. */
+ /* For (OBSOLETE) Chill (OBSOLETE) and Pascal. */
BINOP_IN, /* Returns 1 iff ARG1 IN ARG2. */
- /* This is the "colon operator" used various places in Chill. */
+ /* This is the "colon operator" used various places in (OBSOLETE)
+ Chill (OBSOLETE). */
BINOP_RANGE,
/* This must be the highest BINOP_ value, for expprint.c. */
/* Operates on three values computed by following subexpressions. */
TERNOP_COND, /* ?: */
- /* A sub-string/sub-array. Chill syntax: OP1(OP2:OP3).
- Return elements OP2 through OP3 of OP1. */
+ /* A sub-string/sub-array. (OBSOLETE) Chill (OBSOLETE) syntax:
+ OP1(OP2:OP3). Return elements OP2 through OP3 of OP1. */
TERNOP_SLICE,
- /* A sub-string/sub-array. Chill syntax: OP1(OP2 UP OP3).
- Return OP3 elements of OP1, starting with element OP2. */
+ /* A sub-string/sub-array. (OBSOLETE) Chill (OBSOLETE) syntax:
+ OP1(OP2 UP OP3). Return OP3 elements of OP1, starting with
+ element OP2. */
TERNOP_SLICE_COUNT,
/* Multidimensional subscript operator, such as Modula-2 x[a,b,...].
UNOP_ODD,
UNOP_TRUNC,
- /* Chill builtin functions. */
+ /* (OBSOLETE) Chill (OBSOLETE) builtin functions. */
UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH, UNOP_CARD, UNOP_CHMAX, UNOP_CHMIN,
OP_BOOL, /* Modula-2 builtin BOOLEAN type */
a string, which, of course, is variable length. */
OP_SCOPE,
- /* Used to represent named structure field values in brace initializers
- (or tuples as they are called in Chill).
- The gcc C syntax is NAME:VALUE or .NAME=VALUE, the Chill syntax is
- .NAME:VALUE. Multiple labels (as in the Chill syntax
- .NAME1,.NAME2:VALUE) is represented as if it were
- .NAME1:(.NAME2:VALUE) (though that is not valid Chill syntax).
+ /* Used to represent named structure field values in brace
+ initializers (or tuples as they are called in (OBSOLETE) Chill
+ (OBSOLETE)).
+
+ The gcc C syntax is NAME:VALUE or .NAME=VALUE, the (OBSOLETE)
+ Chill (OBSOLETE) syntax is .NAME:VALUE. Multiple labels (as in
+ the (OBSOLETE) Chill (OBSOLETE) syntax .NAME1,.NAME2:VALUE) is
+ represented as if it were .NAME1:(.NAME2:VALUE) (though that is
+ not valid (OBSOLETE) Chill (OBSOLETE) syntax).
The NAME is represented as for STRUCTOP_STRUCT; VALUE follows. */
OP_LABELED,
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "bfd.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "defs.h"
#include "gdbcore.h"
#include "inferior.h"
+#include "gdb_string.h"
#include <sys/procfs.h>
#include <sys/types.h>
#endif
LONGEST
-extract_signed_integer (void *addr, int len)
+extract_signed_integer (const void *addr, int len)
{
LONGEST retval;
- unsigned char *p;
- unsigned char *startaddr = (unsigned char *) addr;
- unsigned char *endaddr = startaddr + len;
+ const unsigned char *p;
+ const unsigned char *startaddr = addr;
+ const unsigned char *endaddr = startaddr + len;
if (len > (int) sizeof (LONGEST))
error ("\
}
ULONGEST
-extract_unsigned_integer (void *addr, int len)
+extract_unsigned_integer (const void *addr, int len)
{
ULONGEST retval;
- unsigned char *p;
- unsigned char *startaddr = (unsigned char *) addr;
- unsigned char *endaddr = startaddr + len;
+ const unsigned char *p;
+ const unsigned char *startaddr = addr;
+ const unsigned char *endaddr = startaddr + len;
if (len > (int) sizeof (ULONGEST))
error ("\
if (frame == NULL) /* No regs saved if want current frame */
return 0;
- /* Note that this next routine assumes that registers used in
- frame x will be saved only in the frame that x calls and
- frames interior to it. This is not true on the sparc, but the
- above macro takes care of it, so we should be all right. */
+ /* Note that the following loop assumes that registers used in
+ frame x will be saved only in the frame that x calls and frames
+ interior to it. */
while (1)
{
QUIT;
frame = frame1;
FRAME_INIT_SAVED_REGS (frame1);
if (frame1->saved_regs[regnum])
- addr = frame1->saved_regs[regnum];
+ {
+ addr = frame1->saved_regs[regnum];
+ break;
+ }
}
return addr;
set_gdbarch_push_dummy_frame (gdbarch, generic_push_dummy_frame);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_function_start_offset (gdbarch, 0);
#include "inferior.h"
#include "gdbcore.h"
#include "elf-bfd.h"
-#include <sys/procfs.h>
#include "symfile.h"
#include "objfiles.h"
return bfd_get_target (exec_bfd);
}
-/*
- * Default method for stack segment (preemptable by target).
- */
+/* Function: derive_stack_segment
-static int (*override_derive_stack_segment) (bfd_vma *, bfd_vma *);
-
-extern void
-preempt_derive_stack_segment (int (*override_func) (bfd_vma *, bfd_vma *))
-{
- override_derive_stack_segment = override_func;
-}
-
-/* Function: default_derive_stack_segment
Derive a reasonable stack segment by unwinding the target stack.
Returns 0 for failure, 1 for success. */
static int
-default_derive_stack_segment (bfd_vma *bottom, bfd_vma *top)
+derive_stack_segment (bfd_vma *bottom, bfd_vma *top)
{
bfd_vma tmp_vma;
struct frame_info *fi, *tmp_fi;
return 1; /* success */
}
-static int
-derive_stack_segment (bfd_vma *bottom, bfd_vma *top)
-{
- if (override_derive_stack_segment)
- return override_derive_stack_segment (bottom, top);
- else
- return default_derive_stack_segment (bottom, top);
-}
-
-/*
- * Default method for heap segment (preemptable by target).
- */
+/* Function: derive_heap_segment
-static int (*override_derive_heap_segment) (bfd *, bfd_vma *, bfd_vma *);
-
-extern void
-preempt_derive_heap_segment (int (*override_func) (bfd *,
- bfd_vma *, bfd_vma *))
-{
- override_derive_heap_segment = override_func;
-}
-
-/* Function: default_derive_heap_segment
Derive a reasonable heap segment by looking at sbrk and
the static data sections.
Returns 0 for failure, 1 for success. */
static int
-default_derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top)
+derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top)
{
bfd_vma top_of_data_memory = 0;
bfd_vma top_of_heap = 0;
return 0; /* No additional heap space needs to be saved. */
}
-static int
-derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top)
-{
- if (override_derive_heap_segment)
- return override_derive_heap_segment (abfd, bottom, top);
- else
- return default_derive_heap_segment (abfd, bottom, top);
-}
-
/* ARGSUSED */
static void
make_output_phdrs (bfd *obfd, asection *osec, void *ignored)
#include "floatformat.h"
#include "gdb_assert.h"
+#include "gdb_string.h"
#include "gdb-events.h"
/* Static function declarations */
gdbarch_read_sp_ftype *read_sp;
gdbarch_write_sp_ftype *write_sp;
gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
- gdbarch_register_read_ftype *register_read;
- gdbarch_register_write_ftype *register_write;
+ gdbarch_pseudo_register_read_ftype *pseudo_register_read;
+ gdbarch_pseudo_register_write_ftype *pseudo_register_write;
int num_regs;
int num_pseudo_regs;
int sp_regnum;
gdbarch_convert_register_p_ftype *convert_register_p;
gdbarch_register_to_value_ftype *register_to_value;
gdbarch_value_to_register_ftype *value_to_register;
- gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register;
- gdbarch_store_pseudo_register_ftype *store_pseudo_register;
gdbarch_pointer_to_address_ftype *pointer_to_address;
gdbarch_address_to_pointer_ftype *address_to_pointer;
gdbarch_integer_to_address_ftype *integer_to_address;
0,
0,
0,
- 0,
- 0,
generic_in_function_epilogue_p,
construct_inferior_arguments,
0,
/* Skip verify of read_sp, invalid_p == 0 */
/* Skip verify of write_sp, invalid_p == 0 */
/* Skip verify of virtual_frame_pointer, invalid_p == 0 */
- /* Skip verify of register_read, has predicate */
- /* Skip verify of register_write, has predicate */
+ /* Skip verify of pseudo_register_read, has predicate */
+ /* Skip verify of pseudo_register_write, has predicate */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->num_regs == -1))
fprintf_unfiltered (log, "\n\tnum_regs");
/* Skip verify of convert_register_p, invalid_p == 0 */
/* Skip verify of register_to_value, invalid_p == 0 */
/* Skip verify of value_to_register, invalid_p == 0 */
- /* Skip verify of fetch_pseudo_register, has predicate */
- /* Skip verify of store_pseudo_register, has predicate */
/* Skip verify of pointer_to_address, invalid_p == 0 */
/* Skip verify of address_to_pointer, invalid_p == 0 */
/* Skip verify of integer_to_address, has predicate */
(long) current_gdbarch->in_function_epilogue_p);
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
- "gdbarch_dump: register_read = 0x%08lx\n",
- (long) current_gdbarch->register_read);
+ "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
+ (long) current_gdbarch->pseudo_register_read);
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
- "gdbarch_dump: register_write = 0x%08lx\n",
- (long) current_gdbarch->register_write);
+ "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
+ (long) current_gdbarch->pseudo_register_write);
#ifdef ADDRESS_TO_POINTER
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
"gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
EXTRA_STACK_ALIGNMENT_NEEDED);
#endif
-#ifdef FETCH_PSEUDO_REGISTER
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "FETCH_PSEUDO_REGISTER(regnum)",
- XSTRING (FETCH_PSEUDO_REGISTER (regnum)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
- (long) current_gdbarch->fetch_pseudo_register
- /*FETCH_PSEUDO_REGISTER ()*/);
-#endif
#ifdef FIX_CALL_DUMMY
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
(long) current_gdbarch->stack_align
/*STACK_ALIGN ()*/);
#endif
-#ifdef STORE_PSEUDO_REGISTER
-#if GDB_MULTI_ARCH
- /* Macro might contain `[{}]' when not multi-arch */
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "STORE_PSEUDO_REGISTER(regnum)",
- XSTRING (STORE_PSEUDO_REGISTER (regnum)));
-#endif
- if (GDB_MULTI_ARCH)
- fprintf_unfiltered (file,
- "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
- (long) current_gdbarch->store_pseudo_register
- /*STORE_PSEUDO_REGISTER ()*/);
-#endif
#ifdef STORE_RETURN_VALUE
#if GDB_MULTI_ARCH
/* Macro might contain `[{}]' when not multi-arch */
}
int
-gdbarch_register_read_p (struct gdbarch *gdbarch)
+gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_read != 0;
+ return gdbarch->pseudo_register_read != 0;
}
void
-gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf)
+gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_read == 0)
+ if (gdbarch->pseudo_register_read == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_read invalid");
+ "gdbarch: gdbarch_pseudo_register_read invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_read called\n");
- gdbarch->register_read (gdbarch, regnum, buf);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
+ gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
}
void
-set_gdbarch_register_read (struct gdbarch *gdbarch,
- gdbarch_register_read_ftype register_read)
+set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
+ gdbarch_pseudo_register_read_ftype pseudo_register_read)
{
- gdbarch->register_read = register_read;
+ gdbarch->pseudo_register_read = pseudo_register_read;
}
int
-gdbarch_register_write_p (struct gdbarch *gdbarch)
+gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->register_write != 0;
+ return gdbarch->pseudo_register_write != 0;
}
void
-gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf)
+gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->register_write == 0)
+ if (gdbarch->pseudo_register_write == 0)
internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_register_write invalid");
+ "gdbarch: gdbarch_pseudo_register_write invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_register_write called\n");
- gdbarch->register_write (gdbarch, regnum, buf);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
+ gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
}
void
-set_gdbarch_register_write (struct gdbarch *gdbarch,
- gdbarch_register_write_ftype register_write)
+set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
+ gdbarch_pseudo_register_write_ftype pseudo_register_write)
{
- gdbarch->register_write = register_write;
+ gdbarch->pseudo_register_write = pseudo_register_write;
}
int
gdbarch->value_to_register = value_to_register;
}
-int
-gdbarch_fetch_pseudo_register_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->fetch_pseudo_register != 0;
-}
-
-void
-gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->fetch_pseudo_register == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_fetch_pseudo_register invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
- gdbarch->fetch_pseudo_register (regnum);
-}
-
-void
-set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch,
- gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register)
-{
- gdbarch->fetch_pseudo_register = fetch_pseudo_register;
-}
-
-int
-gdbarch_store_pseudo_register_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- return gdbarch->store_pseudo_register != 0;
-}
-
-void
-gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->store_pseudo_register == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_store_pseudo_register invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
- gdbarch->store_pseudo_register (regnum);
-}
-
-void
-set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch,
- gdbarch_store_pseudo_register_ftype store_pseudo_register)
-{
- gdbarch->store_pseudo_register = store_pseudo_register;
-}
-
CORE_ADDR
gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
{
#endif
#endif
-extern int gdbarch_register_read_p (struct gdbarch *gdbarch);
+extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch);
-typedef void (gdbarch_register_read_ftype) (struct gdbarch *gdbarch, int regnum, char *buf);
-extern void gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf);
-extern void set_gdbarch_register_read (struct gdbarch *gdbarch, gdbarch_register_read_ftype *register_read);
+typedef void (gdbarch_pseudo_register_read_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
+extern void gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf);
+extern void set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, gdbarch_pseudo_register_read_ftype *pseudo_register_read);
-extern int gdbarch_register_write_p (struct gdbarch *gdbarch);
+extern int gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch);
-typedef void (gdbarch_register_write_ftype) (struct gdbarch *gdbarch, int regnum, char *buf);
-extern void gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf);
-extern void set_gdbarch_register_write (struct gdbarch *gdbarch, gdbarch_register_write_ftype *register_write);
+typedef void (gdbarch_pseudo_register_write_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
+extern void gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf);
+extern void set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype *pseudo_register_write);
extern int gdbarch_num_regs (struct gdbarch *gdbarch);
extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
#endif
#endif
-/* This function is called when the value of a pseudo-register needs to
- be updated. Typically it will be defined on a per-architecture
- basis. */
-
-#if defined (FETCH_PSEUDO_REGISTER)
-/* Legacy for systems yet to multi-arch FETCH_PSEUDO_REGISTER */
-#if !defined (FETCH_PSEUDO_REGISTER_P)
-#define FETCH_PSEUDO_REGISTER_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (FETCH_PSEUDO_REGISTER_P)
-#define FETCH_PSEUDO_REGISTER_P() (0)
-#endif
-
-extern int gdbarch_fetch_pseudo_register_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_PSEUDO_REGISTER_P)
-#error "Non multi-arch definition of FETCH_PSEUDO_REGISTER"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_PSEUDO_REGISTER_P)
-#define FETCH_PSEUDO_REGISTER_P() (gdbarch_fetch_pseudo_register_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (FETCH_PSEUDO_REGISTER)
-#define FETCH_PSEUDO_REGISTER(regnum) (internal_error (__FILE__, __LINE__, "FETCH_PSEUDO_REGISTER"), 0)
-#endif
-
-typedef void (gdbarch_fetch_pseudo_register_ftype) (int regnum);
-extern void gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum);
-extern void set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_PSEUDO_REGISTER)
-#error "Non multi-arch definition of FETCH_PSEUDO_REGISTER"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_PSEUDO_REGISTER)
-#define FETCH_PSEUDO_REGISTER(regnum) (gdbarch_fetch_pseudo_register (current_gdbarch, regnum))
-#endif
-#endif
-
-/* This function is called when the value of a pseudo-register needs to
- be set or stored. Typically it will be defined on a
- per-architecture basis. */
-
-#if defined (STORE_PSEUDO_REGISTER)
-/* Legacy for systems yet to multi-arch STORE_PSEUDO_REGISTER */
-#if !defined (STORE_PSEUDO_REGISTER_P)
-#define STORE_PSEUDO_REGISTER_P() (1)
-#endif
-#endif
-
-/* Default predicate for non- multi-arch targets. */
-#if (!GDB_MULTI_ARCH) && !defined (STORE_PSEUDO_REGISTER_P)
-#define STORE_PSEUDO_REGISTER_P() (0)
-#endif
-
-extern int gdbarch_store_pseudo_register_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_PSEUDO_REGISTER_P)
-#error "Non multi-arch definition of STORE_PSEUDO_REGISTER"
-#endif
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_PSEUDO_REGISTER_P)
-#define STORE_PSEUDO_REGISTER_P() (gdbarch_store_pseudo_register_p (current_gdbarch))
-#endif
-
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (STORE_PSEUDO_REGISTER)
-#define STORE_PSEUDO_REGISTER(regnum) (internal_error (__FILE__, __LINE__, "STORE_PSEUDO_REGISTER"), 0)
-#endif
-
-typedef void (gdbarch_store_pseudo_register_ftype) (int regnum);
-extern void gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum);
-extern void set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch, gdbarch_store_pseudo_register_ftype *store_pseudo_register);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_PSEUDO_REGISTER)
-#error "Non multi-arch definition of STORE_PSEUDO_REGISTER"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_PSEUDO_REGISTER)
-#define STORE_PSEUDO_REGISTER(regnum) (gdbarch_store_pseudo_register (current_gdbarch, regnum))
-#endif
-#endif
-
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS)
#define POINTER_TO_ADDRESS(type, buf) (unsigned_pointer_to_address (type, buf))
# serious shakedown.
f::TARGET_VIRTUAL_FRAME_POINTER:void:virtual_frame_pointer:CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset:pc, frame_regnum, frame_offset::0:legacy_virtual_frame_pointer::0
#
-M:::void:register_read:int regnum, char *buf:regnum, buf:
-M:::void:register_write:int regnum, char *buf:regnum, buf:
+M:::void:pseudo_register_read:struct regcache *regcache, int cookednum, void *buf:regcache, cookednum, buf:
+M:::void:pseudo_register_write:struct regcache *regcache, int cookednum, const void *buf:regcache, cookednum, buf:
#
v:2:NUM_REGS:int:num_regs::::0:-1
# This macro gives the number of pseudo-registers that live in the
f:1:CONVERT_REGISTER_P:int:convert_register_p:int regnum:regnum::0:legacy_convert_register_p::0
f:1:REGISTER_TO_VALUE:void:register_to_value:int regnum, struct type *type, char *from, char *to:regnum, type, from, to::0:legacy_register_to_value::0
f:1:VALUE_TO_REGISTER:void:value_to_register:struct type *type, int regnum, char *from, char *to:type, regnum, from, to::0:legacy_value_to_register::0
-# This function is called when the value of a pseudo-register needs to
-# be updated. Typically it will be defined on a per-architecture
-# basis.
-F:2:FETCH_PSEUDO_REGISTER:void:fetch_pseudo_register:int regnum:regnum:
-# This function is called when the value of a pseudo-register needs to
-# be set or stored. Typically it will be defined on a
-# per-architecture basis.
-F:2:STORE_PSEUDO_REGISTER:void:store_pseudo_register:int regnum:regnum:
#
f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, void *buf:type, buf:::unsigned_pointer_to_address::0
f:2:ADDRESS_TO_POINTER:void:address_to_pointer:struct type *type, void *buf, CORE_ADDR addr:type, buf, addr:::unsigned_address_to_pointer::0
#include "floatformat.h"
#include "gdb_assert.h"
+#include "gdb_string.h"
#include "gdb-events.h"
/* Static function declarations */
return
end
-dir @srcdir@
-dir .
dir @srcdir@/../mmalloc
dir @srcdir@/../libiberty
dir @srcdir@/../bfd
+dir @srcdir@
+dir .
set prompt (top-gdb)
## This is ugly, but I don't want GNU make to put these variables in
## the environment. Older makes will see this as a set of targets
## with no dependencies and no actions.
-unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
+# OBSOLETE unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
gdb_proc_service_h = $(srcdir)/../gdb_proc_service.h $(srcdir)/../gregset.h
regdat_sh = $(srcdir)/../regformats/regdat.sh
/* Define if you have the <thread_db.h> header file. */
#undef HAVE_THREAD_DB_H
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
/* Define if <sys/procfs.h> has lwpid_t. */
#undef HAVE_LWPID_T
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:541: checking for $ac_word" >&5
+echo "configure:530: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:571: checking for $ac_word" >&5
+echo "configure:560: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:622: checking for $ac_word" >&5
+echo "configure:611: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:654: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:643: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cat > conftest.$ac_ext << EOF
-#line 665 "configure"
+#line 654 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:696: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:685: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:701: checking whether we are using GNU C" >&5
+echo "configure:690: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:729: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:718: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:808: checking host system type" >&5
+echo "configure:797: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:829: checking target system type" >&5
+echo "configure:818: checking target system type" >&5
target_alias=$target
case "$target_alias" in
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:847: checking build system type" >&5
+echo "configure:836: checking build system type" >&5
build_alias=$build
case "$build_alias" in
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:882: checking for a BSD compatible install" >&5
+echo "configure:871: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:936: checking how to run the C preprocessor" >&5
+echo "configure:925: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 951 "configure"
+#line 940 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 968 "configure"
+#line 957 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 985 "configure"
+#line 974 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1016: checking for ANSI C header files" >&5
+echo "configure:1005: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1021 "configure"
+#line 1010 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1046 "configure"
+#line 1035 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1064 "configure"
+#line 1053 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1085 "configure"
+#line 1074 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:1096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
-for ac_hdr in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h thread_db.h linux/elf.h
+for ac_hdr in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h thread_db.h linux/elf.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1124: checking for $ac_hdr" >&5
+echo "configure:1113: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1129 "configure"
+#line 1118 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test "${srv_linux_regsets}" = "yes"; then
echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:1172: checking for PTRACE_GETREGS" >&5
+echo "configure:1161: checking for PTRACE_GETREGS" >&5
if eval "test \"`echo '$''{'gdbsrv_cv_have_ptrace_getregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1177 "configure"
+#line 1166 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETREGS;
; return 0; }
EOF
-if { (eval echo configure:1184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdbsrv_cv_have_ptrace_getregs=yes
else
fi
echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:1205: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:1194: checking for PTRACE_GETFPXREGS" >&5
if eval "test \"`echo '$''{'gdbsrv_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1210 "configure"
+#line 1199 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETFPXREGS;
; return 0; }
EOF
-if { (eval echo configure:1217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdbsrv_cv_have_ptrace_getfpxregs=yes
else
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:1240: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:1229: checking for lwpid_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1245 "configure"
+#line 1234 "configure"
#include "confdefs.h"
#define _SYSCALL32
lwpid_t avar
; return 0; }
EOF
-if { (eval echo configure:1254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpid_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:1276: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:1265: checking for psaddr_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1281 "configure"
+#line 1270 "configure"
#include "confdefs.h"
#define _SYSCALL32
psaddr_t avar
; return 0; }
EOF
-if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psaddr_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:1312: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:1301: checking for prgregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1317 "configure"
+#line 1306 "configure"
#include "confdefs.h"
#define _SYSCALL32
prgregset_t avar
; return 0; }
EOF
-if { (eval echo configure:1326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset_t=yes
else
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:1348: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:1337: checking for prfpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1353 "configure"
+#line 1342 "configure"
#include "confdefs.h"
#define _SYSCALL32
prfpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:1362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset_t=yes
else
if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:1388: checking whether prfpregset_t type is broken" >&5
+echo "configure:1377: checking whether prfpregset_t type is broken" >&5
if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 1396 "configure"
+#line 1385 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main ()
return 0;
}
EOF
-if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_prfpregset_t_broken=no
else
fi
echo $ac_n "checking for elf_fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:1430: checking for elf_fpregset_t in sys/procfs.h" >&5
+echo "configure:1419: checking for elf_fpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_elf_fpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1435 "configure"
+#line 1424 "configure"
#include "confdefs.h"
#define _SYSCALL32
elf_fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:1444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
else
if test "$srv_linux_thread_db" = "yes"; then
echo $ac_n "checking for libthread_db""... $ac_c" 1>&6
-echo "configure:1473: checking for libthread_db" >&5
+echo "configure:1462: checking for libthread_db" >&5
if eval "test \"`echo '$''{'srv_cv_thread_db'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
old_LIBS="$LIBS"
LIBS="$LIBS -lthread_db"
cat > conftest.$ac_ext <<EOF
-#line 1480 "configure"
+#line 1469 "configure"
#include "confdefs.h"
void ps_pglobal_lookup() {}
void ps_pdread() {}
td_ta_new();
; return 0; }
EOF
-if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
srv_cv_thread_db="-lthread_db"
else
fi
LIBS="$old_LIBS `eval echo "$thread_db"`"
cat > conftest.$ac_ext <<EOF
-#line 1510 "configure"
+#line 1499 "configure"
#include "confdefs.h"
void ps_pglobal_lookup() {}
void ps_pdread() {}
td_ta_new();
; return 0; }
EOF
-if { (eval echo configure:1524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
srv_cv_thread_db="$thread_db"
else
AC_HEADER_STDC
AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
- proc_service.h sys/procfs.h thread_db.h linux/elf.h)
+ proc_service.h sys/procfs.h thread_db.h linux/elf.h unistd.h)
. ${srcdir}/configure.srv
|| (TYPE_CODE (t) == TYPE_CODE_BOOL)));
}
-/* Chill varying string and arrays are represented as follows:
+/* (OBSOLETE) Chill (OBSOLETE) varying string and arrays are
+ represented as follows:
struct { int __var_length; ELEMENT_TYPE[MAX_SIZE] __var_data};
- Return true if TYPE is such a Chill varying type. */
-
-int
-chill_varying_type (struct type *type)
-{
- if (TYPE_CODE (type) != TYPE_CODE_STRUCT
- || TYPE_NFIELDS (type) != 2
- || strcmp (TYPE_FIELD_NAME (type, 0), "__var_length") != 0)
- return 0;
- return 1;
-}
+ Return true if TYPE is such a (OBSOLETE) Chill (OBSOLETE) varying
+ type. */
+
+/* OBSOLETE int */
+/* OBSOLETE chill_varying_type (struct type *type) */
+/* OBSOLETE { */
+/* OBSOLETE if (TYPE_CODE (type) != TYPE_CODE_STRUCT */
+/* OBSOLETE || TYPE_NFIELDS (type) != 2 */
+/* OBSOLETE || strcmp (TYPE_FIELD_NAME (type, 0), "__var_length") != 0) */
+/* OBSOLETE return 0; */
+/* OBSOLETE return 1; */
+/* OBSOLETE } */
/* Check whether BASE is an ancestor or base class or DCLASS
Return 1 if so, and 0 if not.
TYPE_CODE_RANGE, /* Range (integers within spec'd bounds) */
/* A string type which is like an array of character but prints
- differently (at least for CHILL). It does not contain a length
- field as Pascal strings (for many Pascals, anyway) do; if we want
- to deal with such strings, we should use a new type code. */
+ differently (at least for (OBSOLETE) CHILL (OBSOLETE)). It
+ does not contain a length field as Pascal strings (for many
+ Pascals, anyway) do; if we want to deal with such strings, we
+ should use a new type code. */
TYPE_CODE_STRING,
- /* String of bits; like TYPE_CODE_SET but prints differently (at least
- for CHILL). */
+ /* String of bits; like TYPE_CODE_SET but prints differently (at
+ least for (OBSOLETE) CHILL (OBSOLETE)). */
TYPE_CODE_BITSTRING,
/* Unknown type. The length field is valid if we were able to
extern struct type *builtin_type_m2_real;
extern struct type *builtin_type_m2_bool;
-/* Chill types */
+/* OBSOLETE Chill types */
-extern struct type *builtin_type_chill_bool;
-extern struct type *builtin_type_chill_char;
-extern struct type *builtin_type_chill_long;
-extern struct type *builtin_type_chill_ulong;
-extern struct type *builtin_type_chill_real;
+/* OBSOLETE extern struct type *builtin_type_chill_bool; */
+/* OBSOLETE extern struct type *builtin_type_chill_char; */
+/* OBSOLETE extern struct type *builtin_type_chill_long; */
+/* OBSOLETE extern struct type *builtin_type_chill_ulong; */
+/* OBSOLETE extern struct type *builtin_type_chill_real; */
/* Fortran (F77) types */
extern struct type *create_set_type (struct type *, struct type *);
-extern int chill_varying_type (struct type *);
+/* OBSOLETE extern int chill_varying_type (struct type *); */
extern struct type *lookup_unsigned_typename (char *);
#include "cp-abi.h"
#include "demangle.h"
#include "gdb_assert.h"
+#include "gdb_string.h"
static struct cp_abi_ops gnu_v3_abi_ops;
#include "defs.h"
#include "frame.h"
-#include "obstack.h"
#include "symtab.h"
#include "dis-asm.h"
#include "gdbcmd.h"
#include "defs.h"
#include "frame.h"
-#include "obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
list = new;
list->field.name = VT (objfile) + fn_fieldp->dsvar.name;
- FIELD_BITSIZE (list->field) = -1; /* indicates static member */
SET_FIELD_PHYSNAME (list->field, 0); /* initialize to empty */
memtype = hpread_type_lookup (fn_fieldp->dsvar.type, objfile);
its contents to the desired type. This is probably not
exactly how it would happen on the target itself, but it is
the best we can do. */
- regcache_read (regcache, FP0_REGNUM, buf);
+ regcache_raw_read (regcache, FP0_REGNUM, buf);
convert_typed_floating (buf, builtin_type_i387_ext, valbuf, type);
}
else
if (len <= low_size)
{
- regcache_read (regcache, LOW_RETURN_REGNUM, buf);
+ regcache_raw_read (regcache, LOW_RETURN_REGNUM, buf);
memcpy (valbuf, buf, len);
}
else if (len <= (low_size + high_size))
{
- regcache_read (regcache, LOW_RETURN_REGNUM, buf);
+ regcache_raw_read (regcache, LOW_RETURN_REGNUM, buf);
memcpy (valbuf, buf, low_size);
- regcache_read (regcache, HIGH_RETURN_REGNUM, buf);
+ regcache_raw_read (regcache, HIGH_RETURN_REGNUM, buf);
memcpy (valbuf + low_size, buf, len - low_size);
}
else
static CORE_ADDR
i386_extract_struct_value_address (struct regcache *regcache)
{
- return regcache_read_as_address (regcache, LOW_RETURN_REGNUM);
+ return regcache_raw_read_as_address (regcache, LOW_RETURN_REGNUM);
}
\f
#include "gdbcore.h"
#include "inferior.h"
#include "regcache.h"
+#include "gdb_string.h"
static CORE_ADDR next_insn (CORE_ADDR memaddr,
unsigned int *pword1, unsigned int *pword2);
int size = REGISTER_RAW_SIZE (regno);
void *buf = alloca (size);
store_signed_integer (buf, size, val);
- regcache_write (inf_status->registers, regno, buf);
+ regcache_raw_write (inf_status->registers, regno, buf);
}
/* Save all of the information associated with the inferior<==>gdb
/* Native support for the SGI Iris running IRIX version 5, for GDB.
Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
- 1999, 2000, 2001 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
Implemented for Irix 4.x by Garrett A. Wollman.
registers_fetched ();
}
-\f
-/* Irix 5 uses what appears to be a unique form of shared library
- support. This is a copy of solib.c modified for Irix 5. */
-/* FIXME: Most of this code could be merged with osfsolib.c and solib.c
- by using next_link_map_member and xfer_link_map_member in solib.c. */
-
-#include <sys/types.h>
-#include <signal.h>
-#include <sys/param.h>
-#include <fcntl.h>
-
-/* <obj.h> includes <sym.h> and <symconst.h>, which causes conflicts
- with our versions of those files included by tm-mips.h. Prevent
- <obj.h> from including them with some appropriate defines. */
-#define __SYM_H__
-#define __SYMCONST_H__
-#include <obj.h>
-#ifdef HAVE_OBJLIST_H
-#include <objlist.h>
-#endif
-
-#ifdef NEW_OBJ_INFO_MAGIC
-#define HANDLE_NEW_OBJ_LIST
-#endif
-
-#include "symtab.h"
-#include "bfd.h"
-#include "symfile.h"
-#include "objfiles.h"
-#include "command.h"
-#include "frame.h"
-#include "gdb_regex.h"
-#include "inferior.h"
-#include "language.h"
-#include "gdbcmd.h"
-
-/* The symbol which starts off the list of shared libraries. */
-#define DEBUG_BASE "__rld_obj_head"
-
-/* Irix 6.x introduces a new variant of object lists.
- To be able to debug O32 executables under Irix 6, we have to handle both
- variants. */
-
-typedef enum
-{
- OBJ_LIST_OLD, /* Pre Irix 6.x object list. */
- OBJ_LIST_32, /* 32 Bit Elf32_Obj_Info. */
- OBJ_LIST_64 /* 64 Bit Elf64_Obj_Info, FIXME not yet implemented. */
-}
-obj_list_variant;
-
-/* Define our own link_map structure.
- This will help to share code with osfsolib.c and solib.c. */
-
-struct link_map
- {
- obj_list_variant l_variant; /* which variant of object list */
- CORE_ADDR l_lladdr; /* addr in inferior list was read from */
- CORE_ADDR l_next; /* address of next object list entry */
- };
-
-/* Irix 5 shared objects are pre-linked to particular addresses
- although the dynamic linker may have to relocate them if the
- address ranges of the libraries used by the main program clash.
- The offset is the difference between the address where the object
- is mapped and the binding address of the shared library. */
-#define LM_OFFSET(so) ((so) -> offset)
-/* Loaded address of shared library. */
-#define LM_ADDR(so) ((so) -> lmstart)
-
-char shadow_contents[BREAKPOINT_MAX]; /* Stash old bkpt addr contents */
-
-struct so_list
- {
- struct so_list *next; /* next structure in linked list */
- struct link_map lm;
- CORE_ADDR offset; /* prelink to load address offset */
- char *so_name; /* shared object lib name */
- CORE_ADDR lmstart; /* lower addr bound of mapped object */
- CORE_ADDR lmend; /* upper addr bound of mapped object */
- char symbols_loaded; /* flag: symbols read in yet? */
- char from_tty; /* flag: print msgs? */
- struct objfile *objfile; /* objfile for loaded lib */
- struct section_table *sections;
- struct section_table *sections_end;
- struct section_table *textsection;
- bfd *abfd;
- };
-
-static struct so_list *so_list_head; /* List of known shared objects */
-static CORE_ADDR debug_base; /* Base of dynamic linker structures */
-static CORE_ADDR breakpoint_addr; /* Address where end bkpt is set */
-
-/* Local function prototypes */
-
-static void sharedlibrary_command (char *, int);
-
-static int enable_break (void);
-
-static int disable_break (void);
-
-static void info_sharedlibrary_command (char *, int);
-
-static int symbol_add_stub (void *);
-
-static struct so_list *find_solib (struct so_list *);
-
-static struct link_map *first_link_map_member (void);
-
-static struct link_map *next_link_map_member (struct so_list *);
-
-static void xfer_link_map_member (struct so_list *, struct link_map *);
-
-static CORE_ADDR locate_base (void);
-
-static int solib_map_sections (void *);
-
-/*
-
- LOCAL FUNCTION
-
- solib_map_sections -- open bfd and build sections for shared lib
-
- SYNOPSIS
-
- static int solib_map_sections (struct so_list *so)
-
- DESCRIPTION
-
- Given a pointer to one of the shared objects in our list
- of mapped objects, use the recorded name to open a bfd
- descriptor for the object, build a section table, and then
- relocate all the section addresses by the base address at
- which the shared object was mapped.
-
- FIXMES
-
- In most (all?) cases the shared object file name recorded in the
- dynamic linkage tables will be a fully qualified pathname. For
- cases where it isn't, do we really mimic the systems search
- mechanism correctly in the below code (particularly the tilde
- expansion stuff?).
- */
-
-static int
-solib_map_sections (void *arg)
-{
- struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */
- char *filename;
- char *scratch_pathname;
- int scratch_chan;
- struct section_table *p;
- struct cleanup *old_chain;
- bfd *abfd;
-
- filename = tilde_expand (so->so_name);
- old_chain = make_cleanup (xfree, filename);
-
- scratch_chan = openp (getenv ("PATH"), 1, filename, O_RDONLY, 0,
- &scratch_pathname);
- if (scratch_chan < 0)
- {
- scratch_chan = openp (getenv ("LD_LIBRARY_PATH"), 1, filename,
- O_RDONLY, 0, &scratch_pathname);
- }
- if (scratch_chan < 0)
- {
- perror_with_name (filename);
- }
- /* Leave scratch_pathname allocated. abfd->name will point to it. */
-
- abfd = bfd_fdopenr (scratch_pathname, gnutarget, scratch_chan);
- if (!abfd)
- {
- close (scratch_chan);
- error ("Could not open `%s' as an executable file: %s",
- scratch_pathname, bfd_errmsg (bfd_get_error ()));
- }
- /* Leave bfd open, core_xfer_memory and "info files" need it. */
- so->abfd = abfd;
- abfd->cacheable = 1;
-
- if (!bfd_check_format (abfd, bfd_object))
- {
- error ("\"%s\": not in executable format: %s.",
- scratch_pathname, bfd_errmsg (bfd_get_error ()));
- }
- if (build_section_table (abfd, &so->sections, &so->sections_end))
- {
- error ("Can't find the file sections in `%s': %s",
- bfd_get_filename (exec_bfd), bfd_errmsg (bfd_get_error ()));
- }
-
- for (p = so->sections; p < so->sections_end; p++)
- {
- /* Relocate the section binding addresses as recorded in the shared
- object's file by the offset to get the address to which the
- object was actually mapped. */
- p->addr += LM_OFFSET (so);
- p->endaddr += LM_OFFSET (so);
- so->lmend = (CORE_ADDR) max (p->endaddr, so->lmend);
- if (STREQ (p->the_bfd_section->name, ".text"))
- {
- so->textsection = p;
- }
- }
-
- /* Free the file names, close the file now. */
- do_cleanups (old_chain);
-
- /* must be non-zero */
- return (1);
-}
-
-/*
-
- LOCAL FUNCTION
-
- locate_base -- locate the base address of dynamic linker structs
-
- SYNOPSIS
-
- CORE_ADDR locate_base (void)
-
- DESCRIPTION
-
- For both the SunOS and SVR4 shared library implementations, if the
- inferior executable has been linked dynamically, there is a single
- address somewhere in the inferior's data space which is the key to
- locating all of the dynamic linker's runtime structures. This
- address is the value of the symbol defined by the macro DEBUG_BASE.
- The job of this function is to find and return that address, or to
- return 0 if there is no such address (the executable is statically
- linked for example).
-
- For SunOS, the job is almost trivial, since the dynamic linker and
- all of it's structures are statically linked to the executable at
- link time. Thus the symbol for the address we are looking for has
- already been added to the minimal symbol table for the executable's
- objfile at the time the symbol file's symbols were read, and all we
- have to do is look it up there. Note that we explicitly do NOT want
- to find the copies in the shared library.
-
- The SVR4 version is much more complicated because the dynamic linker
- and it's structures are located in the shared C library, which gets
- run as the executable's "interpreter" by the kernel. We have to go
- to a lot more work to discover the address of DEBUG_BASE. Because
- of this complexity, we cache the value we find and return that value
- on subsequent invocations. Note there is no copy in the executable
- symbol tables.
-
- Irix 5 is basically like SunOS.
-
- Note that we can assume nothing about the process state at the time
- we need to find this address. We may be stopped on the first instruc-
- tion of the interpreter (C shared library), the first instruction of
- the executable itself, or somewhere else entirely (if we attached
- to the process for example).
-
- */
-
-static CORE_ADDR
-locate_base (void)
-{
- struct minimal_symbol *msymbol;
- CORE_ADDR address = 0;
-
- msymbol = lookup_minimal_symbol (DEBUG_BASE, NULL, symfile_objfile);
- if ((msymbol != NULL) && (SYMBOL_VALUE_ADDRESS (msymbol) != 0))
- {
- address = SYMBOL_VALUE_ADDRESS (msymbol);
- }
- return (address);
-}
-
-/*
-
- LOCAL FUNCTION
-
- first_link_map_member -- locate first member in dynamic linker's map
-
- SYNOPSIS
-
- static struct link_map *first_link_map_member (void)
-
- DESCRIPTION
-
- Read in a copy of the first member in the inferior's dynamic
- link map from the inferior's dynamic linker structures, and return
- a pointer to the link map descriptor.
- */
-
-static struct link_map *
-first_link_map_member (void)
-{
- struct obj_list *listp;
- struct obj_list list_old;
- struct link_map *lm;
- static struct link_map first_lm;
- CORE_ADDR lladdr;
- CORE_ADDR next_lladdr;
-
- /* We have not already read in the dynamic linking structures
- from the inferior, lookup the address of the base structure. */
- debug_base = locate_base ();
- if (debug_base == 0)
- return NULL;
-
- /* Get address of first list entry. */
- read_memory (debug_base, (char *) &listp, sizeof (struct obj_list *));
-
- if (listp == NULL)
- return NULL;
-
- /* Get first list entry. */
- /* The MIPS Sign extends addresses. */
- lladdr = host_pointer_to_address (listp);
- read_memory (lladdr, (char *) &list_old, sizeof (struct obj_list));
-
- /* The first entry in the list is the object file we are debugging,
- so skip it. */
- next_lladdr = host_pointer_to_address (list_old.next);
-
-#ifdef HANDLE_NEW_OBJ_LIST
- if (list_old.data == NEW_OBJ_INFO_MAGIC)
- {
- Elf32_Obj_Info list_32;
-
- read_memory (lladdr, (char *) &list_32, sizeof (Elf32_Obj_Info));
- if (list_32.oi_size != sizeof (Elf32_Obj_Info))
- return NULL;
- next_lladdr = (CORE_ADDR) list_32.oi_next;
- }
-#endif
-
- if (next_lladdr == 0)
- return NULL;
-
- first_lm.l_lladdr = next_lladdr;
- lm = &first_lm;
- return lm;
-}
-
-/*
-
- LOCAL FUNCTION
-
- next_link_map_member -- locate next member in dynamic linker's map
-
- SYNOPSIS
-
- static struct link_map *next_link_map_member (so_list_ptr)
-
- DESCRIPTION
-
- Read in a copy of the next member in the inferior's dynamic
- link map from the inferior's dynamic linker structures, and return
- a pointer to the link map descriptor.
- */
-
-static struct link_map *
-next_link_map_member (struct so_list *so_list_ptr)
-{
- struct link_map *lm = &so_list_ptr->lm;
- CORE_ADDR next_lladdr = lm->l_next;
- static struct link_map next_lm;
-
- if (next_lladdr == 0)
- {
- /* We have hit the end of the list, so check to see if any were
- added, but be quiet if we can't read from the target any more. */
- int status = 0;
-
- if (lm->l_variant == OBJ_LIST_OLD)
- {
- struct obj_list list_old;
-
- status = target_read_memory (lm->l_lladdr,
- (char *) &list_old,
- sizeof (struct obj_list));
- next_lladdr = host_pointer_to_address (list_old.next);
- }
-#ifdef HANDLE_NEW_OBJ_LIST
- else if (lm->l_variant == OBJ_LIST_32)
- {
- Elf32_Obj_Info list_32;
- status = target_read_memory (lm->l_lladdr,
- (char *) &list_32,
- sizeof (Elf32_Obj_Info));
- next_lladdr = (CORE_ADDR) list_32.oi_next;
- }
-#endif
-
- if (status != 0 || next_lladdr == 0)
- return NULL;
- }
-
- next_lm.l_lladdr = next_lladdr;
- lm = &next_lm;
- return lm;
-}
-
-/*
-
- LOCAL FUNCTION
-
- xfer_link_map_member -- set local variables from dynamic linker's map
-
- SYNOPSIS
-
- static void xfer_link_map_member (so_list_ptr, lm)
-
- DESCRIPTION
-
- Read in a copy of the requested member in the inferior's dynamic
- link map from the inferior's dynamic linker structures, and fill
- in the necessary so_list_ptr elements.
- */
-
-static void
-xfer_link_map_member (struct so_list *so_list_ptr, struct link_map *lm)
-{
- struct obj_list list_old;
- CORE_ADDR lladdr = lm->l_lladdr;
- struct link_map *new_lm = &so_list_ptr->lm;
- int errcode;
-
- read_memory (lladdr, (char *) &list_old, sizeof (struct obj_list));
-
- new_lm->l_variant = OBJ_LIST_OLD;
- new_lm->l_lladdr = lladdr;
- new_lm->l_next = host_pointer_to_address (list_old.next);
-
-#ifdef HANDLE_NEW_OBJ_LIST
- if (list_old.data == NEW_OBJ_INFO_MAGIC)
- {
- Elf32_Obj_Info list_32;
-
- read_memory (lladdr, (char *) &list_32, sizeof (Elf32_Obj_Info));
- if (list_32.oi_size != sizeof (Elf32_Obj_Info))
- return;
- new_lm->l_variant = OBJ_LIST_32;
- new_lm->l_next = (CORE_ADDR) list_32.oi_next;
-
- target_read_string ((CORE_ADDR) list_32.oi_pathname,
- &so_list_ptr->so_name,
- list_32.oi_pathname_len + 1, &errcode);
- if (errcode != 0)
- memory_error (errcode, (CORE_ADDR) list_32.oi_pathname);
-
- LM_ADDR (so_list_ptr) = (CORE_ADDR) list_32.oi_ehdr;
- LM_OFFSET (so_list_ptr) =
- (CORE_ADDR) list_32.oi_ehdr - (CORE_ADDR) list_32.oi_orig_ehdr;
- }
- else
-#endif
- {
-#if defined (_MIPS_SIM_NABI32) && _MIPS_SIM == _MIPS_SIM_NABI32
- /* If we are compiling GDB under N32 ABI, the alignments in
- the obj struct are different from the O32 ABI and we will get
- wrong values when accessing the struct.
- As a workaround we use fixed values which are good for
- Irix 6.2. */
- char buf[432];
-
- read_memory ((CORE_ADDR) list_old.data, buf, sizeof (buf));
-
- target_read_string (extract_address (&buf[236], 4),
- &so_list_ptr->so_name,
- INT_MAX, &errcode);
- if (errcode != 0)
- memory_error (errcode, extract_address (&buf[236], 4));
-
- LM_ADDR (so_list_ptr) = extract_address (&buf[196], 4);
- LM_OFFSET (so_list_ptr) =
- extract_address (&buf[196], 4) - extract_address (&buf[248], 4);
-#else
- struct obj obj_old;
-
- read_memory ((CORE_ADDR) list_old.data, (char *) &obj_old,
- sizeof (struct obj));
-
- target_read_string ((CORE_ADDR) obj_old.o_path,
- &so_list_ptr->so_name,
- INT_MAX, &errcode);
- if (errcode != 0)
- memory_error (errcode, (CORE_ADDR) obj_old.o_path);
-
- LM_ADDR (so_list_ptr) = (CORE_ADDR) obj_old.o_praw;
- LM_OFFSET (so_list_ptr) =
- (CORE_ADDR) obj_old.o_praw - obj_old.o_base_address;
-#endif
- }
-
- catch_errors (solib_map_sections, (char *) so_list_ptr,
- "Error while mapping shared library sections:\n",
- RETURN_MASK_ALL);
-}
-
-
-/*
-
- LOCAL FUNCTION
-
- find_solib -- step through list of shared objects
-
- SYNOPSIS
-
- struct so_list *find_solib (struct so_list *so_list_ptr)
-
- DESCRIPTION
-
- This module contains the routine which finds the names of any
- loaded "images" in the current process. The argument in must be
- NULL on the first call, and then the returned value must be passed
- in on subsequent calls. This provides the capability to "step" down
- the list of loaded objects. On the last object, a NULL value is
- returned.
- */
-
-static struct so_list *
-find_solib (struct so_list *so_list_ptr)
-{
- struct so_list *so_list_next = NULL;
- struct link_map *lm = NULL;
- struct so_list *new;
-
- if (so_list_ptr == NULL)
- {
- /* We are setting up for a new scan through the loaded images. */
- if ((so_list_next = so_list_head) == NULL)
- {
- /* Find the first link map list member. */
- lm = first_link_map_member ();
- }
- }
- else
- {
- /* We have been called before, and are in the process of walking
- the shared library list. Advance to the next shared object. */
- lm = next_link_map_member (so_list_ptr);
- so_list_next = so_list_ptr->next;
- }
- if ((so_list_next == NULL) && (lm != NULL))
- {
- new = (struct so_list *) xmalloc (sizeof (struct so_list));
- memset ((char *) new, 0, sizeof (struct so_list));
- /* Add the new node as the next node in the list, or as the root
- node if this is the first one. */
- if (so_list_ptr != NULL)
- {
- so_list_ptr->next = new;
- }
- else
- {
- so_list_head = new;
- }
- so_list_next = new;
- xfer_link_map_member (new, lm);
- }
- return (so_list_next);
-}
-
-/* A small stub to get us past the arg-passing pinhole of catch_errors. */
-
-static int
-symbol_add_stub (void *arg)
-{
- register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
- CORE_ADDR text_addr = 0;
- struct section_addr_info section_addrs;
-
- memset (§ion_addrs, 0, sizeof (section_addrs));
- if (so->textsection)
- text_addr = so->textsection->addr;
- else if (so->abfd != NULL)
- {
- asection *lowest_sect;
-
- /* If we didn't find a mapped non zero sized .text section, set up
- text_addr so that the relocation in symbol_file_add does no harm. */
-
- lowest_sect = bfd_get_section_by_name (so->abfd, ".text");
- if (lowest_sect == NULL)
- bfd_map_over_sections (so->abfd, find_lowest_section,
- (PTR) &lowest_sect);
- if (lowest_sect)
- text_addr = bfd_section_vma (so->abfd, lowest_sect) + LM_OFFSET (so);
- }
-
-
- section_addrs.other[0].name = ".text";
- section_addrs.other[0].addr = text_addr;
- so->objfile = symbol_file_add (so->so_name, so->from_tty,
- §ion_addrs, 0, 0);
- /* must be non-zero */
- return (1);
-}
-
-/*
-
- GLOBAL FUNCTION
-
- solib_add -- add a shared library file to the symtab and section list
-
- SYNOPSIS
-
- void solib_add (char *arg_string, int from_tty,
- struct target_ops *target, int readsyms)
-
- DESCRIPTION
-
- */
-
-void
-solib_add (char *arg_string, int from_tty, struct target_ops *target, int readsyms)
-{
- register struct so_list *so = NULL; /* link map state variable */
-
- /* Last shared library that we read. */
- struct so_list *so_last = NULL;
-
- char *re_err;
- int count;
- int old;
-
- if (!readsyms)
- return;
-
- if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL)
- {
- error ("Invalid regexp: %s", re_err);
- }
-
- /* Add the shared library sections to the section table of the
- specified target, if any. */
- if (target)
- {
- /* Count how many new section_table entries there are. */
- so = NULL;
- count = 0;
- while ((so = find_solib (so)) != NULL)
- {
- if (so->so_name[0])
- {
- count += so->sections_end - so->sections;
- }
- }
-
- if (count)
- {
- old = target_resize_to_sections (target, count);
-
- /* Add these section table entries to the target's table. */
- while ((so = find_solib (so)) != NULL)
- {
- if (so->so_name[0])
- {
- count = so->sections_end - so->sections;
- memcpy ((char *) (target->to_sections + old),
- so->sections,
- (sizeof (struct section_table)) * count);
- old += count;
- }
- }
- }
- }
-
- /* Now add the symbol files. */
- while ((so = find_solib (so)) != NULL)
- {
- if (so->so_name[0] && re_exec (so->so_name))
- {
- so->from_tty = from_tty;
- if (so->symbols_loaded)
- {
- if (from_tty)
- {
- printf_unfiltered ("Symbols already loaded for %s\n", so->so_name);
- }
- }
- else if (catch_errors
- (symbol_add_stub, (char *) so,
- "Error while reading shared library symbols:\n",
- RETURN_MASK_ALL))
- {
- so_last = so;
- so->symbols_loaded = 1;
- }
- }
- }
-
- /* Getting new symbols may change our opinion about what is
- frameless. */
- if (so_last)
- reinit_frame_cache ();
-}
-
-/*
-
- LOCAL FUNCTION
-
- info_sharedlibrary_command -- code for "info sharedlibrary"
-
- SYNOPSIS
-
- static void info_sharedlibrary_command ()
-
- DESCRIPTION
-
- Walk through the shared library list and print information
- about each attached library.
- */
-
-static void
-info_sharedlibrary_command (char *ignore, int from_tty)
-{
- register struct so_list *so = NULL; /* link map state variable */
- int header_done = 0;
-
- if (exec_bfd == NULL)
- {
- printf_unfiltered ("No executable file.\n");
- return;
- }
- while ((so = find_solib (so)) != NULL)
- {
- if (so->so_name[0])
- {
- if (!header_done)
- {
- printf_unfiltered ("%-12s%-12s%-12s%s\n", "From", "To", "Syms Read",
- "Shared Object Library");
- header_done++;
- }
- printf_unfiltered ("%-12s",
- local_hex_string_custom ((unsigned long) LM_ADDR (so),
- "08l"));
- printf_unfiltered ("%-12s",
- local_hex_string_custom ((unsigned long) so->lmend,
- "08l"));
- printf_unfiltered ("%-12s", so->symbols_loaded ? "Yes" : "No");
- printf_unfiltered ("%s\n", so->so_name);
- }
- }
- if (so_list_head == NULL)
- {
- printf_unfiltered ("No shared libraries loaded at this time.\n");
- }
-}
-
-/*
-
- GLOBAL FUNCTION
-
- solib_address -- check to see if an address is in a shared lib
-
- SYNOPSIS
-
- char *solib_address (CORE_ADDR address)
-
- DESCRIPTION
-
- Provides a hook for other gdb routines to discover whether or
- not a particular address is within the mapped address space of
- a shared library. Any address between the base mapping address
- and the first address beyond the end of the last mapping, is
- considered to be within the shared library address space, for
- our purposes.
-
- For example, this routine is called at one point to disable
- breakpoints which are in shared libraries that are not currently
- mapped in.
- */
-
-char *
-solib_address (CORE_ADDR address)
-{
- register struct so_list *so = 0; /* link map state variable */
-
- while ((so = find_solib (so)) != NULL)
- {
- if (so->so_name[0])
- {
- if ((address >= (CORE_ADDR) LM_ADDR (so)) &&
- (address < (CORE_ADDR) so->lmend))
- return (so->so_name);
- }
- }
- return (0);
-}
-
-/* Called by free_all_symtabs */
-
-void
-clear_solib (void)
-{
- struct so_list *next;
- char *bfd_filename;
-
- disable_breakpoints_in_shlibs (1);
-
- while (so_list_head)
- {
- if (so_list_head->sections)
- {
- xfree (so_list_head->sections);
- }
- if (so_list_head->abfd)
- {
- remove_target_sections (so_list_head->abfd);
- bfd_filename = bfd_get_filename (so_list_head->abfd);
- if (!bfd_close (so_list_head->abfd))
- warning ("cannot close \"%s\": %s",
- bfd_filename, bfd_errmsg (bfd_get_error ()));
- }
- else
- /* This happens for the executable on SVR4. */
- bfd_filename = NULL;
-
- next = so_list_head->next;
- if (bfd_filename)
- xfree (bfd_filename);
- xfree (so_list_head->so_name);
- xfree (so_list_head);
- so_list_head = next;
- }
- debug_base = 0;
-}
-
-/*
-
- LOCAL FUNCTION
-
- disable_break -- remove the "mapping changed" breakpoint
-
- SYNOPSIS
-
- static int disable_break ()
-
- DESCRIPTION
-
- Removes the breakpoint that gets hit when the dynamic linker
- completes a mapping change.
-
- */
-
-static int
-disable_break (void)
-{
- int status = 1;
-
-
- /* Note that breakpoint address and original contents are in our address
- space, so we just need to write the original contents back. */
-
- if (memory_remove_breakpoint (breakpoint_addr, shadow_contents) != 0)
- {
- status = 0;
- }
-
- /* For the SVR4 version, we always know the breakpoint address. For the
- SunOS version we don't know it until the above code is executed.
- Grumble if we are stopped anywhere besides the breakpoint address. */
-
- if (stop_pc != breakpoint_addr)
- {
- warning ("stopped at unknown breakpoint while handling shared libraries");
- }
-
- return (status);
-}
-
-/*
-
- LOCAL FUNCTION
-
- enable_break -- arrange for dynamic linker to hit breakpoint
-
- SYNOPSIS
-
- int enable_break (void)
-
- DESCRIPTION
-
- This functions inserts a breakpoint at the entry point of the
- main executable, where all shared libraries are mapped in.
- */
-
-static int
-enable_break (void)
-{
- if (symfile_objfile != NULL
- && target_insert_breakpoint (symfile_objfile->ei.entry_point,
- shadow_contents) == 0)
- {
- breakpoint_addr = symfile_objfile->ei.entry_point;
- return 1;
- }
-
- return 0;
-}
-
-/*
-
- GLOBAL FUNCTION
-
- solib_create_inferior_hook -- shared library startup support
-
- SYNOPSIS
-
- void solib_create_inferior_hook()
-
- DESCRIPTION
-
- When gdb starts up the inferior, it nurses it along (through the
- shell) until it is ready to execute it's first instruction. At this
- point, this function gets called via expansion of the macro
- SOLIB_CREATE_INFERIOR_HOOK.
-
- For SunOS executables, this first instruction is typically the
- one at "_start", or a similar text label, regardless of whether
- the executable is statically or dynamically linked. The runtime
- startup code takes care of dynamically linking in any shared
- libraries, once gdb allows the inferior to continue.
-
- For SVR4 executables, this first instruction is either the first
- instruction in the dynamic linker (for dynamically linked
- executables) or the instruction at "start" for statically linked
- executables. For dynamically linked executables, the system
- first exec's /lib/libc.so.N, which contains the dynamic linker,
- and starts it running. The dynamic linker maps in any needed
- shared libraries, maps in the actual user executable, and then
- jumps to "start" in the user executable.
-
- For both SunOS shared libraries, and SVR4 shared libraries, we
- can arrange to cooperate with the dynamic linker to discover the
- names of shared libraries that are dynamically linked, and the
- base addresses to which they are linked.
-
- This function is responsible for discovering those names and
- addresses, and saving sufficient information about them to allow
- their symbols to be read at a later time.
-
- FIXME
-
- Between enable_break() and disable_break(), this code does not
- properly handle hitting breakpoints which the user might have
- set in the startup code or in the dynamic linker itself. Proper
- handling will probably have to wait until the implementation is
- changed to use the "breakpoint handler function" method.
-
- Also, what if child has exit()ed? Must exit loop somehow.
- */
-
-void
-solib_create_inferior_hook (void)
-{
- if (!enable_break ())
- {
- warning ("shared library handler failed to enable breakpoint");
- return;
- }
-
- /* Now run the target. It will eventually hit the breakpoint, at
- which point all of the libraries will have been mapped in and we
- can go groveling around in the dynamic linker structures to find
- out what we need to know about them. */
-
- clear_proceed_status ();
- stop_soon_quietly = 1;
- stop_signal = TARGET_SIGNAL_0;
- do
- {
- target_resume (pid_to_ptid (-1), 0, stop_signal);
- wait_for_inferior ();
- }
- while (stop_signal != TARGET_SIGNAL_TRAP);
-
- /* We are now either at the "mapping complete" breakpoint (or somewhere
- else, a condition we aren't prepared to deal with anyway), so adjust
- the PC as necessary after a breakpoint, disable the breakpoint, and
- add any shared libraries that were mapped in. */
-
- if (DECR_PC_AFTER_BREAK)
- {
- stop_pc -= DECR_PC_AFTER_BREAK;
- write_register (PC_REGNUM, stop_pc);
- }
-
- if (!disable_break ())
- {
- warning ("shared library handler failed to disable breakpoint");
- }
-
- /* solib_add will call reinit_frame_cache.
- But we are stopped in the startup code and we might not have symbols
- for the startup code, so heuristic_proc_start could be called
- and will put out an annoying warning.
- Delaying the resetting of stop_soon_quietly until after symbol loading
- suppresses the warning. */
- solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add);
- stop_soon_quietly = 0;
-}
-
-/*
-
- LOCAL FUNCTION
-
- sharedlibrary_command -- handle command to explicitly add library
-
- SYNOPSIS
-
- static void sharedlibrary_command (char *args, int from_tty)
-
- DESCRIPTION
-
- */
-
-static void
-sharedlibrary_command (char *args, int from_tty)
-{
- dont_repeat ();
- solib_add (args, from_tty, (struct target_ops *) 0, 1);
-}
-
-void
-_initialize_solib (void)
-{
- add_com ("sharedlibrary", class_files, sharedlibrary_command,
- "Load shared object library symbols for files matching REGEXP.");
- add_info ("sharedlibrary", info_sharedlibrary_command,
- "Status of loaded shared object libraries.");
-
- add_show_from_set
- (add_set_cmd ("auto-solib-add", class_support, var_boolean,
- (char *) &auto_solib_add,
- "Set autoloading of shared library symbols.\n\
-If \"on\", symbols from all shared object libraries will be loaded\n\
-automatically when the inferior begins execution, when the dynamic linker\n\
-informs gdb that a new library has been loaded, or when attaching to the\n\
-inferior. Otherwise, symbols must be loaded manually, using `sharedlibrary'.",
- &setlist),
- &showlist);
-}
-\f
/* Register that we are able to handle irix5 core file formats.
This really is bfd_target_unknown_flavour */
ClassInstanceCreationExpression:
NEW ClassType '(' ArgumentList_opt ')'
- { error ("FIXME - ClassInstanceCreationExpression"); }
+ { internal_error (__FILE__, __LINE__,
+ _("FIXME - ClassInstanceCreationExpression")); }
;
ArgumentList:
ArrayCreationExpression:
NEW PrimitiveType DimExprs Dims_opt
- { error ("FIXME - ArrayCreatiionExpression"); }
+ { internal_error (__FILE__, __LINE__,
+ _("FIXME - ArrayCreationExpression")); }
| NEW ClassOrInterfaceType DimExprs Dims_opt
- { error ("FIXME - ArrayCreatiionExpression"); }
+ { internal_error (__FILE__, __LINE__,
+ _("FIXME - ArrayCreationExpression")); }
;
DimExprs:
MethodInvocation:
Name '(' ArgumentList_opt ')'
- { error ("method invocation not implemented"); }
+ { error (_("Method invocation not implemented")); }
| Primary '.' SimpleName '(' ArgumentList_opt ')'
- { error ("method invocation not implemented"); }
+ { error (_("Method invocation not implemented")); }
| SUPER '.' SimpleName '(' ArgumentList_opt ')'
- { error ("method invocation not implemented"); }
+ { error (_("Method invocation not implemented")); }
;
ArrayAccess:
int i;
int base = expout_ptr - last_exp_size - 3;
if (base < 0 || expout->elts[base+2].opcode != OP_TYPE)
- error ("invalid cast expression");
+ error (_("Invalid cast expression"));
type = expout->elts[base+1].type;
/* Remove the 'Expression' and slide the
UnaryExpressionNotPlusMinus down to replace it. */
return ERROR;
if (n > limit_div_base
|| (n *= base) > limit - c)
- error ("Numeric constant too large.");
+ error (_("Numeric constant too large"));
n += c;
}
if (c == '\\')
c = parse_escape (&lexptr);
else if (c == '\'')
- error ("Empty character constant.");
+ error (_("Empty character constant"));
yylval.typed_val_int.val = c;
yylval.typed_val_int.type = java_char_type;
{
lexptr = tokstart + namelen;
if (lexptr[-1] != '\'')
- error ("Unmatched single quote.");
+ error (_("Unmatched single quote"));
namelen -= 2;
tokstart++;
goto tryname;
}
- error ("Invalid character constant.");
+ error (_("Invalid character constant"));
}
return INTEGER_LITERAL;
memcpy (err_copy, tokstart, p - tokstart);
err_copy[p - tokstart] = 0;
- error ("Invalid number \"%s\".", err_copy);
+ error (_("Invalid number \"%s\""), err_copy);
}
lexptr = p;
return toktype;
} while ((*tokptr != '"') && (*tokptr != '\0'));
if (*tokptr++ != '"')
{
- error ("Unterminated string in expression.");
+ error (_("Unterminated string in expression"));
}
tempbuf[tempbufindex] = '\0'; /* See note above */
yylval.sval.ptr = tempbuf;
if (!(c == '_' || c == '$'
|| (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
/* We must have come across a bad character (e.g. ';'). */
- error ("Invalid character '%c' in expression.", c);
+ error (_("Invalid character '%c' in expression"), c);
/* It's a name. See how long it is. */
namelen = 0;
if (prev_lexptr)
lexptr = prev_lexptr;
- error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
+ if (msg)
+ error (_("%s: near `%s'"), msg, lexptr);
+ else
+ error (_("error in expression, near `%s'"), lexptr);
}
static struct type *
char *tmp = copy_name (name);
struct type *typ = java_lookup_class (tmp);
if (typ == NULL || TYPE_CODE (typ) != TYPE_CODE_STRUCT)
- error ("No class named %s.", tmp);
+ error (_("No class named `%s'"), tmp);
return typ;
}
while (dot_index < name.length && name.ptr[dot_index] != '.')
dot_index++;
}
- error ("unknown type `%.*s'", name.length, name.ptr);
+ error (_("unknown type `%.*s'"), name.length, name.ptr);
}
/* Handle Name in an expression (or LHS).
builtin_type_int);
}
else if (!have_full_symbols () && !have_partial_symbols ())
- error ("No symbol table is loaded. Use the \"file\" command.");
+ error (_("No symbol table is loaded. Use the \"file\" command"));
else
- error ("No symbol \"%s\" in current context.", tmp);
+ error (_("No symbol \"%s\" in current context"), tmp);
}
}
not needed. */
return l1 > l2 ? VALUE_TYPE (v1) : VALUE_TYPE (v2);
break;
- case language_chill:
- error ("Missing Chill support in function binop_result_check."); /*FIXME */
+ /* OBSOLETE case language_chill: */
+ /* OBSOLETE error ("Missing Chill support in function binop_result_check."); */ /*FIXME */
}
internal_error (__FILE__, __LINE__, "failed internal consistency check");
return (struct type *) 0; /* For lint */
case language_m2:
case language_pascal:
return TYPE_CODE (type) != TYPE_CODE_INT ? 0 : 1;
- case language_chill:
- error ("Missing Chill support in function integral_type."); /*FIXME */
+ /* OBSOLETE case language_chill: */
+ /* OBSOLETE error ("Missing Chill support in function integral_type."); *//*FIXME */
default:
error ("Language not supported.");
}
CHECK_TYPEDEF (type);
switch (current_language->la_language)
{
- case language_chill:
+ /* OBSOLETE case language_chill: */
case language_m2:
case language_pascal:
return TYPE_CODE (type) != TYPE_CODE_CHAR ? 0 : 1;
CHECK_TYPEDEF (type);
switch (current_language->la_language)
{
- case language_chill:
+ /* OBSOLETE case language_chill: */
case language_m2:
case language_pascal:
return TYPE_CODE (type) != TYPE_CODE_STRING ? 0 : 1;
{
case language_c:
case language_cplus:
- /* Might be more cleanly handled by having a TYPE_CODE_INT_NOT_BOOL
- for CHILL and such languages, or a TYPE_CODE_INT_OR_BOOL for C. */
+ /* Might be more cleanly handled by having a
+ TYPE_CODE_INT_NOT_BOOL for (OBSOLETE) CHILL and such
+ languages, or a TYPE_CODE_INT_OR_BOOL for C. */
if (TYPE_CODE (type) == TYPE_CODE_INT)
return 1;
default:
return (TYPE_CODE (type) == TYPE_CODE_STRUCT) ||
(TYPE_CODE (type) == TYPE_CODE_SET) ||
(TYPE_CODE (type) == TYPE_CODE_ARRAY);
- case language_chill:
- error ("Missing Chill support in function structured_type."); /*FIXME */
+ /* OBSOLETE case language_chill: */
+ /* OBSOLETE error ("Missing Chill support in function structured_type."); *//*FIXME */
default:
return (0);
}
struct type *type;
switch (current_language->la_language)
{
- case language_chill:
- return builtin_type_chill_bool;
+#if 0
+ /* OBSOLETE case language_chill: */
+ /* OBSOLETE return builtin_type_chill_bool; */
+#endif
case language_fortran:
sym = lookup_symbol ("logical", NULL, VAR_NAMESPACE, NULL, NULL);
if (sym)
}
#endif
-#ifdef _LANG_chill
- case language_chill:
- error ("Missing Chill support in function binop_type_check."); /*FIXME */
+#ifdef _LANG_chill /* OBSOLETE */
+ /* OBSOLETE case language_chill: */
+ /* OBSOLETE error ("Missing Chill support in function binop_type_check."); *//*FIXME */
#endif
}
/* #include "lang_def.h" */
#define _LANG_c
#define _LANG_m2
-#define _LANG_chill
+/* OBSOLETE #define _LANG_chill */
#define _LANG_fortran
#define _LANG_pascal
#include "gdbthread.h" /* for struct thread_info etc. */
#include "elf-bfd.h" /* for elfcore_write_* */
#include "cli/cli-decode.h" /* for add_info */
+#include "gdb_string.h"
/* Function: child_pid_to_exec_file
*
#include "defs.h"
#include "frame.h"
#include "inferior.h"
-#include "obstack.h"
#include "target.h"
#include "value.h"
#include "bfd.h"
#include "defs.h"
#include "frame.h"
-#include "obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcmd.h"
/* Fetch a pseudo register. The 68hc11 soft registers are treated like
pseudo registers. They are located in memory. Translate the register
fetch into a memory read. */
-void
-m68hc11_fetch_pseudo_register (int regno)
+static void
+m68hc11_pseudo_register_read (struct gdbarch *gdbarch,
+ struct regcache *regcache,
+ int regno, void *buf)
{
- char buf[MAX_REGISTER_RAW_SIZE];
-
m68hc11_initialize_register_info ();
/* Fetch a soft register: translate into a memory read. */
{
memset (buf, 0, 2);
}
- supply_register (regno, buf);
}
/* Store a pseudo register. Translate the register store
into a memory write. */
static void
-m68hc11_store_pseudo_register (int regno)
+m68hc11_pseudo_register_write (struct gdbarch *gdbarch,
+ struct regcache *regcache,
+ int regno, const void *buf)
{
m68hc11_initialize_register_info ();
/* Store a soft register: translate into a memory write. */
if (soft_regs[regno].name)
{
- char buf[MAX_REGISTER_RAW_SIZE];
-
- read_register_gen (regno, buf);
- target_write_memory (soft_regs[regno].addr, buf, 2);
+ const int regsize = 2;
+ char *tmp = alloca (regsize);
+ memcpy (tmp, buf, regsize);
+ target_write_memory (soft_regs[regno].addr, tmp, regsize);
}
}
set_gdbarch_register_size (gdbarch, 2);
set_gdbarch_register_bytes (gdbarch, M68HC11_ALL_REGS * 2);
set_gdbarch_register_virtual_type (gdbarch, m68hc11_register_virtual_type);
- set_gdbarch_fetch_pseudo_register (gdbarch, m68hc11_fetch_pseudo_register);
- set_gdbarch_store_pseudo_register (gdbarch, m68hc11_store_pseudo_register);
+ set_gdbarch_pseudo_register_read (gdbarch, m68hc11_pseudo_register_read);
+ set_gdbarch_pseudo_register_write (gdbarch, m68hc11_pseudo_register_write);
set_gdbarch_use_generic_dummy_frames (gdbarch, 1);
set_gdbarch_call_dummy_length (gdbarch, 0);
-/* Native-dependent Motorola 88xxx support for GDB, the GNU Debugger.
- Copyright 1988, 1990, 1991, 1992, 1993, 1995, 1999, 2000, 2001
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "regcache.h"
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/dir.h>
-#include <signal.h>
-#include "gdbcore.h"
-#include <sys/user.h>
-
-#ifndef USER /* added to support BCS ptrace_user */
-#define USER ptrace_user
-#endif
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <sys/file.h>
-#include "gdb_stat.h"
-
-#include "symtab.h"
-#include "setjmp.h"
-#include "value.h"
-
-#ifdef DELTA88
-#include <sys/ptrace.h>
-
-/* define offsets to the pc instruction offsets in ptrace_user struct */
-#define SXIP_OFFSET ((char *)&u.pt_sigframe.sig_sxip - (char *)&u)
-#define SNIP_OFFSET ((char *)&u.pt_sigframe.sig_snip - (char *)&u)
-#define SFIP_OFFSET ((char *)&u.pt_sigframe.sig_sfip - (char *)&u)
-#else
-/* define offsets to the pc instruction offsets in ptrace_user struct */
-#define SXIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sxip - (char *)&u)
-#define SNIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_snip - (char *)&u)
-#define SFIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sfip - (char *)&u)
-#endif
-
-extern int have_symbol_file_p ();
-
-extern jmp_buf stack_jmp;
-
-extern int errno;
-
-void
-fetch_inferior_registers (int regno)
-{
- register unsigned int regaddr;
- char buf[MAX_REGISTER_RAW_SIZE];
- register int i;
-
- struct USER u;
- unsigned int offset;
-
- offset = (char *) &u.pt_r0 - (char *) &u;
- regaddr = offset; /* byte offset to r0; */
-
-/* offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
- for (regno = 0; regno < NUM_REGS; regno++)
- {
- /*regaddr = register_addr (regno, offset); */
- /* 88k enhancement */
-
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
- {
- *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, 0);
- regaddr += sizeof (int);
- }
- supply_register (regno, buf);
- }
- /* now load up registers 36 - 38; special pc registers */
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
- supply_register (SXIP_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
- supply_register (SNIP_REGNUM, buf);
- *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
- supply_register (SFIP_REGNUM, buf);
-}
-
-/* Store our register values back into the inferior.
- If REGNO is -1, do this for all registers.
- Otherwise, REGNO specifies which register (so we can save time). */
-
-void
-store_inferior_registers (int regno)
-{
- register unsigned int regaddr;
- char buf[80];
-
- struct USER u;
-
- unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
-
- regaddr = offset;
-
- /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
- svr3 doesn't run on an 88110, or the kernel isolates the different (not
- completely sure this is true, but seems to be. */
- if (regno >= 0)
- {
- /* regaddr = register_addr (regno, offset); */
- if (regno < PC_REGNUM)
- {
- regaddr = offset + regno * sizeof (int);
- errno = 0;
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- else if (regno == SXIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
- else if (regno == SNIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
- else if (regno == SFIP_REGNUM)
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
- else
- printf_unfiltered ("Bad register number for store_inferior routine\n");
- }
- else
- {
- for (regno = 0; regno < PC_REGNUM; regno++)
- {
- /* regaddr = register_addr (regno, offset); */
- errno = 0;
- regaddr = offset + regno * sizeof (int);
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing register number %d", regno);
- perror_with_name (buf);
- }
- }
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
- ptrace (6, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
- }
-}
-
-
-/* blockend is the address of the end of the user structure */
-m88k_register_u_addr (int blockend, int regnum)
-{
- struct USER u;
- int ustart = blockend - sizeof (struct USER);
- switch (regnum)
- {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 20:
- case 21:
- case 22:
- case 23:
- case 24:
- case 25:
- case 26:
- case 27:
- case 28:
- case 29:
- case 30:
- case 31:
- return (ustart + ((int) &u.pt_r0 - (int) &u) + REGISTER_SIZE * regnum);
- case PSR_REGNUM:
- return (ustart + ((int) &u.pt_psr - (int) &u));
- case FPSR_REGNUM:
- return (ustart + ((int) &u.pt_fpsr - (int) &u));
- case FPCR_REGNUM:
- return (ustart + ((int) &u.pt_fpcr - (int) &u));
- case SXIP_REGNUM:
- return (ustart + SXIP_OFFSET);
- case SNIP_REGNUM:
- return (ustart + SNIP_OFFSET);
- case SFIP_REGNUM:
- return (ustart + SFIP_OFFSET);
- default:
- if (regnum < NUM_REGS)
- /* The register is one of those which is not defined...
- give it zero */
- return (ustart + ((int) &u.pt_r0 - (int) &u));
- else
- return (blockend + REGISTER_SIZE * regnum);
- }
-}
-
-#ifdef USE_PROC_FS
-
-#include <sys/procfs.h>
-
-/* Prototypes for supply_gregset etc. */
-#include "gregset.h"
-
-/* Given a pointer to a general register set in /proc format (gregset_t *),
- unpack the register contents and supply them as gdb's idea of the current
- register values. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
- register int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi <= SP_REGNUM; regi++)
- supply_register (regi, (char *) (regp + regi));
-
- supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
- supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
- supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
- supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
- supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
- supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
-}
-
-void
-fill_gregset (gregset_t *gregsetp, int regno)
-{
- int regi;
- register greg_t *regp = (greg_t *) gregsetp;
-
- for (regi = 0; regi <= R_R31; regi++)
- if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(int *) ®isters[REGISTER_BYTE (regi)];
-
- if ((regno == -1) || (regno == SXIP_REGNUM))
- *(regp + R_XIP) = *(int *) ®isters[REGISTER_BYTE (SXIP_REGNUM)];
- if ((regno == -1) || (regno == SNIP_REGNUM))
- *(regp + R_NIP) = *(int *) ®isters[REGISTER_BYTE (SNIP_REGNUM)];
- if ((regno == -1) || (regno == SFIP_REGNUM))
- *(regp + R_FIP) = *(int *) ®isters[REGISTER_BYTE (SFIP_REGNUM)];
- if ((regno == -1) || (regno == PSR_REGNUM))
- *(regp + R_PSR) = *(int *) ®isters[REGISTER_BYTE (PSR_REGNUM)];
- if ((regno == -1) || (regno == FPSR_REGNUM))
- *(regp + R_FPSR) = *(int *) ®isters[REGISTER_BYTE (FPSR_REGNUM)];
- if ((regno == -1) || (regno == FPCR_REGNUM))
- *(regp + R_FPCR) = *(int *) ®isters[REGISTER_BYTE (FPCR_REGNUM)];
-}
-
-#endif /* USE_PROC_FS */
+// OBSOLETE /* Native-dependent Motorola 88xxx support for GDB, the GNU Debugger.
+// OBSOLETE Copyright 1988, 1990, 1991, 1992, 1993, 1995, 1999, 2000, 2001
+// OBSOLETE Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE
+// OBSOLETE #include <sys/types.h>
+// OBSOLETE #include <sys/param.h>
+// OBSOLETE #include <sys/dir.h>
+// OBSOLETE #include <signal.h>
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include <sys/user.h>
+// OBSOLETE
+// OBSOLETE #ifndef USER /* added to support BCS ptrace_user */
+// OBSOLETE #define USER ptrace_user
+// OBSOLETE #endif
+// OBSOLETE #include <sys/ioctl.h>
+// OBSOLETE #include <fcntl.h>
+// OBSOLETE #include <sys/file.h>
+// OBSOLETE #include "gdb_stat.h"
+// OBSOLETE
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "setjmp.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE
+// OBSOLETE #ifdef DELTA88
+// OBSOLETE #include <sys/ptrace.h>
+// OBSOLETE
+// OBSOLETE /* define offsets to the pc instruction offsets in ptrace_user struct */
+// OBSOLETE #define SXIP_OFFSET ((char *)&u.pt_sigframe.sig_sxip - (char *)&u)
+// OBSOLETE #define SNIP_OFFSET ((char *)&u.pt_sigframe.sig_snip - (char *)&u)
+// OBSOLETE #define SFIP_OFFSET ((char *)&u.pt_sigframe.sig_sfip - (char *)&u)
+// OBSOLETE #else
+// OBSOLETE /* define offsets to the pc instruction offsets in ptrace_user struct */
+// OBSOLETE #define SXIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sxip - (char *)&u)
+// OBSOLETE #define SNIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_snip - (char *)&u)
+// OBSOLETE #define SFIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sfip - (char *)&u)
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE extern int have_symbol_file_p ();
+// OBSOLETE
+// OBSOLETE extern jmp_buf stack_jmp;
+// OBSOLETE
+// OBSOLETE extern int errno;
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE fetch_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE register unsigned int regaddr;
+// OBSOLETE char buf[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE register int i;
+// OBSOLETE
+// OBSOLETE struct USER u;
+// OBSOLETE unsigned int offset;
+// OBSOLETE
+// OBSOLETE offset = (char *) &u.pt_r0 - (char *) &u;
+// OBSOLETE regaddr = offset; /* byte offset to r0; */
+// OBSOLETE
+// OBSOLETE /* offset = ptrace (3, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) offset, 0) - KERNEL_U_ADDR; */
+// OBSOLETE for (regno = 0; regno < NUM_REGS; regno++)
+// OBSOLETE {
+// OBSOLETE /*regaddr = register_addr (regno, offset); */
+// OBSOLETE /* 88k enhancement */
+// OBSOLETE
+// OBSOLETE for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
+// OBSOLETE {
+// OBSOLETE *(int *) &buf[i] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, 0);
+// OBSOLETE regaddr += sizeof (int);
+// OBSOLETE }
+// OBSOLETE supply_register (regno, buf);
+// OBSOLETE }
+// OBSOLETE /* now load up registers 36 - 38; special pc registers */
+// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, 0);
+// OBSOLETE supply_register (SXIP_REGNUM, buf);
+// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, 0);
+// OBSOLETE supply_register (SNIP_REGNUM, buf);
+// OBSOLETE *(int *) &buf[0] = ptrace (3, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, 0);
+// OBSOLETE supply_register (SFIP_REGNUM, buf);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Store our register values back into the inferior.
+// OBSOLETE If REGNO is -1, do this for all registers.
+// OBSOLETE Otherwise, REGNO specifies which register (so we can save time). */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE store_inferior_registers (int regno)
+// OBSOLETE {
+// OBSOLETE register unsigned int regaddr;
+// OBSOLETE char buf[80];
+// OBSOLETE
+// OBSOLETE struct USER u;
+// OBSOLETE
+// OBSOLETE unsigned int offset = (char *) &u.pt_r0 - (char *) &u;
+// OBSOLETE
+// OBSOLETE regaddr = offset;
+// OBSOLETE
+// OBSOLETE /* Don't try to deal with EXIP_REGNUM or ENIP_REGNUM, because I think either
+// OBSOLETE svr3 doesn't run on an 88110, or the kernel isolates the different (not
+// OBSOLETE completely sure this is true, but seems to be. */
+// OBSOLETE if (regno >= 0)
+// OBSOLETE {
+// OBSOLETE /* regaddr = register_addr (regno, offset); */
+// OBSOLETE if (regno < PC_REGNUM)
+// OBSOLETE {
+// OBSOLETE regaddr = offset + regno * sizeof (int);
+// OBSOLETE errno = 0;
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
+// OBSOLETE if (errno != 0)
+// OBSOLETE {
+// OBSOLETE sprintf (buf, "writing register number %d", regno);
+// OBSOLETE perror_with_name (buf);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else if (regno == SXIP_REGNUM)
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (regno));
+// OBSOLETE else if (regno == SNIP_REGNUM)
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (regno));
+// OBSOLETE else if (regno == SFIP_REGNUM)
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (regno));
+// OBSOLETE else
+// OBSOLETE printf_unfiltered ("Bad register number for store_inferior routine\n");
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE for (regno = 0; regno < PC_REGNUM; regno++)
+// OBSOLETE {
+// OBSOLETE /* regaddr = register_addr (regno, offset); */
+// OBSOLETE errno = 0;
+// OBSOLETE regaddr = offset + regno * sizeof (int);
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) regaddr, read_register (regno));
+// OBSOLETE if (errno != 0)
+// OBSOLETE {
+// OBSOLETE sprintf (buf, "writing register number %d", regno);
+// OBSOLETE perror_with_name (buf);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SXIP_OFFSET, read_register (SXIP_REGNUM));
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SNIP_OFFSET, read_register (SNIP_REGNUM));
+// OBSOLETE ptrace (6, PIDGET (inferior_ptid),
+// OBSOLETE (PTRACE_ARG3_TYPE) SFIP_OFFSET, read_register (SFIP_REGNUM));
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* blockend is the address of the end of the user structure */
+// OBSOLETE m88k_register_u_addr (int blockend, int regnum)
+// OBSOLETE {
+// OBSOLETE struct USER u;
+// OBSOLETE int ustart = blockend - sizeof (struct USER);
+// OBSOLETE switch (regnum)
+// OBSOLETE {
+// OBSOLETE case 0:
+// OBSOLETE case 1:
+// OBSOLETE case 2:
+// OBSOLETE case 3:
+// OBSOLETE case 4:
+// OBSOLETE case 5:
+// OBSOLETE case 6:
+// OBSOLETE case 7:
+// OBSOLETE case 8:
+// OBSOLETE case 9:
+// OBSOLETE case 10:
+// OBSOLETE case 11:
+// OBSOLETE case 12:
+// OBSOLETE case 13:
+// OBSOLETE case 14:
+// OBSOLETE case 15:
+// OBSOLETE case 16:
+// OBSOLETE case 17:
+// OBSOLETE case 18:
+// OBSOLETE case 19:
+// OBSOLETE case 20:
+// OBSOLETE case 21:
+// OBSOLETE case 22:
+// OBSOLETE case 23:
+// OBSOLETE case 24:
+// OBSOLETE case 25:
+// OBSOLETE case 26:
+// OBSOLETE case 27:
+// OBSOLETE case 28:
+// OBSOLETE case 29:
+// OBSOLETE case 30:
+// OBSOLETE case 31:
+// OBSOLETE return (ustart + ((int) &u.pt_r0 - (int) &u) + REGISTER_SIZE * regnum);
+// OBSOLETE case PSR_REGNUM:
+// OBSOLETE return (ustart + ((int) &u.pt_psr - (int) &u));
+// OBSOLETE case FPSR_REGNUM:
+// OBSOLETE return (ustart + ((int) &u.pt_fpsr - (int) &u));
+// OBSOLETE case FPCR_REGNUM:
+// OBSOLETE return (ustart + ((int) &u.pt_fpcr - (int) &u));
+// OBSOLETE case SXIP_REGNUM:
+// OBSOLETE return (ustart + SXIP_OFFSET);
+// OBSOLETE case SNIP_REGNUM:
+// OBSOLETE return (ustart + SNIP_OFFSET);
+// OBSOLETE case SFIP_REGNUM:
+// OBSOLETE return (ustart + SFIP_OFFSET);
+// OBSOLETE default:
+// OBSOLETE if (regnum < NUM_REGS)
+// OBSOLETE /* The register is one of those which is not defined...
+// OBSOLETE give it zero */
+// OBSOLETE return (ustart + ((int) &u.pt_r0 - (int) &u));
+// OBSOLETE else
+// OBSOLETE return (blockend + REGISTER_SIZE * regnum);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #ifdef USE_PROC_FS
+// OBSOLETE
+// OBSOLETE #include <sys/procfs.h>
+// OBSOLETE
+// OBSOLETE /* Prototypes for supply_gregset etc. */
+// OBSOLETE #include "gregset.h"
+// OBSOLETE
+// OBSOLETE /* Given a pointer to a general register set in /proc format (gregset_t *),
+// OBSOLETE unpack the register contents and supply them as gdb's idea of the current
+// OBSOLETE register values. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE supply_gregset (gregset_t *gregsetp)
+// OBSOLETE {
+// OBSOLETE register int regi;
+// OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
+// OBSOLETE
+// OBSOLETE for (regi = 0; regi <= SP_REGNUM; regi++)
+// OBSOLETE supply_register (regi, (char *) (regp + regi));
+// OBSOLETE
+// OBSOLETE supply_register (SXIP_REGNUM, (char *) (regp + R_XIP));
+// OBSOLETE supply_register (SNIP_REGNUM, (char *) (regp + R_NIP));
+// OBSOLETE supply_register (SFIP_REGNUM, (char *) (regp + R_FIP));
+// OBSOLETE supply_register (PSR_REGNUM, (char *) (regp + R_PSR));
+// OBSOLETE supply_register (FPSR_REGNUM, (char *) (regp + R_FPSR));
+// OBSOLETE supply_register (FPCR_REGNUM, (char *) (regp + R_FPCR));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE fill_gregset (gregset_t *gregsetp, int regno)
+// OBSOLETE {
+// OBSOLETE int regi;
+// OBSOLETE register greg_t *regp = (greg_t *) gregsetp;
+// OBSOLETE
+// OBSOLETE for (regi = 0; regi <= R_R31; regi++)
+// OBSOLETE if ((regno == -1) || (regno == regi))
+// OBSOLETE *(regp + regi) = *(int *) ®isters[REGISTER_BYTE (regi)];
+// OBSOLETE
+// OBSOLETE if ((regno == -1) || (regno == SXIP_REGNUM))
+// OBSOLETE *(regp + R_XIP) = *(int *) ®isters[REGISTER_BYTE (SXIP_REGNUM)];
+// OBSOLETE if ((regno == -1) || (regno == SNIP_REGNUM))
+// OBSOLETE *(regp + R_NIP) = *(int *) ®isters[REGISTER_BYTE (SNIP_REGNUM)];
+// OBSOLETE if ((regno == -1) || (regno == SFIP_REGNUM))
+// OBSOLETE *(regp + R_FIP) = *(int *) ®isters[REGISTER_BYTE (SFIP_REGNUM)];
+// OBSOLETE if ((regno == -1) || (regno == PSR_REGNUM))
+// OBSOLETE *(regp + R_PSR) = *(int *) ®isters[REGISTER_BYTE (PSR_REGNUM)];
+// OBSOLETE if ((regno == -1) || (regno == FPSR_REGNUM))
+// OBSOLETE *(regp + R_FPSR) = *(int *) ®isters[REGISTER_BYTE (FPSR_REGNUM)];
+// OBSOLETE if ((regno == -1) || (regno == FPCR_REGNUM))
+// OBSOLETE *(regp + R_FPCR) = *(int *) ®isters[REGISTER_BYTE (FPCR_REGNUM)];
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #endif /* USE_PROC_FS */
-/* Target-machine dependent code for Motorola 88000 series, for GDB.
-
- Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
- 2000, 2001, 2002 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "frame.h"
-#include "inferior.h"
-#include "value.h"
-#include "gdbcore.h"
-#include "symtab.h"
-#include "setjmp.h"
-#include "value.h"
-#include "regcache.h"
-
-/* Size of an instruction */
-#define BYTES_PER_88K_INSN 4
-
-void frame_find_saved_regs ();
-
-/* Is this target an m88110? Otherwise assume m88100. This has
- relevance for the ways in which we screw with instruction pointers. */
-
-int target_is_m88110 = 0;
-
-void
-m88k_target_write_pc (CORE_ADDR pc, ptid_t ptid)
-{
- /* According to the MC88100 RISC Microprocessor User's Manual,
- section 6.4.3.1.2:
-
- ... can be made to return to a particular instruction by placing
- a valid instruction address in the SNIP and the next sequential
- instruction address in the SFIP (with V bits set and E bits
- clear). The rte resumes execution at the instruction pointed to
- by the SNIP, then the SFIP.
-
- The E bit is the least significant bit (bit 0). The V (valid)
- bit is bit 1. This is why we logical or 2 into the values we are
- writing below. It turns out that SXIP plays no role when
- returning from an exception so nothing special has to be done
- with it. We could even (presumably) give it a totally bogus
- value.
-
- -- Kevin Buettner */
-
- write_register_pid (SXIP_REGNUM, pc, ptid);
- write_register_pid (SNIP_REGNUM, (pc | 2), ptid);
- write_register_pid (SFIP_REGNUM, (pc | 2) + 4, ptid);
-}
-
-/* The type of a register. */
-struct type *
-m88k_register_type (int regnum)
-{
- if (regnum >= XFP_REGNUM)
- return builtin_type_m88110_ext;
- else if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
- return builtin_type_void_func_ptr;
- else
- return builtin_type_int32;
-}
-
-
-/* The m88k kernel aligns all instructions on 4-byte boundaries. The
- kernel also uses the least significant two bits for its own hocus
- pocus. When gdb receives an address from the kernel, it needs to
- preserve those right-most two bits, but gdb also needs to be careful
- to realize that those two bits are not really a part of the address
- of an instruction. Shrug. */
-
-CORE_ADDR
-m88k_addr_bits_remove (CORE_ADDR addr)
-{
- return ((addr) & ~3);
-}
-
-
-/* Given a GDB frame, determine the address of the calling function's frame.
- This will be used to create a new GDB frame struct, and then
- INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
-
- For us, the frame address is its stack pointer value, so we look up
- the function prologue to determine the caller's sp value, and return it. */
-
-CORE_ADDR
-frame_chain (struct frame_info *thisframe)
-{
-
- frame_find_saved_regs (thisframe, (struct frame_saved_regs *) 0);
- /* NOTE: this depends on frame_find_saved_regs returning the VALUE, not
- the ADDRESS, of SP_REGNUM. It also depends on the cache of
- frame_find_saved_regs results. */
- if (thisframe->fsr->regs[SP_REGNUM])
- return thisframe->fsr->regs[SP_REGNUM];
- else
- return thisframe->frame; /* Leaf fn -- next frame up has same SP. */
-}
-
-int
-frameless_function_invocation (struct frame_info *frame)
-{
-
- frame_find_saved_regs (frame, (struct frame_saved_regs *) 0);
- /* NOTE: this depends on frame_find_saved_regs returning the VALUE, not
- the ADDRESS, of SP_REGNUM. It also depends on the cache of
- frame_find_saved_regs results. */
- if (frame->fsr->regs[SP_REGNUM])
- return 0; /* Frameful -- return addr saved somewhere */
- else
- return 1; /* Frameless -- no saved return address */
-}
-
-void
-init_extra_frame_info (int fromleaf, struct frame_info *frame)
-{
- frame->fsr = 0; /* Not yet allocated */
- frame->args_pointer = 0; /* Unknown */
- frame->locals_pointer = 0; /* Unknown */
-}
-\f
-/* Examine an m88k function prologue, recording the addresses at which
- registers are saved explicitly by the prologue code, and returning
- the address of the first instruction after the prologue (but not
- after the instruction at address LIMIT, as explained below).
-
- LIMIT places an upper bound on addresses of the instructions to be
- examined. If the prologue code scan reaches LIMIT, the scan is
- aborted and LIMIT is returned. This is used, when examining the
- prologue for the current frame, to keep examine_prologue () from
- claiming that a given register has been saved when in fact the
- instruction that saves it has not yet been executed. LIMIT is used
- at other times to stop the scan when we hit code after the true
- function prologue (e.g. for the first source line) which might
- otherwise be mistaken for function prologue.
-
- The format of the function prologue matched by this routine is
- derived from examination of the source to gcc 1.95, particularly
- the routine output_prologue () in config/out-m88k.c.
-
- subu r31,r31,n # stack pointer update
-
- (st rn,r31,offset)? # save incoming regs
- (st.d rn,r31,offset)?
-
- (addu r30,r31,n)? # frame pointer update
-
- (pic sequence)? # PIC code prologue
-
- (or rn,rm,0)? # Move parameters to other regs
- */
-
-/* Macros for extracting fields from instructions. */
-
-#define BITMASK(pos, width) (((0x1 << (width)) - 1) << (pos))
-#define EXTRACT_FIELD(val, pos, width) ((val) >> (pos) & BITMASK (0, width))
-#define SUBU_OFFSET(x) ((unsigned)(x & 0xFFFF))
-#define ST_OFFSET(x) ((unsigned)((x) & 0xFFFF))
-#define ST_SRC(x) EXTRACT_FIELD ((x), 21, 5)
-#define ADDU_OFFSET(x) ((unsigned)(x & 0xFFFF))
-
-/*
- * prologue_insn_tbl is a table of instructions which may comprise a
- * function prologue. Associated with each table entry (corresponding
- * to a single instruction or group of instructions), is an action.
- * This action is used by examine_prologue (below) to determine
- * the state of certain machine registers and where the stack frame lives.
- */
-
-enum prologue_insn_action
-{
- PIA_SKIP, /* don't care what the instruction does */
- PIA_NOTE_ST, /* note register stored and where */
- PIA_NOTE_STD, /* note pair of registers stored and where */
- PIA_NOTE_SP_ADJUSTMENT, /* note stack pointer adjustment */
- PIA_NOTE_FP_ASSIGNMENT, /* note frame pointer assignment */
- PIA_NOTE_PROLOGUE_END, /* no more prologue */
-};
-
-struct prologue_insns
- {
- unsigned long insn;
- unsigned long mask;
- enum prologue_insn_action action;
- };
-
-struct prologue_insns prologue_insn_tbl[] =
-{
- /* Various register move instructions */
- {0x58000000, 0xf800ffff, PIA_SKIP}, /* or/or.u with immed of 0 */
- {0xf4005800, 0xfc1fffe0, PIA_SKIP}, /* or rd, r0, rs */
- {0xf4005800, 0xfc00ffff, PIA_SKIP}, /* or rd, rs, r0 */
-
- /* Stack pointer setup: "subu sp, sp, n" where n is a multiple of 8 */
- {0x67ff0000, 0xffff0007, PIA_NOTE_SP_ADJUSTMENT},
-
- /* Frame pointer assignment: "addu r30, r31, n" */
- {0x63df0000, 0xffff0000, PIA_NOTE_FP_ASSIGNMENT},
-
- /* Store to stack instructions; either "st rx, sp, n" or "st.d rx, sp, n" */
- {0x241f0000, 0xfc1f0000, PIA_NOTE_ST}, /* st rx, sp, n */
- {0x201f0000, 0xfc1f0000, PIA_NOTE_STD}, /* st.d rs, sp, n */
-
- /* Instructions needed for setting up r25 for pic code. */
- {0x5f200000, 0xffff0000, PIA_SKIP}, /* or.u r25, r0, offset_high */
- {0xcc000002, 0xffffffff, PIA_SKIP}, /* bsr.n Lab */
- {0x5b390000, 0xffff0000, PIA_SKIP}, /* or r25, r25, offset_low */
- {0xf7396001, 0xffffffff, PIA_SKIP}, /* Lab: addu r25, r25, r1 */
-
- /* Various branch or jump instructions which have a delay slot -- these
- do not form part of the prologue, but the instruction in the delay
- slot might be a store instruction which should be noted. */
- {0xc4000000, 0xe4000000, PIA_NOTE_PROLOGUE_END},
- /* br.n, bsr.n, bb0.n, or bb1.n */
- {0xec000000, 0xfc000000, PIA_NOTE_PROLOGUE_END}, /* bcnd.n */
- {0xf400c400, 0xfffff7e0, PIA_NOTE_PROLOGUE_END} /* jmp.n or jsr.n */
-
-};
-
-
-/* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
- is not the address of a valid instruction, the address of the next
- instruction beyond ADDR otherwise. *PWORD1 receives the first word
- of the instruction. */
-
-#define NEXT_PROLOGUE_INSN(addr, lim, pword1) \
- (((addr) < (lim)) ? next_insn (addr, pword1) : 0)
-
-/* Read the m88k instruction at 'memaddr' and return the address of
- the next instruction after that, or 0 if 'memaddr' is not the
- address of a valid instruction. The instruction
- is stored at 'pword1'. */
-
-CORE_ADDR
-next_insn (CORE_ADDR memaddr, unsigned long *pword1)
-{
- *pword1 = read_memory_integer (memaddr, BYTES_PER_88K_INSN);
- return memaddr + BYTES_PER_88K_INSN;
-}
-
-/* Read a register from frames called by us (or from the hardware regs). */
-
-static int
-read_next_frame_reg (struct frame_info *frame, int regno)
-{
- for (; frame; frame = frame->next)
- {
- if (regno == SP_REGNUM)
- return FRAME_FP (frame);
- else if (frame->fsr->regs[regno])
- return read_memory_integer (frame->fsr->regs[regno], 4);
- }
- return read_register (regno);
-}
-
-/* Examine the prologue of a function. `ip' points to the first instruction.
- `limit' is the limit of the prologue (e.g. the addr of the first
- linenumber, or perhaps the program counter if we're stepping through).
- `frame_sp' is the stack pointer value in use in this frame.
- `fsr' is a pointer to a frame_saved_regs structure into which we put
- info about the registers saved by this frame.
- `fi' is a struct frame_info pointer; we fill in various fields in it
- to reflect the offsets of the arg pointer and the locals pointer. */
-
-static CORE_ADDR
-examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
- CORE_ADDR frame_sp, struct frame_saved_regs *fsr,
- struct frame_info *fi)
-{
- register CORE_ADDR next_ip;
- register int src;
- unsigned long insn;
- int size, offset;
- char must_adjust[32]; /* If set, must adjust offsets in fsr */
- int sp_offset = -1; /* -1 means not set (valid must be mult of 8) */
- int fp_offset = -1; /* -1 means not set */
- CORE_ADDR frame_fp;
- CORE_ADDR prologue_end = 0;
-
- memset (must_adjust, '\0', sizeof (must_adjust));
- next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
-
- while (next_ip)
- {
- struct prologue_insns *pip;
-
- for (pip = prologue_insn_tbl; (insn & pip->mask) != pip->insn;)
- if (++pip >= prologue_insn_tbl + sizeof prologue_insn_tbl)
- goto end_of_prologue_found; /* not a prologue insn */
-
- switch (pip->action)
- {
- case PIA_NOTE_ST:
- case PIA_NOTE_STD:
- if (sp_offset != -1)
- {
- src = ST_SRC (insn);
- offset = ST_OFFSET (insn);
- must_adjust[src] = 1;
- fsr->regs[src++] = offset; /* Will be adjusted later */
- if (pip->action == PIA_NOTE_STD && src < 32)
- {
- offset += 4;
- must_adjust[src] = 1;
- fsr->regs[src++] = offset;
- }
- }
- else
- goto end_of_prologue_found;
- break;
- case PIA_NOTE_SP_ADJUSTMENT:
- if (sp_offset == -1)
- sp_offset = -SUBU_OFFSET (insn);
- else
- goto end_of_prologue_found;
- break;
- case PIA_NOTE_FP_ASSIGNMENT:
- if (fp_offset == -1)
- fp_offset = ADDU_OFFSET (insn);
- else
- goto end_of_prologue_found;
- break;
- case PIA_NOTE_PROLOGUE_END:
- if (!prologue_end)
- prologue_end = ip;
- break;
- case PIA_SKIP:
- default:
- /* Do nothing */
- break;
- }
-
- ip = next_ip;
- next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
- }
-
-end_of_prologue_found:
-
- if (prologue_end)
- ip = prologue_end;
-
- /* We're done with the prologue. If we don't care about the stack
- frame itself, just return. (Note that fsr->regs has been trashed,
- but the one caller who calls with fi==0 passes a dummy there.) */
-
- if (fi == 0)
- return ip;
-
- /*
- OK, now we have:
-
- sp_offset original (before any alloca calls) displacement of SP
- (will be negative).
-
- fp_offset displacement from original SP to the FP for this frame
- or -1.
-
- fsr->regs[0..31] displacement from original SP to the stack
- location where reg[0..31] is stored.
-
- must_adjust[0..31] set if corresponding offset was set.
-
- If alloca has been called between the function prologue and the current
- IP, then the current SP (frame_sp) will not be the original SP as set by
- the function prologue. If the current SP is not the original SP, then the
- compiler will have allocated an FP for this frame, fp_offset will be set,
- and we can use it to calculate the original SP.
-
- Then, we figure out where the arguments and locals are, and relocate the
- offsets in fsr->regs to absolute addresses. */
-
- if (fp_offset != -1)
- {
- /* We have a frame pointer, so get it, and base our calc's on it. */
- frame_fp = (CORE_ADDR) read_next_frame_reg (fi->next, ACTUAL_FP_REGNUM);
- frame_sp = frame_fp - fp_offset;
- }
- else
- {
- /* We have no frame pointer, therefore frame_sp is still the same value
- as set by prologue. But where is the frame itself? */
- if (must_adjust[SRP_REGNUM])
- {
- /* Function header saved SRP (r1), the return address. Frame starts
- 4 bytes down from where it was saved. */
- frame_fp = frame_sp + fsr->regs[SRP_REGNUM] - 4;
- fi->locals_pointer = frame_fp;
- }
- else
- {
- /* Function header didn't save SRP (r1), so we are in a leaf fn or
- are otherwise confused. */
- frame_fp = -1;
- }
- }
-
- /* The locals are relative to the FP (whether it exists as an allocated
- register, or just as an assumed offset from the SP) */
- fi->locals_pointer = frame_fp;
-
- /* The arguments are just above the SP as it was before we adjusted it
- on entry. */
- fi->args_pointer = frame_sp - sp_offset;
-
- /* Now that we know the SP value used by the prologue, we know where
- it saved all the registers. */
- for (src = 0; src < 32; src++)
- if (must_adjust[src])
- fsr->regs[src] += frame_sp;
-
- /* The saved value of the SP is always known. */
- /* (we hope...) */
- if (fsr->regs[SP_REGNUM] != 0
- && fsr->regs[SP_REGNUM] != frame_sp - sp_offset)
- fprintf_unfiltered (gdb_stderr, "Bad saved SP value %lx != %lx, offset %x!\n",
- fsr->regs[SP_REGNUM],
- frame_sp - sp_offset, sp_offset);
-
- fsr->regs[SP_REGNUM] = frame_sp - sp_offset;
-
- return (ip);
-}
-
-/* Given an ip value corresponding to the start of a function,
- return the ip of the first instruction after the function
- prologue. */
-
-CORE_ADDR
-m88k_skip_prologue (CORE_ADDR ip)
-{
- struct frame_saved_regs saved_regs_dummy;
- struct symtab_and_line sal;
- CORE_ADDR limit;
-
- sal = find_pc_line (ip, 0);
- limit = (sal.end) ? sal.end : 0xffffffff;
-
- return (examine_prologue (ip, limit, (CORE_ADDR) 0, &saved_regs_dummy,
- (struct frame_info *) 0));
-}
-
-/* Put here the code to store, into a struct frame_saved_regs,
- the addresses of the saved registers of frame described by FRAME_INFO.
- This includes special registers such as pc and fp saved in special
- ways in the stack frame. sp is even more special:
- the address we return for it IS the sp for the next frame.
-
- We cache the result of doing this in the frame_obstack, since it is
- fairly expensive. */
-
-void
-frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
-{
- register struct frame_saved_regs *cache_fsr;
- CORE_ADDR ip;
- struct symtab_and_line sal;
- CORE_ADDR limit;
-
- if (!fi->fsr)
- {
- cache_fsr = (struct frame_saved_regs *)
- frame_obstack_alloc (sizeof (struct frame_saved_regs));
- memset (cache_fsr, '\0', sizeof (struct frame_saved_regs));
- fi->fsr = cache_fsr;
-
- /* Find the start and end of the function prologue. If the PC
- is in the function prologue, we only consider the part that
- has executed already. In the case where the PC is not in
- the function prologue, we set limit to two instructions beyond
- where the prologue ends in case if any of the prologue instructions
- were moved into a delay slot of a branch instruction. */
-
- ip = get_pc_function_start (fi->pc);
- sal = find_pc_line (ip, 0);
- limit = (sal.end && sal.end < fi->pc) ? sal.end + 2 * BYTES_PER_88K_INSN
- : fi->pc;
-
- /* This will fill in fields in *fi as well as in cache_fsr. */
-#ifdef SIGTRAMP_FRAME_FIXUP
- if (fi->signal_handler_caller)
- SIGTRAMP_FRAME_FIXUP (fi->frame);
-#endif
- examine_prologue (ip, limit, fi->frame, cache_fsr, fi);
-#ifdef SIGTRAMP_SP_FIXUP
- if (fi->signal_handler_caller && fi->fsr->regs[SP_REGNUM])
- SIGTRAMP_SP_FIXUP (fi->fsr->regs[SP_REGNUM]);
-#endif
- }
-
- if (fsr)
- *fsr = *fi->fsr;
-}
-
-/* Return the address of the locals block for the frame
- described by FI. Returns 0 if the address is unknown.
- NOTE! Frame locals are referred to by negative offsets from the
- argument pointer, so this is the same as frame_args_address(). */
-
-CORE_ADDR
-frame_locals_address (struct frame_info *fi)
-{
- struct frame_saved_regs fsr;
-
- if (fi->args_pointer) /* Cached value is likely there. */
- return fi->args_pointer;
-
- /* Nope, generate it. */
-
- get_frame_saved_regs (fi, &fsr);
-
- return fi->args_pointer;
-}
-
-/* Return the address of the argument block for the frame
- described by FI. Returns 0 if the address is unknown. */
-
-CORE_ADDR
-frame_args_address (struct frame_info *fi)
-{
- struct frame_saved_regs fsr;
-
- if (fi->args_pointer) /* Cached value is likely there. */
- return fi->args_pointer;
-
- /* Nope, generate it. */
-
- get_frame_saved_regs (fi, &fsr);
-
- return fi->args_pointer;
-}
-
-/* Return the saved PC from this frame.
-
- If the frame has a memory copy of SRP_REGNUM, use that. If not,
- just use the register SRP_REGNUM itself. */
-
-CORE_ADDR
-frame_saved_pc (struct frame_info *frame)
-{
- return read_next_frame_reg (frame, SRP_REGNUM);
-}
-
-
-#define DUMMY_FRAME_SIZE 192
-
-static void
-write_word (CORE_ADDR sp, ULONGEST word)
-{
- register int len = REGISTER_SIZE;
- char buffer[MAX_REGISTER_RAW_SIZE];
-
- store_unsigned_integer (buffer, len, word);
- write_memory (sp, buffer, len);
-}
-
-void
-m88k_push_dummy_frame (void)
-{
- register CORE_ADDR sp = read_register (SP_REGNUM);
- register int rn;
- int offset;
-
- sp -= DUMMY_FRAME_SIZE; /* allocate a bunch of space */
-
- for (rn = 0, offset = 0; rn <= SP_REGNUM; rn++, offset += 4)
- write_word (sp + offset, read_register (rn));
-
- write_word (sp + offset, read_register (SXIP_REGNUM));
- offset += 4;
-
- write_word (sp + offset, read_register (SNIP_REGNUM));
- offset += 4;
-
- write_word (sp + offset, read_register (SFIP_REGNUM));
- offset += 4;
-
- write_word (sp + offset, read_register (PSR_REGNUM));
- offset += 4;
-
- write_word (sp + offset, read_register (FPSR_REGNUM));
- offset += 4;
-
- write_word (sp + offset, read_register (FPCR_REGNUM));
- offset += 4;
-
- write_register (SP_REGNUM, sp);
- write_register (ACTUAL_FP_REGNUM, sp);
-}
-
-void
-pop_frame (void)
-{
- register struct frame_info *frame = get_current_frame ();
- register int regnum;
- struct frame_saved_regs fsr;
-
- get_frame_saved_regs (frame, &fsr);
-
- if (PC_IN_CALL_DUMMY (read_pc (), read_register (SP_REGNUM), frame->frame))
- {
- /* FIXME: I think get_frame_saved_regs should be handling this so
- that we can deal with the saved registers properly (e.g. frame
- 1 is a call dummy, the user types "frame 2" and then "print $ps"). */
- register CORE_ADDR sp = read_register (ACTUAL_FP_REGNUM);
- int offset;
-
- for (regnum = 0, offset = 0; regnum <= SP_REGNUM; regnum++, offset += 4)
- (void) write_register (regnum, read_memory_integer (sp + offset, 4));
-
- write_register (SXIP_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- write_register (SNIP_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- write_register (SFIP_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- write_register (PSR_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- write_register (FPSR_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- write_register (FPCR_REGNUM, read_memory_integer (sp + offset, 4));
- offset += 4;
-
- }
- else
- {
- for (regnum = FP_REGNUM; regnum > 0; regnum--)
- if (fsr.regs[regnum])
- write_register (regnum,
- read_memory_integer (fsr.regs[regnum], 4));
- write_pc (frame_saved_pc (frame));
- }
- reinit_frame_cache ();
-}
-
-void
-_initialize_m88k_tdep (void)
-{
- tm_print_insn = print_insn_m88k;
-}
+// OBSOLETE /* Target-machine dependent code for Motorola 88000 series, for GDB.
+// OBSOLETE
+// OBSOLETE Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
+// OBSOLETE 2000, 2001, 2002 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "frame.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "symtab.h"
+// OBSOLETE #include "setjmp.h"
+// OBSOLETE #include "value.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE
+// OBSOLETE /* Size of an instruction */
+// OBSOLETE #define BYTES_PER_88K_INSN 4
+// OBSOLETE
+// OBSOLETE void frame_find_saved_regs ();
+// OBSOLETE
+// OBSOLETE /* Is this target an m88110? Otherwise assume m88100. This has
+// OBSOLETE relevance for the ways in which we screw with instruction pointers. */
+// OBSOLETE
+// OBSOLETE int target_is_m88110 = 0;
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE m88k_target_write_pc (CORE_ADDR pc, ptid_t ptid)
+// OBSOLETE {
+// OBSOLETE /* According to the MC88100 RISC Microprocessor User's Manual,
+// OBSOLETE section 6.4.3.1.2:
+// OBSOLETE
+// OBSOLETE ... can be made to return to a particular instruction by placing
+// OBSOLETE a valid instruction address in the SNIP and the next sequential
+// OBSOLETE instruction address in the SFIP (with V bits set and E bits
+// OBSOLETE clear). The rte resumes execution at the instruction pointed to
+// OBSOLETE by the SNIP, then the SFIP.
+// OBSOLETE
+// OBSOLETE The E bit is the least significant bit (bit 0). The V (valid)
+// OBSOLETE bit is bit 1. This is why we logical or 2 into the values we are
+// OBSOLETE writing below. It turns out that SXIP plays no role when
+// OBSOLETE returning from an exception so nothing special has to be done
+// OBSOLETE with it. We could even (presumably) give it a totally bogus
+// OBSOLETE value.
+// OBSOLETE
+// OBSOLETE -- Kevin Buettner */
+// OBSOLETE
+// OBSOLETE write_register_pid (SXIP_REGNUM, pc, ptid);
+// OBSOLETE write_register_pid (SNIP_REGNUM, (pc | 2), ptid);
+// OBSOLETE write_register_pid (SFIP_REGNUM, (pc | 2) + 4, ptid);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* The type of a register. */
+// OBSOLETE struct type *
+// OBSOLETE m88k_register_type (int regnum)
+// OBSOLETE {
+// OBSOLETE if (regnum >= XFP_REGNUM)
+// OBSOLETE return builtin_type_m88110_ext;
+// OBSOLETE else if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
+// OBSOLETE return builtin_type_void_func_ptr;
+// OBSOLETE else
+// OBSOLETE return builtin_type_int32;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* The m88k kernel aligns all instructions on 4-byte boundaries. The
+// OBSOLETE kernel also uses the least significant two bits for its own hocus
+// OBSOLETE pocus. When gdb receives an address from the kernel, it needs to
+// OBSOLETE preserve those right-most two bits, but gdb also needs to be careful
+// OBSOLETE to realize that those two bits are not really a part of the address
+// OBSOLETE of an instruction. Shrug. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE m88k_addr_bits_remove (CORE_ADDR addr)
+// OBSOLETE {
+// OBSOLETE return ((addr) & ~3);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Given a GDB frame, determine the address of the calling function's frame.
+// OBSOLETE This will be used to create a new GDB frame struct, and then
+// OBSOLETE INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
+// OBSOLETE
+// OBSOLETE For us, the frame address is its stack pointer value, so we look up
+// OBSOLETE the function prologue to determine the caller's sp value, and return it. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE frame_chain (struct frame_info *thisframe)
+// OBSOLETE {
+// OBSOLETE
+// OBSOLETE frame_find_saved_regs (thisframe, (struct frame_saved_regs *) 0);
+// OBSOLETE /* NOTE: this depends on frame_find_saved_regs returning the VALUE, not
+// OBSOLETE the ADDRESS, of SP_REGNUM. It also depends on the cache of
+// OBSOLETE frame_find_saved_regs results. */
+// OBSOLETE if (thisframe->fsr->regs[SP_REGNUM])
+// OBSOLETE return thisframe->fsr->regs[SP_REGNUM];
+// OBSOLETE else
+// OBSOLETE return thisframe->frame; /* Leaf fn -- next frame up has same SP. */
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE int
+// OBSOLETE frameless_function_invocation (struct frame_info *frame)
+// OBSOLETE {
+// OBSOLETE
+// OBSOLETE frame_find_saved_regs (frame, (struct frame_saved_regs *) 0);
+// OBSOLETE /* NOTE: this depends on frame_find_saved_regs returning the VALUE, not
+// OBSOLETE the ADDRESS, of SP_REGNUM. It also depends on the cache of
+// OBSOLETE frame_find_saved_regs results. */
+// OBSOLETE if (frame->fsr->regs[SP_REGNUM])
+// OBSOLETE return 0; /* Frameful -- return addr saved somewhere */
+// OBSOLETE else
+// OBSOLETE return 1; /* Frameless -- no saved return address */
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE init_extra_frame_info (int fromleaf, struct frame_info *frame)
+// OBSOLETE {
+// OBSOLETE frame->fsr = 0; /* Not yet allocated */
+// OBSOLETE frame->args_pointer = 0; /* Unknown */
+// OBSOLETE frame->locals_pointer = 0; /* Unknown */
+// OBSOLETE }
+// OBSOLETE \f
+// OBSOLETE /* Examine an m88k function prologue, recording the addresses at which
+// OBSOLETE registers are saved explicitly by the prologue code, and returning
+// OBSOLETE the address of the first instruction after the prologue (but not
+// OBSOLETE after the instruction at address LIMIT, as explained below).
+// OBSOLETE
+// OBSOLETE LIMIT places an upper bound on addresses of the instructions to be
+// OBSOLETE examined. If the prologue code scan reaches LIMIT, the scan is
+// OBSOLETE aborted and LIMIT is returned. This is used, when examining the
+// OBSOLETE prologue for the current frame, to keep examine_prologue () from
+// OBSOLETE claiming that a given register has been saved when in fact the
+// OBSOLETE instruction that saves it has not yet been executed. LIMIT is used
+// OBSOLETE at other times to stop the scan when we hit code after the true
+// OBSOLETE function prologue (e.g. for the first source line) which might
+// OBSOLETE otherwise be mistaken for function prologue.
+// OBSOLETE
+// OBSOLETE The format of the function prologue matched by this routine is
+// OBSOLETE derived from examination of the source to gcc 1.95, particularly
+// OBSOLETE the routine output_prologue () in config/out-m88k.c.
+// OBSOLETE
+// OBSOLETE subu r31,r31,n # stack pointer update
+// OBSOLETE
+// OBSOLETE (st rn,r31,offset)? # save incoming regs
+// OBSOLETE (st.d rn,r31,offset)?
+// OBSOLETE
+// OBSOLETE (addu r30,r31,n)? # frame pointer update
+// OBSOLETE
+// OBSOLETE (pic sequence)? # PIC code prologue
+// OBSOLETE
+// OBSOLETE (or rn,rm,0)? # Move parameters to other regs
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE /* Macros for extracting fields from instructions. */
+// OBSOLETE
+// OBSOLETE #define BITMASK(pos, width) (((0x1 << (width)) - 1) << (pos))
+// OBSOLETE #define EXTRACT_FIELD(val, pos, width) ((val) >> (pos) & BITMASK (0, width))
+// OBSOLETE #define SUBU_OFFSET(x) ((unsigned)(x & 0xFFFF))
+// OBSOLETE #define ST_OFFSET(x) ((unsigned)((x) & 0xFFFF))
+// OBSOLETE #define ST_SRC(x) EXTRACT_FIELD ((x), 21, 5)
+// OBSOLETE #define ADDU_OFFSET(x) ((unsigned)(x & 0xFFFF))
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE * prologue_insn_tbl is a table of instructions which may comprise a
+// OBSOLETE * function prologue. Associated with each table entry (corresponding
+// OBSOLETE * to a single instruction or group of instructions), is an action.
+// OBSOLETE * This action is used by examine_prologue (below) to determine
+// OBSOLETE * the state of certain machine registers and where the stack frame lives.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE enum prologue_insn_action
+// OBSOLETE {
+// OBSOLETE PIA_SKIP, /* don't care what the instruction does */
+// OBSOLETE PIA_NOTE_ST, /* note register stored and where */
+// OBSOLETE PIA_NOTE_STD, /* note pair of registers stored and where */
+// OBSOLETE PIA_NOTE_SP_ADJUSTMENT, /* note stack pointer adjustment */
+// OBSOLETE PIA_NOTE_FP_ASSIGNMENT, /* note frame pointer assignment */
+// OBSOLETE PIA_NOTE_PROLOGUE_END, /* no more prologue */
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE struct prologue_insns
+// OBSOLETE {
+// OBSOLETE unsigned long insn;
+// OBSOLETE unsigned long mask;
+// OBSOLETE enum prologue_insn_action action;
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE struct prologue_insns prologue_insn_tbl[] =
+// OBSOLETE {
+// OBSOLETE /* Various register move instructions */
+// OBSOLETE {0x58000000, 0xf800ffff, PIA_SKIP}, /* or/or.u with immed of 0 */
+// OBSOLETE {0xf4005800, 0xfc1fffe0, PIA_SKIP}, /* or rd, r0, rs */
+// OBSOLETE {0xf4005800, 0xfc00ffff, PIA_SKIP}, /* or rd, rs, r0 */
+// OBSOLETE
+// OBSOLETE /* Stack pointer setup: "subu sp, sp, n" where n is a multiple of 8 */
+// OBSOLETE {0x67ff0000, 0xffff0007, PIA_NOTE_SP_ADJUSTMENT},
+// OBSOLETE
+// OBSOLETE /* Frame pointer assignment: "addu r30, r31, n" */
+// OBSOLETE {0x63df0000, 0xffff0000, PIA_NOTE_FP_ASSIGNMENT},
+// OBSOLETE
+// OBSOLETE /* Store to stack instructions; either "st rx, sp, n" or "st.d rx, sp, n" */
+// OBSOLETE {0x241f0000, 0xfc1f0000, PIA_NOTE_ST}, /* st rx, sp, n */
+// OBSOLETE {0x201f0000, 0xfc1f0000, PIA_NOTE_STD}, /* st.d rs, sp, n */
+// OBSOLETE
+// OBSOLETE /* Instructions needed for setting up r25 for pic code. */
+// OBSOLETE {0x5f200000, 0xffff0000, PIA_SKIP}, /* or.u r25, r0, offset_high */
+// OBSOLETE {0xcc000002, 0xffffffff, PIA_SKIP}, /* bsr.n Lab */
+// OBSOLETE {0x5b390000, 0xffff0000, PIA_SKIP}, /* or r25, r25, offset_low */
+// OBSOLETE {0xf7396001, 0xffffffff, PIA_SKIP}, /* Lab: addu r25, r25, r1 */
+// OBSOLETE
+// OBSOLETE /* Various branch or jump instructions which have a delay slot -- these
+// OBSOLETE do not form part of the prologue, but the instruction in the delay
+// OBSOLETE slot might be a store instruction which should be noted. */
+// OBSOLETE {0xc4000000, 0xe4000000, PIA_NOTE_PROLOGUE_END},
+// OBSOLETE /* br.n, bsr.n, bb0.n, or bb1.n */
+// OBSOLETE {0xec000000, 0xfc000000, PIA_NOTE_PROLOGUE_END}, /* bcnd.n */
+// OBSOLETE {0xf400c400, 0xfffff7e0, PIA_NOTE_PROLOGUE_END} /* jmp.n or jsr.n */
+// OBSOLETE
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE /* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
+// OBSOLETE is not the address of a valid instruction, the address of the next
+// OBSOLETE instruction beyond ADDR otherwise. *PWORD1 receives the first word
+// OBSOLETE of the instruction. */
+// OBSOLETE
+// OBSOLETE #define NEXT_PROLOGUE_INSN(addr, lim, pword1) \
+// OBSOLETE (((addr) < (lim)) ? next_insn (addr, pword1) : 0)
+// OBSOLETE
+// OBSOLETE /* Read the m88k instruction at 'memaddr' and return the address of
+// OBSOLETE the next instruction after that, or 0 if 'memaddr' is not the
+// OBSOLETE address of a valid instruction. The instruction
+// OBSOLETE is stored at 'pword1'. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE next_insn (CORE_ADDR memaddr, unsigned long *pword1)
+// OBSOLETE {
+// OBSOLETE *pword1 = read_memory_integer (memaddr, BYTES_PER_88K_INSN);
+// OBSOLETE return memaddr + BYTES_PER_88K_INSN;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Read a register from frames called by us (or from the hardware regs). */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE read_next_frame_reg (struct frame_info *frame, int regno)
+// OBSOLETE {
+// OBSOLETE for (; frame; frame = frame->next)
+// OBSOLETE {
+// OBSOLETE if (regno == SP_REGNUM)
+// OBSOLETE return FRAME_FP (frame);
+// OBSOLETE else if (frame->fsr->regs[regno])
+// OBSOLETE return read_memory_integer (frame->fsr->regs[regno], 4);
+// OBSOLETE }
+// OBSOLETE return read_register (regno);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Examine the prologue of a function. `ip' points to the first instruction.
+// OBSOLETE `limit' is the limit of the prologue (e.g. the addr of the first
+// OBSOLETE linenumber, or perhaps the program counter if we're stepping through).
+// OBSOLETE `frame_sp' is the stack pointer value in use in this frame.
+// OBSOLETE `fsr' is a pointer to a frame_saved_regs structure into which we put
+// OBSOLETE info about the registers saved by this frame.
+// OBSOLETE `fi' is a struct frame_info pointer; we fill in various fields in it
+// OBSOLETE to reflect the offsets of the arg pointer and the locals pointer. */
+// OBSOLETE
+// OBSOLETE static CORE_ADDR
+// OBSOLETE examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
+// OBSOLETE CORE_ADDR frame_sp, struct frame_saved_regs *fsr,
+// OBSOLETE struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE register CORE_ADDR next_ip;
+// OBSOLETE register int src;
+// OBSOLETE unsigned long insn;
+// OBSOLETE int size, offset;
+// OBSOLETE char must_adjust[32]; /* If set, must adjust offsets in fsr */
+// OBSOLETE int sp_offset = -1; /* -1 means not set (valid must be mult of 8) */
+// OBSOLETE int fp_offset = -1; /* -1 means not set */
+// OBSOLETE CORE_ADDR frame_fp;
+// OBSOLETE CORE_ADDR prologue_end = 0;
+// OBSOLETE
+// OBSOLETE memset (must_adjust, '\0', sizeof (must_adjust));
+// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
+// OBSOLETE
+// OBSOLETE while (next_ip)
+// OBSOLETE {
+// OBSOLETE struct prologue_insns *pip;
+// OBSOLETE
+// OBSOLETE for (pip = prologue_insn_tbl; (insn & pip->mask) != pip->insn;)
+// OBSOLETE if (++pip >= prologue_insn_tbl + sizeof prologue_insn_tbl)
+// OBSOLETE goto end_of_prologue_found; /* not a prologue insn */
+// OBSOLETE
+// OBSOLETE switch (pip->action)
+// OBSOLETE {
+// OBSOLETE case PIA_NOTE_ST:
+// OBSOLETE case PIA_NOTE_STD:
+// OBSOLETE if (sp_offset != -1)
+// OBSOLETE {
+// OBSOLETE src = ST_SRC (insn);
+// OBSOLETE offset = ST_OFFSET (insn);
+// OBSOLETE must_adjust[src] = 1;
+// OBSOLETE fsr->regs[src++] = offset; /* Will be adjusted later */
+// OBSOLETE if (pip->action == PIA_NOTE_STD && src < 32)
+// OBSOLETE {
+// OBSOLETE offset += 4;
+// OBSOLETE must_adjust[src] = 1;
+// OBSOLETE fsr->regs[src++] = offset;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE goto end_of_prologue_found;
+// OBSOLETE break;
+// OBSOLETE case PIA_NOTE_SP_ADJUSTMENT:
+// OBSOLETE if (sp_offset == -1)
+// OBSOLETE sp_offset = -SUBU_OFFSET (insn);
+// OBSOLETE else
+// OBSOLETE goto end_of_prologue_found;
+// OBSOLETE break;
+// OBSOLETE case PIA_NOTE_FP_ASSIGNMENT:
+// OBSOLETE if (fp_offset == -1)
+// OBSOLETE fp_offset = ADDU_OFFSET (insn);
+// OBSOLETE else
+// OBSOLETE goto end_of_prologue_found;
+// OBSOLETE break;
+// OBSOLETE case PIA_NOTE_PROLOGUE_END:
+// OBSOLETE if (!prologue_end)
+// OBSOLETE prologue_end = ip;
+// OBSOLETE break;
+// OBSOLETE case PIA_SKIP:
+// OBSOLETE default:
+// OBSOLETE /* Do nothing */
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE ip = next_ip;
+// OBSOLETE next_ip = NEXT_PROLOGUE_INSN (ip, limit, &insn);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE end_of_prologue_found:
+// OBSOLETE
+// OBSOLETE if (prologue_end)
+// OBSOLETE ip = prologue_end;
+// OBSOLETE
+// OBSOLETE /* We're done with the prologue. If we don't care about the stack
+// OBSOLETE frame itself, just return. (Note that fsr->regs has been trashed,
+// OBSOLETE but the one caller who calls with fi==0 passes a dummy there.) */
+// OBSOLETE
+// OBSOLETE if (fi == 0)
+// OBSOLETE return ip;
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE OK, now we have:
+// OBSOLETE
+// OBSOLETE sp_offset original (before any alloca calls) displacement of SP
+// OBSOLETE (will be negative).
+// OBSOLETE
+// OBSOLETE fp_offset displacement from original SP to the FP for this frame
+// OBSOLETE or -1.
+// OBSOLETE
+// OBSOLETE fsr->regs[0..31] displacement from original SP to the stack
+// OBSOLETE location where reg[0..31] is stored.
+// OBSOLETE
+// OBSOLETE must_adjust[0..31] set if corresponding offset was set.
+// OBSOLETE
+// OBSOLETE If alloca has been called between the function prologue and the current
+// OBSOLETE IP, then the current SP (frame_sp) will not be the original SP as set by
+// OBSOLETE the function prologue. If the current SP is not the original SP, then the
+// OBSOLETE compiler will have allocated an FP for this frame, fp_offset will be set,
+// OBSOLETE and we can use it to calculate the original SP.
+// OBSOLETE
+// OBSOLETE Then, we figure out where the arguments and locals are, and relocate the
+// OBSOLETE offsets in fsr->regs to absolute addresses. */
+// OBSOLETE
+// OBSOLETE if (fp_offset != -1)
+// OBSOLETE {
+// OBSOLETE /* We have a frame pointer, so get it, and base our calc's on it. */
+// OBSOLETE frame_fp = (CORE_ADDR) read_next_frame_reg (fi->next, ACTUAL_FP_REGNUM);
+// OBSOLETE frame_sp = frame_fp - fp_offset;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE /* We have no frame pointer, therefore frame_sp is still the same value
+// OBSOLETE as set by prologue. But where is the frame itself? */
+// OBSOLETE if (must_adjust[SRP_REGNUM])
+// OBSOLETE {
+// OBSOLETE /* Function header saved SRP (r1), the return address. Frame starts
+// OBSOLETE 4 bytes down from where it was saved. */
+// OBSOLETE frame_fp = frame_sp + fsr->regs[SRP_REGNUM] - 4;
+// OBSOLETE fi->locals_pointer = frame_fp;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE /* Function header didn't save SRP (r1), so we are in a leaf fn or
+// OBSOLETE are otherwise confused. */
+// OBSOLETE frame_fp = -1;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* The locals are relative to the FP (whether it exists as an allocated
+// OBSOLETE register, or just as an assumed offset from the SP) */
+// OBSOLETE fi->locals_pointer = frame_fp;
+// OBSOLETE
+// OBSOLETE /* The arguments are just above the SP as it was before we adjusted it
+// OBSOLETE on entry. */
+// OBSOLETE fi->args_pointer = frame_sp - sp_offset;
+// OBSOLETE
+// OBSOLETE /* Now that we know the SP value used by the prologue, we know where
+// OBSOLETE it saved all the registers. */
+// OBSOLETE for (src = 0; src < 32; src++)
+// OBSOLETE if (must_adjust[src])
+// OBSOLETE fsr->regs[src] += frame_sp;
+// OBSOLETE
+// OBSOLETE /* The saved value of the SP is always known. */
+// OBSOLETE /* (we hope...) */
+// OBSOLETE if (fsr->regs[SP_REGNUM] != 0
+// OBSOLETE && fsr->regs[SP_REGNUM] != frame_sp - sp_offset)
+// OBSOLETE fprintf_unfiltered (gdb_stderr, "Bad saved SP value %lx != %lx, offset %x!\n",
+// OBSOLETE fsr->regs[SP_REGNUM],
+// OBSOLETE frame_sp - sp_offset, sp_offset);
+// OBSOLETE
+// OBSOLETE fsr->regs[SP_REGNUM] = frame_sp - sp_offset;
+// OBSOLETE
+// OBSOLETE return (ip);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Given an ip value corresponding to the start of a function,
+// OBSOLETE return the ip of the first instruction after the function
+// OBSOLETE prologue. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE m88k_skip_prologue (CORE_ADDR ip)
+// OBSOLETE {
+// OBSOLETE struct frame_saved_regs saved_regs_dummy;
+// OBSOLETE struct symtab_and_line sal;
+// OBSOLETE CORE_ADDR limit;
+// OBSOLETE
+// OBSOLETE sal = find_pc_line (ip, 0);
+// OBSOLETE limit = (sal.end) ? sal.end : 0xffffffff;
+// OBSOLETE
+// OBSOLETE return (examine_prologue (ip, limit, (CORE_ADDR) 0, &saved_regs_dummy,
+// OBSOLETE (struct frame_info *) 0));
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
+// OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO.
+// OBSOLETE This includes special registers such as pc and fp saved in special
+// OBSOLETE ways in the stack frame. sp is even more special:
+// OBSOLETE the address we return for it IS the sp for the next frame.
+// OBSOLETE
+// OBSOLETE We cache the result of doing this in the frame_obstack, since it is
+// OBSOLETE fairly expensive. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE frame_find_saved_regs (struct frame_info *fi, struct frame_saved_regs *fsr)
+// OBSOLETE {
+// OBSOLETE register struct frame_saved_regs *cache_fsr;
+// OBSOLETE CORE_ADDR ip;
+// OBSOLETE struct symtab_and_line sal;
+// OBSOLETE CORE_ADDR limit;
+// OBSOLETE
+// OBSOLETE if (!fi->fsr)
+// OBSOLETE {
+// OBSOLETE cache_fsr = (struct frame_saved_regs *)
+// OBSOLETE frame_obstack_alloc (sizeof (struct frame_saved_regs));
+// OBSOLETE memset (cache_fsr, '\0', sizeof (struct frame_saved_regs));
+// OBSOLETE fi->fsr = cache_fsr;
+// OBSOLETE
+// OBSOLETE /* Find the start and end of the function prologue. If the PC
+// OBSOLETE is in the function prologue, we only consider the part that
+// OBSOLETE has executed already. In the case where the PC is not in
+// OBSOLETE the function prologue, we set limit to two instructions beyond
+// OBSOLETE where the prologue ends in case if any of the prologue instructions
+// OBSOLETE were moved into a delay slot of a branch instruction. */
+// OBSOLETE
+// OBSOLETE ip = get_pc_function_start (fi->pc);
+// OBSOLETE sal = find_pc_line (ip, 0);
+// OBSOLETE limit = (sal.end && sal.end < fi->pc) ? sal.end + 2 * BYTES_PER_88K_INSN
+// OBSOLETE : fi->pc;
+// OBSOLETE
+// OBSOLETE /* This will fill in fields in *fi as well as in cache_fsr. */
+// OBSOLETE #ifdef SIGTRAMP_FRAME_FIXUP
+// OBSOLETE if (fi->signal_handler_caller)
+// OBSOLETE SIGTRAMP_FRAME_FIXUP (fi->frame);
+// OBSOLETE #endif
+// OBSOLETE examine_prologue (ip, limit, fi->frame, cache_fsr, fi);
+// OBSOLETE #ifdef SIGTRAMP_SP_FIXUP
+// OBSOLETE if (fi->signal_handler_caller && fi->fsr->regs[SP_REGNUM])
+// OBSOLETE SIGTRAMP_SP_FIXUP (fi->fsr->regs[SP_REGNUM]);
+// OBSOLETE #endif
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (fsr)
+// OBSOLETE *fsr = *fi->fsr;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Return the address of the locals block for the frame
+// OBSOLETE described by FI. Returns 0 if the address is unknown.
+// OBSOLETE NOTE! Frame locals are referred to by negative offsets from the
+// OBSOLETE argument pointer, so this is the same as frame_args_address(). */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE frame_locals_address (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE struct frame_saved_regs fsr;
+// OBSOLETE
+// OBSOLETE if (fi->args_pointer) /* Cached value is likely there. */
+// OBSOLETE return fi->args_pointer;
+// OBSOLETE
+// OBSOLETE /* Nope, generate it. */
+// OBSOLETE
+// OBSOLETE get_frame_saved_regs (fi, &fsr);
+// OBSOLETE
+// OBSOLETE return fi->args_pointer;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Return the address of the argument block for the frame
+// OBSOLETE described by FI. Returns 0 if the address is unknown. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE frame_args_address (struct frame_info *fi)
+// OBSOLETE {
+// OBSOLETE struct frame_saved_regs fsr;
+// OBSOLETE
+// OBSOLETE if (fi->args_pointer) /* Cached value is likely there. */
+// OBSOLETE return fi->args_pointer;
+// OBSOLETE
+// OBSOLETE /* Nope, generate it. */
+// OBSOLETE
+// OBSOLETE get_frame_saved_regs (fi, &fsr);
+// OBSOLETE
+// OBSOLETE return fi->args_pointer;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Return the saved PC from this frame.
+// OBSOLETE
+// OBSOLETE If the frame has a memory copy of SRP_REGNUM, use that. If not,
+// OBSOLETE just use the register SRP_REGNUM itself. */
+// OBSOLETE
+// OBSOLETE CORE_ADDR
+// OBSOLETE frame_saved_pc (struct frame_info *frame)
+// OBSOLETE {
+// OBSOLETE return read_next_frame_reg (frame, SRP_REGNUM);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE
+// OBSOLETE #define DUMMY_FRAME_SIZE 192
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE write_word (CORE_ADDR sp, ULONGEST word)
+// OBSOLETE {
+// OBSOLETE register int len = REGISTER_SIZE;
+// OBSOLETE char buffer[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE
+// OBSOLETE store_unsigned_integer (buffer, len, word);
+// OBSOLETE write_memory (sp, buffer, len);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE m88k_push_dummy_frame (void)
+// OBSOLETE {
+// OBSOLETE register CORE_ADDR sp = read_register (SP_REGNUM);
+// OBSOLETE register int rn;
+// OBSOLETE int offset;
+// OBSOLETE
+// OBSOLETE sp -= DUMMY_FRAME_SIZE; /* allocate a bunch of space */
+// OBSOLETE
+// OBSOLETE for (rn = 0, offset = 0; rn <= SP_REGNUM; rn++, offset += 4)
+// OBSOLETE write_word (sp + offset, read_register (rn));
+// OBSOLETE
+// OBSOLETE write_word (sp + offset, read_register (SXIP_REGNUM));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE write_word (sp + offset, read_register (SNIP_REGNUM));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE write_word (sp + offset, read_register (SFIP_REGNUM));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE write_word (sp + offset, read_register (PSR_REGNUM));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE write_word (sp + offset, read_register (FPSR_REGNUM));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE write_word (sp + offset, read_register (FPCR_REGNUM));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE write_register (SP_REGNUM, sp);
+// OBSOLETE write_register (ACTUAL_FP_REGNUM, sp);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE pop_frame (void)
+// OBSOLETE {
+// OBSOLETE register struct frame_info *frame = get_current_frame ();
+// OBSOLETE register int regnum;
+// OBSOLETE struct frame_saved_regs fsr;
+// OBSOLETE
+// OBSOLETE get_frame_saved_regs (frame, &fsr);
+// OBSOLETE
+// OBSOLETE if (PC_IN_CALL_DUMMY (read_pc (), read_register (SP_REGNUM), frame->frame))
+// OBSOLETE {
+// OBSOLETE /* FIXME: I think get_frame_saved_regs should be handling this so
+// OBSOLETE that we can deal with the saved registers properly (e.g. frame
+// OBSOLETE 1 is a call dummy, the user types "frame 2" and then "print $ps"). */
+// OBSOLETE register CORE_ADDR sp = read_register (ACTUAL_FP_REGNUM);
+// OBSOLETE int offset;
+// OBSOLETE
+// OBSOLETE for (regnum = 0, offset = 0; regnum <= SP_REGNUM; regnum++, offset += 4)
+// OBSOLETE (void) write_register (regnum, read_memory_integer (sp + offset, 4));
+// OBSOLETE
+// OBSOLETE write_register (SXIP_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE write_register (SNIP_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE write_register (SFIP_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE write_register (PSR_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE write_register (FPSR_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE write_register (FPCR_REGNUM, read_memory_integer (sp + offset, 4));
+// OBSOLETE offset += 4;
+// OBSOLETE
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE for (regnum = FP_REGNUM; regnum > 0; regnum--)
+// OBSOLETE if (fsr.regs[regnum])
+// OBSOLETE write_register (regnum,
+// OBSOLETE read_memory_integer (fsr.regs[regnum], 4));
+// OBSOLETE write_pc (frame_saved_pc (frame));
+// OBSOLETE }
+// OBSOLETE reinit_frame_cache ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE _initialize_m88k_tdep (void)
+// OBSOLETE {
+// OBSOLETE tm_print_insn = print_insn_m88k;
+// OBSOLETE }
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "bcache.h"
#include "macrotab.h"
#include "macroexp.h"
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "splay-tree.h"
#include "symtab.h"
#include "symfile.h"
set_gdbarch_pc_regnum (gdbarch, 64);
set_gdbarch_sp_regnum (gdbarch, 0);
set_gdbarch_fp_regnum (gdbarch, 0);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
/* Call Dummies: */
#include "gdbcore.h"
#include "symfile.h"
#include "objfiles.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "buildsym.h"
#include "stabsread.h"
#include "complaints.h"
remove redundant breakpoint info on "-break-insert" and "-break-watch".
The event now supplies everything that is needed.
+2002-07-29 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-cmd-var.c: Include "gdb_string.h".
+ * mi-cmd-disas.c: Ditto.
+
2002-06-17 Keith Seitz <keiths@redhat.com>
* gdbmi.texinfo: Update command examples with real MI behavior.
#include "mi-cmds.h"
#include "mi-getopt.h"
#include "ui-out.h"
+#include "gdb_string.h"
/* Disassemble functions. FIXME: these do not really belong here. We
should get rid of all the duplicate code in gdb that does the same
#include "varobj.h"
#include "value.h"
#include <ctype.h>
+#include "gdb_string.h"
extern int varobjdebug; /* defined in varobj.c */
MIPS_ABI_UNKNOWN = 0,
MIPS_ABI_N32,
MIPS_ABI_O32,
+ MIPS_ABI_N64,
MIPS_ABI_O64,
MIPS_ABI_EABI32,
MIPS_ABI_EABI64,
"auto",
"n32",
"o32",
+ "n64",
"o64",
"eabi32",
"eabi64",
TYPE_LENGTH (virtual_type));
}
+/* Return the GDB type object for the "standard" data type
+ of data in register REG.
+
+ Note: kevinb/2002-08-01: The definition below should faithfully
+ reproduce the behavior of each of the REGISTER_VIRTUAL_TYPE
+ definitions found in config/mips/tm-*.h. I'm concerned about
+ the ``FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM'' clause
+ though. In some cases FP_REGNUM is in this range, and I doubt
+ that this code is correct for the 64-bit case. */
+
+static struct type *
+mips_register_virtual_type (int reg)
+{
+ if (FP0_REGNUM <= reg && reg < FP0_REGNUM + 32)
+ {
+ /* Floating point registers... */
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ return builtin_type_ieee_double_big;
+ else
+ return builtin_type_ieee_double_little;
+ }
+ else if (reg == PS_REGNUM /* CR */)
+ return builtin_type_uint32;
+ else if (FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM)
+ return builtin_type_uint32;
+ else
+ {
+ /* Everything else...
+ Return type appropriate for width of register. */
+ if (MIPS_REGSIZE == TYPE_LENGTH (builtin_type_uint64))
+ return builtin_type_uint64;
+ else
+ return builtin_type_uint32;
+ }
+}
+
/* Should the upper word of 64-bit addresses be zeroed? */
enum auto_boolean mask_address_var = AUTO_BOOLEAN_AUTO;
}
/* Should call_function allocate stack space for a struct return? */
+
int
-mips_use_struct_convention (int gcc_p, struct type *type)
+mips_eabi_use_struct_convention (int gcc_p, struct type *type)
{
- if (MIPS_EABI)
- return (TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE);
- else
- return 1; /* Structures are returned by ref in extra arg0 */
+ return (TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE);
+}
+
+int
+mips_n32n64_use_struct_convention (int gcc_p, struct type *type)
+{
+ return 1; /* Structures are returned by ref in extra arg0. */
+}
+
+int
+mips_o32_use_struct_convention (int gcc_p, struct type *type)
+{
+ return 1; /* Structures are returned by ref in extra arg0. */
+}
+
+/* Should call_function pass struct by reference?
+ For each architecture, structs are passed either by
+ value or by reference, depending on their size. */
+
+static int
+mips_eabi_reg_struct_has_addr (int gcc_p, struct type *type)
+{
+ enum type_code typecode = TYPE_CODE (check_typedef (type));
+ int len = TYPE_LENGTH (check_typedef (type));
+
+ if (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)
+ return (len > MIPS_SAVED_REGSIZE);
+
+ return 0;
+}
+
+static int
+mips_n32n64_reg_struct_has_addr (int gcc_p, struct type *type)
+{
+ return 0; /* Assumption: N32/N64 never passes struct by ref. */
+}
+
+int
+mips_o32_reg_struct_has_addr (int gcc_p, struct type *type)
+{
+ return 0; /* Assumption: O32/O64 never passes struct by ref. */
}
/* Tell if the program counter value in MEMADDR is in a MIPS16 function. */
add_offset_16 (CORE_ADDR pc, int offset)
{
return ((offset << 2) | ((pc + 2) & (0xf0000000)));
-
}
static CORE_ADDR
/* Guaranteed to set fci->saved_regs to some values (it never leaves it
NULL). */
-void
+static void
mips_find_saved_regs (struct frame_info *fci)
{
int ireg;
were saved. */
reg_position = fci->frame + PROC_FREG_OFFSET (proc_desc);
- /* The freg_offset points to where the first *double* register
- is saved. So skip to the high-order word. */
- if (!GDB_TARGET_IS_MIPS64)
+ /* Apparently, the freg_offset gives the offset to the first 64 bit
+ saved.
+
+ When the ABI specifies 64 bit saved registers, the FREG_OFFSET
+ designates the first saved 64 bit register.
+
+ When the ABI specifies 32 bit saved registers, the ``64 bit saved
+ DOUBLE'' consists of two adjacent 32 bit registers, Hence
+ FREG_OFFSET, designates the address of the lower register of the
+ register pair. Adjust the offset so that it designates the upper
+ register of the pair -- i.e., the address of the first saved 32
+ bit register. */
+
+ if (MIPS_SAVED_REGSIZE == 4)
reg_position += MIPS_SAVED_REGSIZE;
/* Fill in the offsets for the float registers which float_mask says
fci->saved_regs[PC_REGNUM] = fci->saved_regs[RA_REGNUM];
}
+/* Set up the 'saved_regs' array. This is a data structure containing
+ the addresses on the stack where each register has been saved, for
+ each stack frame. Registers that have not been saved will have
+ zero here. The stack pointer register is special: rather than the
+ address where the stack register has been saved, saved_regs[SP_REGNUM]
+ will have the actual value of the previous frame's stack register. */
+
+static void
+mips_frame_init_saved_regs (struct frame_info *frame)
+{
+ if (frame->saved_regs == NULL)
+ {
+ mips_find_saved_regs (frame);
+ }
+ frame->saved_regs[SP_REGNUM] = frame->frame;
+}
+
static CORE_ADDR
read_next_frame_reg (struct frame_info *fi, int regno)
{
{
struct symtab_and_line val;
struct symbol *proc_symbol =
- PROC_DESC_IS_DUMMY (proc_desc) ? 0 : PROC_SYMBOL (proc_desc);
+ PROC_DESC_IS_DUMMY (proc_desc) ? 0 : PROC_SYMBOL (proc_desc);
if (proc_symbol)
{
if (!proc_symbol || pc < val.pc)
{
mips_extra_func_info_t found_heuristic =
- heuristic_proc_desc (PROC_LOW_ADDR (proc_desc),
- pc, next_frame, cur_frame);
+ heuristic_proc_desc (PROC_LOW_ADDR (proc_desc),
+ pc, next_frame, cur_frame);
if (found_heuristic)
proc_desc = found_heuristic;
}
get_frame_pointer (struct frame_info *frame,
mips_extra_func_info_t proc_desc)
{
- return ADDR_BITS_REMOVE (
- read_next_frame_reg (frame, PROC_FRAME_REG (proc_desc)) +
- PROC_FRAME_OFFSET (proc_desc) - PROC_FRAME_ADJUST (proc_desc));
+ return ADDR_BITS_REMOVE (read_next_frame_reg (frame,
+ PROC_FRAME_REG (proc_desc)) +
+ PROC_FRAME_OFFSET (proc_desc) -
+ PROC_FRAME_ADJUST (proc_desc));
}
mips_extra_func_info_t cached_proc_desc;
/* Use proc_desc calculated in frame_chain */
mips_extra_func_info_t proc_desc =
- fci->next ? cached_proc_desc : find_proc_desc (fci->pc, fci->next, 1);
+ fci->next ? cached_proc_desc : find_proc_desc (fci->pc, fci->next, 1);
fci->extra_info = (struct frame_extra_info *)
frame_obstack_alloc (sizeof (struct frame_extra_info));
&& (typecode == TYPE_CODE_STRUCT || typecode == TYPE_CODE_UNION)
&& TYPE_NFIELDS (arg_type) == 1
&& TYPE_CODE (TYPE_FIELD_TYPE (arg_type, 0)) == TYPE_CODE_FLT))
- && MIPS_FPU_TYPE != MIPS_FPU_NONE);
+ && MIPS_FPU_TYPE != MIPS_FPU_NONE);
}
/* On o32, argument passing in GPRs depends on the alignment of the type being
int argnum;
int len = 0;
int stack_offset = 0;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* Macros to round N up or down to the next A boundary; A must be
a power of two. */
(len % MIPS_SAVED_REGSIZE != 0));
/* Structures should be aligned to eight bytes (even arg registers)
on MIPS_ABI_O32 if their first member has double precision. */
- if (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_O32
+ if (tdep->mips_abi == MIPS_ABI_O32
&& mips_type_needs_double_align (arg_type))
{
if ((argreg & 1))
*abip = MIPS_ABI_O32;
else if (strcmp (name, ".mdebug.abiN32") == 0)
*abip = MIPS_ABI_N32;
+ else if (strcmp (name, ".mdebug.abiN64") == 0)
+ *abip = MIPS_ABI_N64;
else if (strcmp (name, ".mdebug.abiO64") == 0)
*abip = MIPS_ABI_O64;
else if (strcmp (name, ".mdebug.eabi32") == 0)
if (info.abfd == NULL && arches != NULL)
mips_abi = gdbarch_tdep (arches->gdbarch)->found_abi;
- /* Try the architecture for any hint of the corect ABI */
+ /* Try the architecture for any hint of the correct ABI. */
if (mips_abi == MIPS_ABI_UNKNOWN
&& info.bfd_arch_info != NULL
&& info.bfd_arch_info->arch == bfd_arch_mips)
break;
case bfd_mach_mips8000:
case bfd_mach_mips10000:
- mips_abi = MIPS_ABI_N32;
+ /* On Irix, ELF64 executables use the N64 ABI. The
+ pseudo-sections which describe the ABI aren't present
+ on IRIX. (Even for executables created by gcc.) */
+ if (bfd_get_flavour (info.abfd) == bfd_target_elf_flavour
+ && elf_elfheader (info.abfd)->e_ident[EI_CLASS] == ELFCLASS64)
+ mips_abi = MIPS_ABI_N64;
+ else
+ mips_abi = MIPS_ABI_N32;
break;
}
}
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_ptr_bit (gdbarch, 32);
set_gdbarch_long_long_bit (gdbarch, 64);
+ set_gdbarch_reg_struct_has_addr (gdbarch,
+ mips_o32_reg_struct_has_addr);
+ set_gdbarch_use_struct_convention (gdbarch,
+ mips_o32_use_struct_convention);
break;
case MIPS_ABI_O64:
tdep->mips_default_saved_regsize = 8;
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_ptr_bit (gdbarch, 32);
set_gdbarch_long_long_bit (gdbarch, 64);
+ set_gdbarch_reg_struct_has_addr (gdbarch,
+ mips_o32_reg_struct_has_addr);
+ set_gdbarch_use_struct_convention (gdbarch,
+ mips_o32_use_struct_convention);
break;
case MIPS_ABI_EABI32:
tdep->mips_default_saved_regsize = 4;
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_ptr_bit (gdbarch, 32);
set_gdbarch_long_long_bit (gdbarch, 64);
+ set_gdbarch_reg_struct_has_addr (gdbarch,
+ mips_eabi_reg_struct_has_addr);
+ set_gdbarch_use_struct_convention (gdbarch,
+ mips_eabi_use_struct_convention);
break;
case MIPS_ABI_EABI64:
tdep->mips_default_saved_regsize = 8;
set_gdbarch_long_bit (gdbarch, 64);
set_gdbarch_ptr_bit (gdbarch, 64);
set_gdbarch_long_long_bit (gdbarch, 64);
+ set_gdbarch_reg_struct_has_addr (gdbarch,
+ mips_eabi_reg_struct_has_addr);
+ set_gdbarch_use_struct_convention (gdbarch,
+ mips_eabi_use_struct_convention);
break;
case MIPS_ABI_N32:
- tdep->mips_default_saved_regsize = 4;
+ tdep->mips_default_saved_regsize = 8;
tdep->mips_default_stack_argsize = 8;
tdep->mips_fp_register_double = 1;
tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
tdep->mips_regs_have_home_p = 0;
- tdep->gdb_target_is_mips64 = 0;
+ tdep->gdb_target_is_mips64 = 1;
tdep->default_mask_address_p = 0;
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_ptr_bit (gdbarch, 32);
tm_print_insn_info.mach = info.bfd_arch_info->mach;
else
tm_print_insn_info.mach = bfd_mach_mips8000;
+
+ set_gdbarch_use_struct_convention (gdbarch,
+ mips_n32n64_use_struct_convention);
+ set_gdbarch_reg_struct_has_addr (gdbarch,
+ mips_n32n64_reg_struct_has_addr);
+ break;
+ case MIPS_ABI_N64:
+ tdep->mips_default_saved_regsize = 8;
+ tdep->mips_default_stack_argsize = 8;
+ tdep->mips_fp_register_double = 1;
+ tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;
+ tdep->mips_last_fp_arg_regnum = FPA0_REGNUM + 8 - 1;
+ tdep->mips_regs_have_home_p = 0;
+ tdep->gdb_target_is_mips64 = 1;
+ tdep->default_mask_address_p = 0;
+ set_gdbarch_long_bit (gdbarch, 64);
+ set_gdbarch_ptr_bit (gdbarch, 64);
+ set_gdbarch_long_long_bit (gdbarch, 64);
+
+ /* Set up the disassembler info, so that we get the right
+ register names from libopcodes. */
+ tm_print_insn_info.flavour = bfd_target_elf_flavour;
+ tm_print_insn_info.arch = bfd_arch_mips;
+ if (info.bfd_arch_info != NULL
+ && info.bfd_arch_info->arch == bfd_arch_mips
+ && info.bfd_arch_info->mach)
+ tm_print_insn_info.mach = info.bfd_arch_info->mach;
+ else
+ tm_print_insn_info.mach = bfd_mach_mips8000;
+
+ set_gdbarch_use_struct_convention (gdbarch,
+ mips_n32n64_use_struct_convention);
+ set_gdbarch_reg_struct_has_addr (gdbarch,
+ mips_n32n64_reg_struct_has_addr);
break;
default:
internal_error (__FILE__, __LINE__,
/* Initialize a frame */
set_gdbarch_init_extra_frame_info (gdbarch, mips_init_extra_frame_info);
+ set_gdbarch_frame_init_saved_regs (gdbarch, mips_frame_init_saved_regs);
/* MIPS version of CALL_DUMMY */
set_gdbarch_address_to_pointer (gdbarch, address_to_signed_pointer);
set_gdbarch_integer_to_address (gdbarch, mips_integer_to_address);
+ /* There are MIPS targets which do not yet use this since they still
+ define REGISTER_VIRTUAL_TYPE. */
+ set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type);
+
/* Hook in OS ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch, osabi);
" o32\n"
" o64\n"
" n32\n"
+ " n64\n"
" eabi32\n"
" eabi64",
&setmipscmdlist);
#include "defs.h"
#include "frame.h"
#include "inferior.h"
-#include "obstack.h"
#include "target.h"
#include "value.h"
#include "bfd.h"
#include "defs.h"
#include "frame.h"
#include "inferior.h"
-#include "obstack.h"
#include "target.h"
#include "value.h"
#include "bfd.h"
set_gdbarch_decr_pc_after_break (gdbarch, 0);
/* Stack unwinding. */
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_frame_chain_valid (gdbarch, generic_file_frame_chain_valid);
#include "symtab.h"
#include "symfile.h" /* for generic_load */
#include "inferior.h" /* for write_pc() */
+#include "gdb_string.h"
#define USE_GENERIC_LOAD
#include <sys/types.h>
#include "gdb_stat.h"
#include <fcntl.h>
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "gdb_string.h"
#include "breakpoint.h"
#if !defined (OBJFILES_H)
#define OBJFILES_H
+#include "gdb_obstack.h" /* For obstack internals. */
+#include "symfile.h" /* For struct psymbol_allocation_list */
+
struct bcache;
/* This structure maintains information on a per-objfile basis about the
"Windows CE",
"DJGPP",
"NetWare",
+ "Irix",
"LynxOS",
"ARM EABI v1",
GDB_OSABI_WINCE,
GDB_OSABI_GO32,
GDB_OSABI_NETWARE,
+ GDB_OSABI_IRIX,
GDB_OSABI_LYNXOS,
GDB_OSABI_ARM_EABI_V1,
/* This file is derived from p-typeprint.c */
#include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "bfd.h" /* Binary File Description */
#include "symtab.h"
#include "gdbtypes.h"
/* This file is derived from c-valprint.c */
#include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
the block that we want to evaluate expressions at. When debugging
C or C++ code, we use this to find the exact line we're at, and
then look up the macro definitions active at that point. */
-CORE_ADDR expression_context_pc;
+extern CORE_ADDR expression_context_pc;
/* The innermost context required by the stack and register variables
we've encountered so far. */
void
supply_gregset (gdb_gregset_t *gregsetp)
{
- int regi;
- register elf_greg_t *regp = (elf_greg_t *) gregsetp;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- for (regi = 0; regi < 32; regi++)
- supply_register (regi, (char *) (regp + regi));
-
- supply_register (PC_REGNUM, (char *) (regp + PT_NIP));
- supply_register (tdep->ppc_lr_regnum, (char *) (regp + PT_LNK));
- supply_register (tdep->ppc_cr_regnum, (char *) (regp + PT_CCR));
- supply_register (tdep->ppc_xer_regnum, (char *) (regp + PT_XER));
- supply_register (tdep->ppc_ctr_regnum, (char *) (regp + PT_CTR));
- if (tdep->ppc_mq_regnum != -1)
- supply_register (tdep->ppc_mq_regnum, (char *) (regp + PT_MQ));
- supply_register (tdep->ppc_ps_regnum, (char *) (regp + PT_MSR));
+ ppc_linux_supply_gregset ((char *) gregsetp);
}
void
void
supply_fpregset (gdb_fpregset_t * fpregsetp)
{
- int regi;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- for (regi = 0; regi < 32; regi++)
- supply_register (FP0_REGNUM + regi, (char *) (*fpregsetp + regi));
- supply_register (tdep->ppc_fpscr_regnum, (char *) (*fpregsetp + 32));
+ ppc_linux_supply_fpregset ((char *) fpregsetp);
}
/* Given a pointer to a floating point register set in /proc format
return lmp;
}
+enum {
+ ELF_NGREG = 48,
+ ELF_NFPREG = 33,
+ ELF_NVRREG = 33
+};
+
+enum {
+ ELF_GREGSET_SIZE = (ELF_NGREG * 4),
+ ELF_FPREGSET_SIZE = (ELF_NFPREG * 8)
+};
+
+void
+ppc_linux_supply_gregset (char *buf)
+{
+ int regi;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ for (regi = 0; regi < 32; regi++)
+ supply_register (regi, buf + 4 * regi);
+
+ supply_register (PC_REGNUM, buf + 4 * PPC_LINUX_PT_NIP);
+ supply_register (tdep->ppc_lr_regnum, buf + 4 * PPC_LINUX_PT_LNK);
+ supply_register (tdep->ppc_cr_regnum, buf + 4 * PPC_LINUX_PT_CCR);
+ supply_register (tdep->ppc_xer_regnum, buf + 4 * PPC_LINUX_PT_XER);
+ supply_register (tdep->ppc_ctr_regnum, buf + 4 * PPC_LINUX_PT_CTR);
+ if (tdep->ppc_mq_regnum != -1)
+ supply_register (tdep->ppc_mq_regnum, buf + 4 * PPC_LINUX_PT_MQ);
+ supply_register (tdep->ppc_ps_regnum, buf + 4 * PPC_LINUX_PT_MSR);
+}
+
+void
+ppc_linux_supply_fpregset (char *buf)
+{
+ int regi;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ for (regi = 0; regi < 32; regi++)
+ supply_register (FP0_REGNUM + regi, buf + 8 * regi);
+
+ /* The FPSCR is stored in the low order word of the last doubleword in the
+ fpregset. */
+ supply_register (tdep->ppc_fpscr_regnum, buf + 8 * 32 + 4);
+}
+
+/*
+ Use a local version of this function to get the correct types for regsets.
+*/
+
+static void
+fetch_core_registers (char *core_reg_sect,
+ unsigned core_reg_size,
+ int which,
+ CORE_ADDR reg_addr)
+{
+ if (which == 0)
+ {
+ if (core_reg_size == ELF_GREGSET_SIZE)
+ ppc_linux_supply_gregset (core_reg_sect);
+ else
+ warning ("wrong size gregset struct in core file");
+ }
+ else if (which == 2)
+ {
+ if (core_reg_size == ELF_FPREGSET_SIZE)
+ ppc_linux_supply_fpregset (core_reg_sect);
+ else
+ warning ("wrong size fpregset struct in core file");
+ }
+}
+
+/* Register that we are able to handle ELF file formats using standard
+ procfs "regset" structures. */
+
+static struct core_fns ppc_linux_regset_core_fns =
+{
+ bfd_target_elf_flavour, /* core_flavour */
+ default_check_format, /* check_format */
+ default_core_sniffer, /* core_sniffer */
+ fetch_core_registers, /* core_read_registers */
+ NULL /* next */
+};
+
static void
ppc_linux_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
gdbarch_register_osabi (bfd_arch_powerpc, GDB_OSABI_LINUX,
ppc_linux_init_abi);
+ add_core_fns (&ppc_linux_regset_core_fns);
}
CORE_ADDR);
int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void);
+void ppc_linux_supply_gregset (char *buf);
+void ppc_linux_supply_fpregset (char *buf);
/* From rs6000-tdep.c... */
#include "gdbcmd.h"
#include "regcache.h"
#include "gdb_assert.h"
+#include "gdb_string.h"
/*
* DATA STRUCTURE
long sizeof_raw_registers;
long sizeof_raw_register_valid_p;
- /* Offset, in bytes, of reach register in the raw register cache.
- Pseudo registers have an offset even though they don't
- (shouldn't) have a correspoinding space in the register cache.
- It is to keep existing code, that relies on
- write/write_register_bytes working. */
+ /* The cooked register space. Each cooked register in the range
+ [0..NR_RAW_REGISTERS) is direct-mapped onto the corresponding raw
+ register. The remaining [NR_RAW_REGISTERS
+ .. NR_COOKED_REGISTERS) (a.k.a. pseudo regiters) are mapped onto
+ both raw registers and memory by the architecture methods
+ gdbarch_register_read and gdbarch_register_write. */
+ int nr_cooked_registers;
+
+ /* Offset and size (in 8 bit bytes), of reach register in the
+ register cache. All registers (including those in the range
+ [NR_RAW_REGISTERS .. NR_COOKED_REGISTERS) are given an offset.
+ Assigning all registers an offset makes it possible to keep
+ legacy code, such as that found in read_register_bytes() and
+ write_register_bytes() working. */
long *register_offset;
-
- /* The cooked / frame / virtual register space. The registers in
- the range [0..NR_RAW_REGISTERS) should be mapped directly onto
- the corresponding raw register. The next [NR_RAW_REGISTERS
- .. NR_REGISTERS) should have been mapped, via
- gdbarch_register_read/write onto either raw registers or memory. */
- int nr_registers;
long *sizeof_register;
- long max_register_size;
+ /* Useful constant. Largest of all the registers. */
+ long max_register_size;
};
static void *
/* FIXME: cagney/2002-05-11: Shouldn't be including pseudo-registers
in the register buffer. Unfortunatly some architectures do. */
- descr->nr_registers = NUM_REGS + NUM_PSEUDO_REGS;
- descr->nr_raw_registers = descr->nr_registers;
- descr->sizeof_raw_register_valid_p = descr->nr_registers;
+ descr->nr_cooked_registers = NUM_REGS + NUM_PSEUDO_REGS;
+ descr->nr_raw_registers = descr->nr_cooked_registers;
+ descr->sizeof_raw_register_valid_p = descr->nr_cooked_registers;
/* FIXME: cagney/2002-05-11: Instead of using REGISTER_BYTE() this
code should compute the offets et.al. at runtime. This currently
isn't possible because some targets overlap register locations -
see the mess in read_register_bytes() and write_register_bytes()
registers. */
- descr->sizeof_register = XCALLOC (descr->nr_registers, long);
- descr->register_offset = XCALLOC (descr->nr_registers, long);
+ descr->sizeof_register = XCALLOC (descr->nr_cooked_registers, long);
+ descr->register_offset = XCALLOC (descr->nr_cooked_registers, long);
descr->max_register_size = 0;
- for (i = 0; i < descr->nr_registers; i++)
+ for (i = 0; i < descr->nr_cooked_registers; i++)
{
descr->register_offset[i] = REGISTER_BYTE (i);
descr->sizeof_register[i] = REGISTER_RAW_SIZE (i);
/* Come up with the real size of the registers buffer. */
descr->sizeof_raw_registers = REGISTER_BYTES; /* OK use. */
- for (i = 0; i < descr->nr_registers; i++)
+ for (i = 0; i < descr->nr_cooked_registers; i++)
{
long regend;
/* Keep extending the buffer so that there is always enough
/* If an old style architecture, construct the register cache
description using all the register macros. */
- if (!gdbarch_register_read_p (gdbarch)
- && !gdbarch_register_write_p (gdbarch))
+ if (!gdbarch_pseudo_register_read_p (gdbarch)
+ && !gdbarch_pseudo_register_write_p (gdbarch))
return init_legacy_regcache_descr (gdbarch);
descr = XMALLOC (struct regcache_descr);
descr->gdbarch = gdbarch;
descr->legacy_p = 0;
- /* Total size of the register space. The raw registers should
- directly map onto the raw register cache while the pseudo's are
+ /* Total size of the register space. The raw registers are mapped
+ directly onto the raw register cache while the pseudo's are
either mapped onto raw-registers or memory. */
- descr->nr_registers = NUM_REGS + NUM_PSEUDO_REGS;
+ descr->nr_cooked_registers = NUM_REGS + NUM_PSEUDO_REGS;
/* Construct a strictly RAW register cache. Don't allow pseudo's
into the register cache. */
{
long offset = 0;
- descr->sizeof_register = XCALLOC (descr->nr_registers, long);
- descr->register_offset = XCALLOC (descr->nr_registers, long);
+ descr->sizeof_register = XCALLOC (descr->nr_cooked_registers, long);
+ descr->register_offset = XCALLOC (descr->nr_cooked_registers, long);
descr->max_register_size = 0;
- for (i = 0; i < descr->nr_registers; i++)
+ for (i = 0; i < descr->nr_cooked_registers; i++)
{
descr->sizeof_register[i] = TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (i));
descr->register_offset[i] = offset;
don't go into infinite recursion trying to, again, create the
regcache. */
set_gdbarch_data (gdbarch, regcache_descr_handle, descr);
- for (i = 0; i < descr->nr_registers; i++)
+ for (i = 0; i < descr->nr_cooked_registers; i++)
{
gdb_assert (descr->sizeof_register[i] == REGISTER_RAW_SIZE (i));
gdb_assert (descr->sizeof_register[i] == REGISTER_VIRTUAL_SIZE (i));
for (i = 0; i < src->descr->nr_raw_registers; i++)
{
/* Should we worry about the valid bit here? */
- regcache_read (src, i, buf);
- regcache_write (dst, i, buf);
+ regcache_raw_read (src, i, buf);
+ regcache_raw_write (dst, i, buf);
}
}
}
CORE_ADDR
-regcache_read_as_address (struct regcache *regcache, int regnum)
+regcache_raw_read_as_address (struct regcache *regcache, int regnum)
{
char *buf;
gdb_assert (regcache != NULL);
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
buf = alloca (regcache->descr->sizeof_register[regnum]);
- regcache_read (regcache, regnum, buf);
+ regcache_raw_read (regcache, regnum, buf);
return extract_address (buf, regcache->descr->sizeof_register[regnum]);
}
return regnum >= 0 && regnum < NUM_REGS;
}
-/* Return whether register REGNUM is a pseudo register. */
-
-static int
-pseudo_register (int regnum)
-{
- return regnum >= NUM_REGS && regnum < NUM_REGS + NUM_PSEUDO_REGS;
-}
-
-/* Fetch register REGNUM into the cache. */
-
-static void
-fetch_register (int regnum)
-{
- /* NOTE: cagney/2001-12-04: Legacy targets were using fetch/store
- pseudo-register as a way of handling registers that needed to be
- constructed from one or more raw registers. New targets instead
- use gdbarch register read/write. */
- if (FETCH_PSEUDO_REGISTER_P ()
- && pseudo_register (regnum))
- FETCH_PSEUDO_REGISTER (regnum);
- else
- target_fetch_registers (regnum);
-}
-
-/* Write register REGNUM cached value to the target. */
-
-static void
-store_register (int regnum)
-{
- /* NOTE: cagney/2001-12-04: Legacy targets were using fetch/store
- pseudo-register as a way of handling registers that needed to be
- constructed from one or more raw registers. New targets instead
- use gdbarch register read/write. */
- if (STORE_PSEUDO_REGISTER_P ()
- && pseudo_register (regnum))
- STORE_PSEUDO_REGISTER (regnum);
- else
- target_store_registers (regnum);
-}
-
/* Low level examining and depositing of registers.
The caller is responsible for making sure that the inferior is
}
if (!register_cached (regnum))
- fetch_register (regnum);
+ target_fetch_registers (regnum);
memcpy (myaddr, register_buffer (current_regcache, regnum),
REGISTER_RAW_SIZE (regnum));
}
void
-regcache_read (struct regcache *regcache, int regnum, char *buf)
+regcache_raw_read (struct regcache *regcache, int regnum, void *buf)
{
gdb_assert (regcache != NULL && buf != NULL);
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
registers_ptid = inferior_ptid;
}
if (!register_cached (regnum))
- fetch_register (regnum);
+ target_fetch_registers (regnum);
}
/* Copy the value directly into the register cache. */
memcpy (buf, (regcache->raw_registers
legacy_read_register_gen (regnum, buf);
return;
}
- gdbarch_register_read (current_gdbarch, regnum, buf);
+ regcache_cooked_read (current_regcache, regnum, buf);
}
+void
+regcache_cooked_read (struct regcache *regcache, int regnum, void *buf)
+{
+ gdb_assert (regnum >= 0);
+ gdb_assert (regnum < regcache->descr->nr_cooked_registers);
+ if (regnum < regcache->descr->nr_raw_registers)
+ regcache_raw_read (regcache, regnum, buf);
+ else
+ gdbarch_pseudo_register_read (regcache->descr->gdbarch, regcache,
+ regnum, buf);
+}
/* Write register REGNUM at MYADDR to the target. MYADDR points at
REGISTER_RAW_BYTES(REGNUM), which must be in target byte-order. */
static void
-legacy_write_register_gen (int regnum, char *myaddr)
+legacy_write_register_gen (int regnum, const void *myaddr)
{
int size;
gdb_assert (regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS));
memcpy (register_buffer (current_regcache, regnum), myaddr, size);
set_register_cached (regnum, 1);
- store_register (regnum);
+ target_store_registers (regnum);
}
void
-regcache_write (struct regcache *regcache, int regnum, char *buf)
+regcache_raw_write (struct regcache *regcache, int regnum, const void *buf)
{
gdb_assert (regcache != NULL && buf != NULL);
gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers);
memcpy (register_buffer (regcache, regnum), buf,
regcache->descr->sizeof_register[regnum]);
regcache->raw_register_valid_p[regnum] = 1;
- store_register (regnum);
+ target_store_registers (regnum);
}
void
legacy_write_register_gen (regnum, buf);
return;
}
- gdbarch_register_write (current_gdbarch, regnum, buf);
+ regcache_cooked_write (current_regcache, regnum, buf);
+}
+
+void
+regcache_cooked_write (struct regcache *regcache, int regnum, const void *buf)
+{
+ gdb_assert (regnum >= 0);
+ gdb_assert (regnum < regcache->descr->nr_cooked_registers);
+ if (regnum < regcache->descr->nr_raw_registers)
+ regcache_raw_write (regcache, regnum, buf);
+ else
+ gdbarch_pseudo_register_write (regcache->descr->gdbarch, regcache,
+ regnum, buf);
}
/* Copy INLEN bytes of consecutive data from memory at MYADDR
myaddr + (overlapstart - myregstart),
overlapend - overlapstart);
- store_register (regnum);
+ target_store_registers (regnum);
}
}
}
fact, and report it to the users of read_register and friends. */
void
-supply_register (int regnum, char *val)
+supply_register (int regnum, const void *val)
{
#if 1
if (! ptid_equal (registers_ptid, inferior_ptid))
/* NOTE: cagney/2001-03-16: The macro CLEAN_UP_REGISTER_VALUE is
going to be deprecated. Instead architectures will leave the raw
register value as is and instead clean things up as they pass
- through the method gdbarch_register_read() clean up the
+ through the method gdbarch_pseudo_register_read() clean up the
values. */
#ifdef DEPRECATED_CLEAN_UP_REGISTER_VALUE
/* Transfer a raw register [0..NUM_REGS) between core-gdb and the
regcache. */
-void regcache_read (struct regcache *regcache, int rawnum, char *buf);
-void regcache_write (struct regcache *regcache, int rawnum, char *buf);
+void regcache_raw_read (struct regcache *regcache, int rawnum, void *buf);
+void regcache_raw_write (struct regcache *regcache, int rawnum,
+ const void *buf);
int regcache_valid_p (struct regcache *regcache, int regnum);
-CORE_ADDR regcache_read_as_address (struct regcache *regcache, int rawnum);
+CORE_ADDR regcache_raw_read_as_address (struct regcache *regcache, int rawnum);
+
+/* Transfer a cooked register [0..NUM_REGS+NUM_PSEUDO_REGS). */
+void regcache_cooked_read (struct regcache *regcache, int rawnum, void *buf);
+void regcache_cooked_write (struct regcache *regcache, int rawnum,
+ const void *buf);
/* Transfer a raw register [0..NUM_REGS) between the regcache and the
target. These functions are called by the target in response to a
target_fetch_registers() or target_store_registers(). */
-extern void supply_register (int regnum, char *val);
+extern void supply_register (int regnum, const void *val);
extern void regcache_collect (int regnum, void *buf);
-/* Remote debugging interface for Motorola's MVME187BUG monitor, an embedded
- monitor for the m88k.
-
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
- 2002 Free Software Foundation, Inc.
-
- Contributed by Cygnus Support. Written by K. Richard Pixley.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "defs.h"
-#include "inferior.h"
-#include "gdb_string.h"
-#include "regcache.h"
-#include <ctype.h>
-#include <fcntl.h>
-#include <setjmp.h>
-#include <errno.h>
-
-#include "terminal.h"
-#include "gdbcore.h"
-#include "gdbcmd.h"
-
-#include "serial.h"
-#include "remote-utils.h"
-
-/* External data declarations */
-extern int stop_soon_quietly; /* for wait_for_inferior */
-
-/* Forward data declarations */
-extern struct target_ops bug_ops; /* Forward declaration */
-
-/* Forward function declarations */
-static int bug_clear_breakpoints (void);
-
-static int bug_read_memory (CORE_ADDR memaddr,
- unsigned char *myaddr, int len);
-
-static int bug_write_memory (CORE_ADDR memaddr,
- unsigned char *myaddr, int len);
-
-/* This variable is somewhat arbitrary. It's here so that it can be
- set from within a running gdb. */
-
-static int srec_max_retries = 3;
-
-/* Each S-record download to the target consists of an S0 header
- record, some number of S3 data records, and one S7 termination
- record. I call this download a "frame". Srec_frame says how many
- bytes will be represented in each frame. */
-
-#define SREC_SIZE 160
-static int srec_frame = SREC_SIZE;
-
-/* This variable determines how many bytes will be represented in each
- S3 s-record. */
-
-static int srec_bytes = 40;
-
-/* At one point it appeared to me as though the bug monitor could not
- really be expected to receive two sequential characters at 9600
- baud reliably. Echo-pacing is an attempt to force data across the
- line even in this condition. Specifically, in echo-pace mode, each
- character is sent one at a time and we look for the echo before
- sending the next. This is excruciatingly slow. */
-
-static int srec_echo_pace = 0;
-
-/* How long to wait after an srec for a possible error message.
- Similar to the above, I tried sleeping after sending each S3 record
- in hopes that I might actually see error messages from the bug
- monitor. This might actually work if we were to use sleep
- intervals smaller than 1 second. */
-
-static int srec_sleep = 0;
-
-/* Every srec_noise records, flub the checksum. This is a debugging
- feature. Set the variable to something other than 1 in order to
- inject *deliberate* checksum errors. One might do this if one
- wanted to test error handling and recovery. */
-
-static int srec_noise = 0;
-
-/* Called when SIGALRM signal sent due to alarm() timeout. */
-
-/* Number of SIGTRAPs we need to simulate. That is, the next
- NEED_ARTIFICIAL_TRAP calls to bug_wait should just return
- SIGTRAP without actually waiting for anything. */
-
-static int need_artificial_trap = 0;
-
-/*
- * Download a file specified in 'args', to the bug.
- */
-
-static void
-bug_load (char *args, int fromtty)
-{
- bfd *abfd;
- asection *s;
- char buffer[1024];
-
- sr_check_open ();
-
- inferior_ptid = null_ptid;
- abfd = bfd_openr (args, 0);
- if (!abfd)
- {
- printf_filtered ("Unable to open file %s\n", args);
- return;
- }
-
- if (bfd_check_format (abfd, bfd_object) == 0)
- {
- printf_filtered ("File is not an object file\n");
- return;
- }
-
- s = abfd->sections;
- while (s != (asection *) NULL)
- {
- srec_frame = SREC_SIZE;
- if (s->flags & SEC_LOAD)
- {
- int i;
-
- char *buffer = xmalloc (srec_frame);
-
- printf_filtered ("%s\t: 0x%4lx .. 0x%4lx ", s->name, s->vma, s->vma + s->_raw_size);
- gdb_flush (gdb_stdout);
- for (i = 0; i < s->_raw_size; i += srec_frame)
- {
- if (srec_frame > s->_raw_size - i)
- srec_frame = s->_raw_size - i;
-
- bfd_get_section_contents (abfd, s, buffer, i, srec_frame);
- bug_write_memory (s->vma + i, buffer, srec_frame);
- printf_filtered ("*");
- gdb_flush (gdb_stdout);
- }
- printf_filtered ("\n");
- xfree (buffer);
- }
- s = s->next;
- }
- sprintf (buffer, "rs ip %lx", (unsigned long) abfd->start_address);
- sr_write_cr (buffer);
- gr_expect_prompt ();
-}
-
-#if 0
-static char *
-get_word (char **p)
-{
- char *s = *p;
- char *word;
- char *copy;
- size_t len;
-
- while (isspace (*s))
- s++;
-
- word = s;
-
- len = 0;
-
- while (*s && !isspace (*s))
- {
- s++;
- len++;
-
- }
- copy = xmalloc (len + 1);
- memcpy (copy, word, len);
- copy[len] = 0;
- *p = s;
- return copy;
-}
-#endif
-
-static struct gr_settings bug_settings =
-{
- "Bug>", /* prompt */
- &bug_ops, /* ops */
- bug_clear_breakpoints, /* clear_all_breakpoints */
- gr_generic_checkin, /* checkin */
-};
-
-static char *cpu_check_strings[] =
-{
- "=",
- "Invalid Register",
-};
-
-static void
-bug_open (char *args, int from_tty)
-{
- if (args == NULL)
- args = "";
-
- gr_open (args, from_tty, &bug_settings);
- /* decide *now* whether we are on an 88100 or an 88110 */
- sr_write_cr ("rs cr06");
- sr_expect ("rs cr06");
-
- switch (gr_multi_scan (cpu_check_strings, 0))
- {
- case 0: /* this is an m88100 */
- target_is_m88110 = 0;
- break;
- case 1: /* this is an m88110 */
- target_is_m88110 = 1;
- break;
- default:
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
- }
-}
-
-/* Tell the remote machine to resume. */
-
-void
-bug_resume (ptid_t ptid, int step, enum target_signal sig)
-{
- if (step)
- {
- sr_write_cr ("t");
-
- /* Force the next bug_wait to return a trap. Not doing anything
- about I/O from the target means that the user has to type
- "continue" to see any. FIXME, this should be fixed. */
- need_artificial_trap = 1;
- }
- else
- sr_write_cr ("g");
-
- return;
-}
-
-/* Wait until the remote machine stops, then return,
- storing status in STATUS just as `wait' would. */
-
-static char *wait_strings[] =
-{
- "At Breakpoint",
- "Exception: Data Access Fault (Local Bus Timeout)",
- "\r8??\?-Bug>", /* The '\?' avoids creating a trigraph */
- "\r197-Bug>",
- NULL,
-};
-
-ptid_t
-bug_wait (ptid_t ptid, struct target_waitstatus *status)
-{
- int old_timeout = sr_get_timeout ();
- int old_immediate_quit = immediate_quit;
-
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = 0;
-
- /* read off leftovers from resume so that the rest can be passed
- back out as stdout. */
- if (need_artificial_trap == 0)
- {
- sr_expect ("Effective address: ");
- (void) sr_get_hex_word ();
- sr_expect ("\r\n");
- }
-
- sr_set_timeout (-1); /* Don't time out -- user program is running. */
- immediate_quit = 1; /* Helps ability to QUIT */
-
- switch (gr_multi_scan (wait_strings, need_artificial_trap == 0))
- {
- case 0: /* breakpoint case */
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
- /* user output from the target can be discarded here. (?) */
- gr_expect_prompt ();
- break;
-
- case 1: /* bus error */
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_BUS;
- /* user output from the target can be discarded here. (?) */
- gr_expect_prompt ();
- break;
-
- case 2: /* normal case */
- case 3:
- if (need_artificial_trap != 0)
- {
- /* stepping */
- status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_TRAP;
- need_artificial_trap--;
- break;
- }
- else
- {
- /* exit case */
- status->kind = TARGET_WAITKIND_EXITED;
- status->value.integer = 0;
- break;
- }
-
- case -1: /* trouble */
- default:
- fprintf_filtered (gdb_stderr,
- "Trouble reading target during wait\n");
- break;
- }
-
- sr_set_timeout (old_timeout);
- immediate_quit = old_immediate_quit;
- return inferior_ptid;
-}
-
-/* Return the name of register number REGNO
- in the form input and output by bug.
-
- Returns a pointer to a static buffer containing the answer. */
-static char *
-get_reg_name (int regno)
-{
- static char *rn[] =
- {
- "r00", "r01", "r02", "r03", "r04", "r05", "r06", "r07",
- "r08", "r09", "r10", "r11", "r12", "r13", "r14", "r15",
- "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
- "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
-
- /* these get confusing because we omit a few and switch some ordering around. */
-
- "cr01", /* 32 = psr */
- "fcr62", /* 33 = fpsr */
- "fcr63", /* 34 = fpcr */
- "ip", /* this is something of a cheat. */
- /* 35 = sxip */
- "cr05", /* 36 = snip */
- "cr06", /* 37 = sfip */
-
- "x00", "x01", "x02", "x03", "x04", "x05", "x06", "x07",
- "x08", "x09", "x10", "x11", "x12", "x13", "x14", "x15",
- "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23",
- "x24", "x25", "x26", "x27", "x28", "x29", "x30", "x31",
- };
-
- return rn[regno];
-}
-
-#if 0 /* not currently used */
-/* Read from remote while the input matches STRING. Return zero on
- success, -1 on failure. */
-
-static int
-bug_scan (char *s)
-{
- int c;
-
- while (*s)
- {
- c = sr_readchar ();
- if (c != *s++)
- {
- fflush (stdout);
- printf ("\nNext character is '%c' - %d and s is \"%s\".\n", c, c, --s);
- return (-1);
- }
- }
-
- return (0);
-}
-#endif /* never */
-
-static int
-bug_srec_write_cr (char *s)
-{
- char *p = s;
-
- if (srec_echo_pace)
- for (p = s; *p; ++p)
- {
- if (sr_get_debug () > 0)
- printf ("%c", *p);
-
- do
- serial_write (sr_get_desc (), p, 1);
- while (sr_pollchar () != *p);
- }
- else
- {
- sr_write_cr (s);
-/* return(bug_scan (s) || bug_scan ("\n")); */
- }
-
- return (0);
-}
-
-/* Store register REGNO, or all if REGNO == -1. */
-
-static void
-bug_fetch_register (int regno)
-{
- sr_check_open ();
-
- if (regno == -1)
- {
- int i;
-
- for (i = 0; i < NUM_REGS; ++i)
- bug_fetch_register (i);
- }
- else if (target_is_m88110 && regno == SFIP_REGNUM)
- {
- /* m88110 has no sfip. */
- long l = 0;
- supply_register (regno, (char *) &l);
- }
- else if (regno < XFP_REGNUM)
- {
- char buffer[MAX_REGISTER_RAW_SIZE];
-
- sr_write ("rs ", 3);
- sr_write_cr (get_reg_name (regno));
- sr_expect ("=");
- store_unsigned_integer (buffer, REGISTER_RAW_SIZE (regno),
- sr_get_hex_word ());
- gr_expect_prompt ();
- supply_register (regno, buffer);
- }
- else
- {
- /* Float register so we need to parse a strange data format. */
- long p;
- unsigned char fpreg_buf[10];
-
- sr_write ("rs ", 3);
- sr_write (get_reg_name (regno), strlen (get_reg_name (regno)));
- sr_write_cr (";d");
- sr_expect ("rs");
- sr_expect (get_reg_name (regno));
- sr_expect (";d");
- sr_expect ("=");
-
- /* sign */
- p = sr_get_hex_digit (1);
- fpreg_buf[0] = p << 7;
-
- /* exponent */
- sr_expect ("_");
- p = sr_get_hex_digit (1);
- fpreg_buf[0] += (p << 4);
- fpreg_buf[0] += sr_get_hex_digit (1);
-
- fpreg_buf[1] = sr_get_hex_digit (1) << 4;
-
- /* fraction */
- sr_expect ("_");
- fpreg_buf[1] += sr_get_hex_digit (1);
-
- fpreg_buf[2] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[3] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[4] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[5] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[6] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[7] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
- fpreg_buf[8] = 0;
- fpreg_buf[9] = 0;
-
- gr_expect_prompt ();
- supply_register (regno, fpreg_buf);
- }
-
- return;
-}
-
-/* Store register REGNO, or all if REGNO == -1. */
-
-static void
-bug_store_register (int regno)
-{
- char buffer[1024];
- sr_check_open ();
-
- if (regno == -1)
- {
- int i;
-
- for (i = 0; i < NUM_REGS; ++i)
- bug_store_register (i);
- }
- else
- {
- char *regname;
-
- regname = get_reg_name (regno);
-
- if (target_is_m88110 && regno == SFIP_REGNUM)
- return;
- else if (regno < XFP_REGNUM)
- sprintf (buffer, "rs %s %08lx",
- regname,
- (long) read_register (regno));
- else
- {
- unsigned char *fpreg_buf =
- (unsigned char *) ®isters[REGISTER_BYTE (regno)];
-
- sprintf (buffer, "rs %s %1x_%02x%1x_%1x%02x%02x%02x%02x%02x%02x;d",
- regname,
- /* sign */
- (fpreg_buf[0] >> 7) & 0xf,
- /* exponent */
- fpreg_buf[0] & 0x7f,
- (fpreg_buf[1] >> 8) & 0xf,
- /* fraction */
- fpreg_buf[1] & 0xf,
- fpreg_buf[2],
- fpreg_buf[3],
- fpreg_buf[4],
- fpreg_buf[5],
- fpreg_buf[6],
- fpreg_buf[7]);
- }
-
- sr_write_cr (buffer);
- gr_expect_prompt ();
- }
-
- return;
-}
-
-/* Transfer LEN bytes between GDB address MYADDR and target address
- MEMADDR. If WRITE is non-zero, transfer them to the target,
- otherwise transfer them from the target. TARGET is unused.
-
- Returns the number of bytes transferred. */
-
-int
-bug_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib, struct target_ops *target)
-{
- int res;
-
- if (len <= 0)
- return 0;
-
- if (write)
- res = bug_write_memory (memaddr, myaddr, len);
- else
- res = bug_read_memory (memaddr, myaddr, len);
-
- return res;
-}
-
-static void
-start_load (void)
-{
- char *command;
-
- command = (srec_echo_pace ? "lo 0 ;x" : "lo 0");
-
- sr_write_cr (command);
- sr_expect (command);
- sr_expect ("\r\n");
- bug_srec_write_cr ("S0030000FC");
- return;
-}
-
-/* This is an extremely vulnerable and fragile function. I've made
- considerable attempts to make this deterministic, but I've
- certainly forgotten something. The trouble is that S-records are
- only a partial file format, not a protocol. Worse, apparently the
- m88k bug monitor does not run in real time while receiving
- S-records. Hence, we must pay excruciating attention to when and
- where error messages are returned, and what has actually been sent.
-
- Each call represents a chunk of memory to be sent to the target.
- We break that chunk into an S0 header record, some number of S3
- data records each containing srec_bytes, and an S7 termination
- record. */
-
-static char *srecord_strings[] =
-{
- "S-RECORD",
- "-Bug>",
- NULL,
-};
-
-static int
-bug_write_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
- int done;
- int checksum;
- int x;
- int retries;
- char *buffer = alloca ((srec_bytes + 8) << 1);
-
- retries = 0;
-
- do
- {
- done = 0;
-
- if (retries > srec_max_retries)
- return (-1);
-
- if (retries > 0)
- {
- if (sr_get_debug () > 0)
- printf ("\n<retrying...>\n");
-
- /* This gr_expect_prompt call is extremely important. Without
- it, we will tend to resend our packet so fast that it
- will arrive before the bug monitor is ready to receive
- it. This would lead to a very ugly resend loop. */
-
- gr_expect_prompt ();
- }
-
- start_load ();
-
- while (done < len)
- {
- int thisgo;
- int idx;
- char *buf = buffer;
- CORE_ADDR address;
-
- checksum = 0;
- thisgo = len - done;
- if (thisgo > srec_bytes)
- thisgo = srec_bytes;
-
- address = memaddr + done;
- sprintf (buf, "S3%02X%08lX", thisgo + 4 + 1, (long) address);
- buf += 12;
-
- checksum += (thisgo + 4 + 1
- + (address & 0xff)
- + ((address >> 8) & 0xff)
- + ((address >> 16) & 0xff)
- + ((address >> 24) & 0xff));
-
- for (idx = 0; idx < thisgo; idx++)
- {
- sprintf (buf, "%02X", myaddr[idx + done]);
- checksum += myaddr[idx + done];
- buf += 2;
- }
-
- if (srec_noise > 0)
- {
- /* FIXME-NOW: insert a deliberate error every now and then.
- This is intended for testing/debugging the error handling
- stuff. */
- static int counter = 0;
- if (++counter > srec_noise)
- {
- counter = 0;
- ++checksum;
- }
- }
-
- sprintf (buf, "%02X", ~checksum & 0xff);
- bug_srec_write_cr (buffer);
-
- if (srec_sleep != 0)
- sleep (srec_sleep);
-
- /* This pollchar is probably redundant to the gr_multi_scan
- below. Trouble is, we can't be sure when or where an
- error message will appear. Apparently, when running at
- full speed from a typical sun4, error messages tend to
- appear to arrive only *after* the s7 record. */
-
- if ((x = sr_pollchar ()) != 0)
- {
- if (sr_get_debug () > 0)
- printf ("\n<retrying...>\n");
-
- ++retries;
-
- /* flush any remaining input and verify that we are back
- at the prompt level. */
- gr_expect_prompt ();
- /* start all over again. */
- start_load ();
- done = 0;
- continue;
- }
-
- done += thisgo;
- }
-
- bug_srec_write_cr ("S7060000000000F9");
- ++retries;
-
- /* Having finished the load, we need to figure out whether we
- had any errors. */
- }
- while (gr_multi_scan (srecord_strings, 0) == 0);;
-
- return (0);
-}
-
-/* Copy LEN bytes of data from debugger memory at MYADDR
- to inferior's memory at MEMADDR. Returns errno value.
- * sb/sh instructions don't work on unaligned addresses, when TU=1.
- */
-
-/* Read LEN bytes from inferior memory at MEMADDR. Put the result
- at debugger address MYADDR. Returns errno value. */
-static int
-bug_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
-{
- char request[100];
- char *buffer;
- char *p;
- char type;
- char size;
- unsigned char c;
- unsigned int inaddr;
- unsigned int checksum;
-
- sprintf (request, "du 0 %lx:&%d", (long) memaddr, len);
- sr_write_cr (request);
-
- p = buffer = alloca (len);
-
- /* scan up through the header */
- sr_expect ("S0030000FC");
-
- while (p < buffer + len)
- {
- /* scan off any white space. */
- while (sr_readchar () != 'S');;
-
- /* what kind of s-rec? */
- type = sr_readchar ();
-
- /* scan record size */
- sr_get_hex_byte (&size);
- checksum = size;
- --size;
- inaddr = 0;
-
- switch (type)
- {
- case '7':
- case '8':
- case '9':
- goto done;
-
- case '3':
- sr_get_hex_byte (&c);
- inaddr = (inaddr << 8) + c;
- checksum += c;
- --size;
- /* intentional fall through */
- case '2':
- sr_get_hex_byte (&c);
- inaddr = (inaddr << 8) + c;
- checksum += c;
- --size;
- /* intentional fall through */
- case '1':
- sr_get_hex_byte (&c);
- inaddr = (inaddr << 8) + c;
- checksum += c;
- --size;
- sr_get_hex_byte (&c);
- inaddr = (inaddr << 8) + c;
- checksum += c;
- --size;
- break;
-
- default:
- /* bonk */
- error ("reading s-records.");
- }
-
- if (inaddr < memaddr
- || (memaddr + len) < (inaddr + size))
- error ("srec out of memory range.");
-
- if (p != buffer + inaddr - memaddr)
- error ("srec out of sequence.");
-
- for (; size; --size, ++p)
- {
- sr_get_hex_byte (p);
- checksum += *p;
- }
-
- sr_get_hex_byte (&c);
- if (c != (~checksum & 0xff))
- error ("bad s-rec checksum");
- }
-
-done:
- gr_expect_prompt ();
- if (p != buffer + len)
- return (1);
-
- memcpy (myaddr, buffer, len);
- return (0);
-}
-
-#define MAX_BREAKS 16
-static int num_brkpts = 0;
-
-/* Insert a breakpoint at ADDR. SAVE is normally the address of the
- pattern buffer where the instruction that the breakpoint overwrites
- is saved. It is unused here since the bug is responsible for
- saving/restoring the original instruction. */
-
-static int
-bug_insert_breakpoint (CORE_ADDR addr, char *save)
-{
- sr_check_open ();
-
- if (num_brkpts < MAX_BREAKS)
- {
- char buffer[100];
-
- num_brkpts++;
- sprintf (buffer, "br %lx", (long) addr);
- sr_write_cr (buffer);
- gr_expect_prompt ();
- return (0);
- }
- else
- {
- fprintf_filtered (gdb_stderr,
- "Too many break points, break point not installed\n");
- return (1);
- }
-
-}
-
-/* Remove a breakpoint at ADDR. SAVE is normally the previously
- saved pattern, but is unused here since the bug is responsible
- for saving/restoring instructions. */
-
-static int
-bug_remove_breakpoint (CORE_ADDR addr, char *save)
-{
- if (num_brkpts > 0)
- {
- char buffer[100];
-
- num_brkpts--;
- sprintf (buffer, "nobr %lx", (long) addr);
- sr_write_cr (buffer);
- gr_expect_prompt ();
-
- }
- return (0);
-}
-
-/* Clear the bugs notion of what the break points are */
-static int
-bug_clear_breakpoints (void)
-{
-
- if (sr_is_open ())
- {
- sr_write_cr ("nobr");
- sr_expect ("nobr");
- gr_expect_prompt ();
- }
- num_brkpts = 0;
- return (0);
-}
-
-struct target_ops bug_ops;
-
-static void
-init_bug_ops (void)
-{
- bug_ops.to_shortname = "bug";
- "Remote BUG monitor",
- bug_ops.to_longname = "Use the mvme187 board running the BUG monitor connected by a serial line.";
- bug_ops.to_doc = " ";
- bug_ops.to_open = bug_open;
- bug_ops.to_close = gr_close;
- bug_ops.to_attach = 0;
- bug_ops.to_post_attach = NULL;
- bug_ops.to_require_attach = NULL;
- bug_ops.to_detach = gr_detach;
- bug_ops.to_require_detach = NULL;
- bug_ops.to_resume = bug_resume;
- bug_ops.to_wait = bug_wait;
- bug_ops.to_post_wait = NULL;
- bug_ops.to_fetch_registers = bug_fetch_register;
- bug_ops.to_store_registers = bug_store_register;
- bug_ops.to_prepare_to_store = gr_prepare_to_store;
- bug_ops.to_xfer_memory = bug_xfer_memory;
- bug_ops.to_files_info = gr_files_info;
- bug_ops.to_insert_breakpoint = bug_insert_breakpoint;
- bug_ops.to_remove_breakpoint = bug_remove_breakpoint;
- bug_ops.to_terminal_init = 0;
- bug_ops.to_terminal_inferior = 0;
- bug_ops.to_terminal_ours_for_output = 0;
- bug_ops.to_terminal_ours = 0;
- bug_ops.to_terminal_info = 0;
- bug_ops.to_kill = gr_kill;
- bug_ops.to_load = bug_load;
- bug_ops.to_lookup_symbol = 0;
- bug_ops.to_create_inferior = gr_create_inferior;
- bug_ops.to_post_startup_inferior = NULL;
- bug_ops.to_acknowledge_created_inferior = NULL;
- bug_ops.to_clone_and_follow_inferior = NULL;
- bug_ops.to_post_follow_inferior_by_clone = NULL;
- bug_ops.to_insert_fork_catchpoint = NULL;
- bug_ops.to_remove_fork_catchpoint = NULL;
- bug_ops.to_insert_vfork_catchpoint = NULL;
- bug_ops.to_remove_vfork_catchpoint = NULL;
- bug_ops.to_has_forked = NULL;
- bug_ops.to_has_vforked = NULL;
- bug_ops.to_can_follow_vfork_prior_to_exec = NULL;
- bug_ops.to_post_follow_vfork = NULL;
- bug_ops.to_insert_exec_catchpoint = NULL;
- bug_ops.to_remove_exec_catchpoint = NULL;
- bug_ops.to_has_execd = NULL;
- bug_ops.to_reported_exec_events_per_exec_call = NULL;
- bug_ops.to_has_exited = NULL;
- bug_ops.to_mourn_inferior = gr_mourn;
- bug_ops.to_can_run = 0;
- bug_ops.to_notice_signals = 0;
- bug_ops.to_thread_alive = 0;
- bug_ops.to_stop = 0;
- bug_ops.to_pid_to_exec_file = NULL;
- bug_ops.to_stratum = process_stratum;
- bug_ops.DONT_USE = 0;
- bug_ops.to_has_all_memory = 1;
- bug_ops.to_has_memory = 1;
- bug_ops.to_has_stack = 1;
- bug_ops.to_has_registers = 0;
- bug_ops.to_has_execution = 0;
- bug_ops.to_sections = 0;
- bug_ops.to_sections_end = 0;
- bug_ops.to_magic = OPS_MAGIC; /* Always the last thing */
-} /* init_bug_ops */
-
-void
-_initialize_remote_bug (void)
-{
- init_bug_ops ();
- add_target (&bug_ops);
-
- add_show_from_set
- (add_set_cmd ("srec-bytes", class_support, var_uinteger,
- (char *) &srec_bytes,
- "\
-Set the number of bytes represented in each S-record.\n\
-This affects the communication protocol with the remote target.",
- &setlist),
- &showlist);
-
- add_show_from_set
- (add_set_cmd ("srec-max-retries", class_support, var_uinteger,
- (char *) &srec_max_retries,
- "\
-Set the number of retries for shipping S-records.\n\
-This affects the communication protocol with the remote target.",
- &setlist),
- &showlist);
-
-#if 0
- /* This needs to set SREC_SIZE, not srec_frame which gets changed at the
- end of a download. But do we need the option at all? */
- add_show_from_set
- (add_set_cmd ("srec-frame", class_support, var_uinteger,
- (char *) &srec_frame,
- "\
-Set the number of bytes in an S-record frame.\n\
-This affects the communication protocol with the remote target.",
- &setlist),
- &showlist);
-#endif /* 0 */
-
- add_show_from_set
- (add_set_cmd ("srec-noise", class_support, var_zinteger,
- (char *) &srec_noise,
- "\
-Set number of S-record to send before deliberately flubbing a checksum.\n\
-Zero means flub none at all. This affects the communication protocol\n\
-with the remote target.",
- &setlist),
- &showlist);
-
- add_show_from_set
- (add_set_cmd ("srec-sleep", class_support, var_zinteger,
- (char *) &srec_sleep,
- "\
-Set number of seconds to sleep after an S-record for a possible error message to arrive.\n\
-This affects the communication protocol with the remote target.",
- &setlist),
- &showlist);
-
- add_show_from_set
- (add_set_cmd ("srec-echo-pace", class_support, var_boolean,
- (char *) &srec_echo_pace,
- "\
-Set echo-verification.\n\
-When on, use verification by echo when downloading S-records. This is\n\
-much slower, but generally more reliable.",
- &setlist),
- &showlist);
-}
+// OBSOLETE /* Remote debugging interface for Motorola's MVME187BUG monitor, an embedded
+// OBSOLETE monitor for the m88k.
+// OBSOLETE
+// OBSOLETE Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+// OBSOLETE 2002 Free Software Foundation, Inc.
+// OBSOLETE
+// OBSOLETE Contributed by Cygnus Support. Written by K. Richard Pixley.
+// OBSOLETE
+// OBSOLETE This file is part of GDB.
+// OBSOLETE
+// OBSOLETE This program is free software; you can redistribute it and/or modify
+// OBSOLETE it under the terms of the GNU General Public License as published by
+// OBSOLETE the Free Software Foundation; either version 2 of the License, or
+// OBSOLETE (at your option) any later version.
+// OBSOLETE
+// OBSOLETE This program is distributed in the hope that it will be useful,
+// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of
+// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// OBSOLETE GNU General Public License for more details.
+// OBSOLETE
+// OBSOLETE You should have received a copy of the GNU General Public License
+// OBSOLETE along with this program; if not, write to the Free Software
+// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,
+// OBSOLETE Boston, MA 02111-1307, USA. */
+// OBSOLETE
+// OBSOLETE #include "defs.h"
+// OBSOLETE #include "inferior.h"
+// OBSOLETE #include "gdb_string.h"
+// OBSOLETE #include "regcache.h"
+// OBSOLETE #include <ctype.h>
+// OBSOLETE #include <fcntl.h>
+// OBSOLETE #include <setjmp.h>
+// OBSOLETE #include <errno.h>
+// OBSOLETE
+// OBSOLETE #include "terminal.h"
+// OBSOLETE #include "gdbcore.h"
+// OBSOLETE #include "gdbcmd.h"
+// OBSOLETE
+// OBSOLETE #include "serial.h"
+// OBSOLETE #include "remote-utils.h"
+// OBSOLETE
+// OBSOLETE /* External data declarations */
+// OBSOLETE extern int stop_soon_quietly; /* for wait_for_inferior */
+// OBSOLETE
+// OBSOLETE /* Forward data declarations */
+// OBSOLETE extern struct target_ops bug_ops; /* Forward declaration */
+// OBSOLETE
+// OBSOLETE /* Forward function declarations */
+// OBSOLETE static int bug_clear_breakpoints (void);
+// OBSOLETE
+// OBSOLETE static int bug_read_memory (CORE_ADDR memaddr,
+// OBSOLETE unsigned char *myaddr, int len);
+// OBSOLETE
+// OBSOLETE static int bug_write_memory (CORE_ADDR memaddr,
+// OBSOLETE unsigned char *myaddr, int len);
+// OBSOLETE
+// OBSOLETE /* This variable is somewhat arbitrary. It's here so that it can be
+// OBSOLETE set from within a running gdb. */
+// OBSOLETE
+// OBSOLETE static int srec_max_retries = 3;
+// OBSOLETE
+// OBSOLETE /* Each S-record download to the target consists of an S0 header
+// OBSOLETE record, some number of S3 data records, and one S7 termination
+// OBSOLETE record. I call this download a "frame". Srec_frame says how many
+// OBSOLETE bytes will be represented in each frame. */
+// OBSOLETE
+// OBSOLETE #define SREC_SIZE 160
+// OBSOLETE static int srec_frame = SREC_SIZE;
+// OBSOLETE
+// OBSOLETE /* This variable determines how many bytes will be represented in each
+// OBSOLETE S3 s-record. */
+// OBSOLETE
+// OBSOLETE static int srec_bytes = 40;
+// OBSOLETE
+// OBSOLETE /* At one point it appeared to me as though the bug monitor could not
+// OBSOLETE really be expected to receive two sequential characters at 9600
+// OBSOLETE baud reliably. Echo-pacing is an attempt to force data across the
+// OBSOLETE line even in this condition. Specifically, in echo-pace mode, each
+// OBSOLETE character is sent one at a time and we look for the echo before
+// OBSOLETE sending the next. This is excruciatingly slow. */
+// OBSOLETE
+// OBSOLETE static int srec_echo_pace = 0;
+// OBSOLETE
+// OBSOLETE /* How long to wait after an srec for a possible error message.
+// OBSOLETE Similar to the above, I tried sleeping after sending each S3 record
+// OBSOLETE in hopes that I might actually see error messages from the bug
+// OBSOLETE monitor. This might actually work if we were to use sleep
+// OBSOLETE intervals smaller than 1 second. */
+// OBSOLETE
+// OBSOLETE static int srec_sleep = 0;
+// OBSOLETE
+// OBSOLETE /* Every srec_noise records, flub the checksum. This is a debugging
+// OBSOLETE feature. Set the variable to something other than 1 in order to
+// OBSOLETE inject *deliberate* checksum errors. One might do this if one
+// OBSOLETE wanted to test error handling and recovery. */
+// OBSOLETE
+// OBSOLETE static int srec_noise = 0;
+// OBSOLETE
+// OBSOLETE /* Called when SIGALRM signal sent due to alarm() timeout. */
+// OBSOLETE
+// OBSOLETE /* Number of SIGTRAPs we need to simulate. That is, the next
+// OBSOLETE NEED_ARTIFICIAL_TRAP calls to bug_wait should just return
+// OBSOLETE SIGTRAP without actually waiting for anything. */
+// OBSOLETE
+// OBSOLETE static int need_artificial_trap = 0;
+// OBSOLETE
+// OBSOLETE /*
+// OBSOLETE * Download a file specified in 'args', to the bug.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE bug_load (char *args, int fromtty)
+// OBSOLETE {
+// OBSOLETE bfd *abfd;
+// OBSOLETE asection *s;
+// OBSOLETE char buffer[1024];
+// OBSOLETE
+// OBSOLETE sr_check_open ();
+// OBSOLETE
+// OBSOLETE inferior_ptid = null_ptid;
+// OBSOLETE abfd = bfd_openr (args, 0);
+// OBSOLETE if (!abfd)
+// OBSOLETE {
+// OBSOLETE printf_filtered ("Unable to open file %s\n", args);
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (bfd_check_format (abfd, bfd_object) == 0)
+// OBSOLETE {
+// OBSOLETE printf_filtered ("File is not an object file\n");
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE s = abfd->sections;
+// OBSOLETE while (s != (asection *) NULL)
+// OBSOLETE {
+// OBSOLETE srec_frame = SREC_SIZE;
+// OBSOLETE if (s->flags & SEC_LOAD)
+// OBSOLETE {
+// OBSOLETE int i;
+// OBSOLETE
+// OBSOLETE char *buffer = xmalloc (srec_frame);
+// OBSOLETE
+// OBSOLETE printf_filtered ("%s\t: 0x%4lx .. 0x%4lx ", s->name, s->vma, s->vma + s->_raw_size);
+// OBSOLETE gdb_flush (gdb_stdout);
+// OBSOLETE for (i = 0; i < s->_raw_size; i += srec_frame)
+// OBSOLETE {
+// OBSOLETE if (srec_frame > s->_raw_size - i)
+// OBSOLETE srec_frame = s->_raw_size - i;
+// OBSOLETE
+// OBSOLETE bfd_get_section_contents (abfd, s, buffer, i, srec_frame);
+// OBSOLETE bug_write_memory (s->vma + i, buffer, srec_frame);
+// OBSOLETE printf_filtered ("*");
+// OBSOLETE gdb_flush (gdb_stdout);
+// OBSOLETE }
+// OBSOLETE printf_filtered ("\n");
+// OBSOLETE xfree (buffer);
+// OBSOLETE }
+// OBSOLETE s = s->next;
+// OBSOLETE }
+// OBSOLETE sprintf (buffer, "rs ip %lx", (unsigned long) abfd->start_address);
+// OBSOLETE sr_write_cr (buffer);
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #if 0
+// OBSOLETE static char *
+// OBSOLETE get_word (char **p)
+// OBSOLETE {
+// OBSOLETE char *s = *p;
+// OBSOLETE char *word;
+// OBSOLETE char *copy;
+// OBSOLETE size_t len;
+// OBSOLETE
+// OBSOLETE while (isspace (*s))
+// OBSOLETE s++;
+// OBSOLETE
+// OBSOLETE word = s;
+// OBSOLETE
+// OBSOLETE len = 0;
+// OBSOLETE
+// OBSOLETE while (*s && !isspace (*s))
+// OBSOLETE {
+// OBSOLETE s++;
+// OBSOLETE len++;
+// OBSOLETE
+// OBSOLETE }
+// OBSOLETE copy = xmalloc (len + 1);
+// OBSOLETE memcpy (copy, word, len);
+// OBSOLETE copy[len] = 0;
+// OBSOLETE *p = s;
+// OBSOLETE return copy;
+// OBSOLETE }
+// OBSOLETE #endif
+// OBSOLETE
+// OBSOLETE static struct gr_settings bug_settings =
+// OBSOLETE {
+// OBSOLETE "Bug>", /* prompt */
+// OBSOLETE &bug_ops, /* ops */
+// OBSOLETE bug_clear_breakpoints, /* clear_all_breakpoints */
+// OBSOLETE gr_generic_checkin, /* checkin */
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE static char *cpu_check_strings[] =
+// OBSOLETE {
+// OBSOLETE "=",
+// OBSOLETE "Invalid Register",
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE bug_open (char *args, int from_tty)
+// OBSOLETE {
+// OBSOLETE if (args == NULL)
+// OBSOLETE args = "";
+// OBSOLETE
+// OBSOLETE gr_open (args, from_tty, &bug_settings);
+// OBSOLETE /* decide *now* whether we are on an 88100 or an 88110 */
+// OBSOLETE sr_write_cr ("rs cr06");
+// OBSOLETE sr_expect ("rs cr06");
+// OBSOLETE
+// OBSOLETE switch (gr_multi_scan (cpu_check_strings, 0))
+// OBSOLETE {
+// OBSOLETE case 0: /* this is an m88100 */
+// OBSOLETE target_is_m88110 = 0;
+// OBSOLETE break;
+// OBSOLETE case 1: /* this is an m88110 */
+// OBSOLETE target_is_m88110 = 1;
+// OBSOLETE break;
+// OBSOLETE default:
+// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check");
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Tell the remote machine to resume. */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE bug_resume (ptid_t ptid, int step, enum target_signal sig)
+// OBSOLETE {
+// OBSOLETE if (step)
+// OBSOLETE {
+// OBSOLETE sr_write_cr ("t");
+// OBSOLETE
+// OBSOLETE /* Force the next bug_wait to return a trap. Not doing anything
+// OBSOLETE about I/O from the target means that the user has to type
+// OBSOLETE "continue" to see any. FIXME, this should be fixed. */
+// OBSOLETE need_artificial_trap = 1;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE sr_write_cr ("g");
+// OBSOLETE
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Wait until the remote machine stops, then return,
+// OBSOLETE storing status in STATUS just as `wait' would. */
+// OBSOLETE
+// OBSOLETE static char *wait_strings[] =
+// OBSOLETE {
+// OBSOLETE "At Breakpoint",
+// OBSOLETE "Exception: Data Access Fault (Local Bus Timeout)",
+// OBSOLETE "\r8??\?-Bug>", /* The '\?' avoids creating a trigraph */
+// OBSOLETE "\r197-Bug>",
+// OBSOLETE NULL,
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE ptid_t
+// OBSOLETE bug_wait (ptid_t ptid, struct target_waitstatus *status)
+// OBSOLETE {
+// OBSOLETE int old_timeout = sr_get_timeout ();
+// OBSOLETE int old_immediate_quit = immediate_quit;
+// OBSOLETE
+// OBSOLETE status->kind = TARGET_WAITKIND_EXITED;
+// OBSOLETE status->value.integer = 0;
+// OBSOLETE
+// OBSOLETE /* read off leftovers from resume so that the rest can be passed
+// OBSOLETE back out as stdout. */
+// OBSOLETE if (need_artificial_trap == 0)
+// OBSOLETE {
+// OBSOLETE sr_expect ("Effective address: ");
+// OBSOLETE (void) sr_get_hex_word ();
+// OBSOLETE sr_expect ("\r\n");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE sr_set_timeout (-1); /* Don't time out -- user program is running. */
+// OBSOLETE immediate_quit = 1; /* Helps ability to QUIT */
+// OBSOLETE
+// OBSOLETE switch (gr_multi_scan (wait_strings, need_artificial_trap == 0))
+// OBSOLETE {
+// OBSOLETE case 0: /* breakpoint case */
+// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED;
+// OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP;
+// OBSOLETE /* user output from the target can be discarded here. (?) */
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case 1: /* bus error */
+// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED;
+// OBSOLETE status->value.sig = TARGET_SIGNAL_BUS;
+// OBSOLETE /* user output from the target can be discarded here. (?) */
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE case 2: /* normal case */
+// OBSOLETE case 3:
+// OBSOLETE if (need_artificial_trap != 0)
+// OBSOLETE {
+// OBSOLETE /* stepping */
+// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED;
+// OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP;
+// OBSOLETE need_artificial_trap--;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE /* exit case */
+// OBSOLETE status->kind = TARGET_WAITKIND_EXITED;
+// OBSOLETE status->value.integer = 0;
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE case -1: /* trouble */
+// OBSOLETE default:
+// OBSOLETE fprintf_filtered (gdb_stderr,
+// OBSOLETE "Trouble reading target during wait\n");
+// OBSOLETE break;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE sr_set_timeout (old_timeout);
+// OBSOLETE immediate_quit = old_immediate_quit;
+// OBSOLETE return inferior_ptid;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Return the name of register number REGNO
+// OBSOLETE in the form input and output by bug.
+// OBSOLETE
+// OBSOLETE Returns a pointer to a static buffer containing the answer. */
+// OBSOLETE static char *
+// OBSOLETE get_reg_name (int regno)
+// OBSOLETE {
+// OBSOLETE static char *rn[] =
+// OBSOLETE {
+// OBSOLETE "r00", "r01", "r02", "r03", "r04", "r05", "r06", "r07",
+// OBSOLETE "r08", "r09", "r10", "r11", "r12", "r13", "r14", "r15",
+// OBSOLETE "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
+// OBSOLETE "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
+// OBSOLETE
+// OBSOLETE /* these get confusing because we omit a few and switch some ordering around. */
+// OBSOLETE
+// OBSOLETE "cr01", /* 32 = psr */
+// OBSOLETE "fcr62", /* 33 = fpsr */
+// OBSOLETE "fcr63", /* 34 = fpcr */
+// OBSOLETE "ip", /* this is something of a cheat. */
+// OBSOLETE /* 35 = sxip */
+// OBSOLETE "cr05", /* 36 = snip */
+// OBSOLETE "cr06", /* 37 = sfip */
+// OBSOLETE
+// OBSOLETE "x00", "x01", "x02", "x03", "x04", "x05", "x06", "x07",
+// OBSOLETE "x08", "x09", "x10", "x11", "x12", "x13", "x14", "x15",
+// OBSOLETE "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23",
+// OBSOLETE "x24", "x25", "x26", "x27", "x28", "x29", "x30", "x31",
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE return rn[regno];
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #if 0 /* not currently used */
+// OBSOLETE /* Read from remote while the input matches STRING. Return zero on
+// OBSOLETE success, -1 on failure. */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE bug_scan (char *s)
+// OBSOLETE {
+// OBSOLETE int c;
+// OBSOLETE
+// OBSOLETE while (*s)
+// OBSOLETE {
+// OBSOLETE c = sr_readchar ();
+// OBSOLETE if (c != *s++)
+// OBSOLETE {
+// OBSOLETE fflush (stdout);
+// OBSOLETE printf ("\nNext character is '%c' - %d and s is \"%s\".\n", c, c, --s);
+// OBSOLETE return (-1);
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE #endif /* never */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE bug_srec_write_cr (char *s)
+// OBSOLETE {
+// OBSOLETE char *p = s;
+// OBSOLETE
+// OBSOLETE if (srec_echo_pace)
+// OBSOLETE for (p = s; *p; ++p)
+// OBSOLETE {
+// OBSOLETE if (sr_get_debug () > 0)
+// OBSOLETE printf ("%c", *p);
+// OBSOLETE
+// OBSOLETE do
+// OBSOLETE serial_write (sr_get_desc (), p, 1);
+// OBSOLETE while (sr_pollchar () != *p);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE sr_write_cr (s);
+// OBSOLETE /* return(bug_scan (s) || bug_scan ("\n")); */
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Store register REGNO, or all if REGNO == -1. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE bug_fetch_register (int regno)
+// OBSOLETE {
+// OBSOLETE sr_check_open ();
+// OBSOLETE
+// OBSOLETE if (regno == -1)
+// OBSOLETE {
+// OBSOLETE int i;
+// OBSOLETE
+// OBSOLETE for (i = 0; i < NUM_REGS; ++i)
+// OBSOLETE bug_fetch_register (i);
+// OBSOLETE }
+// OBSOLETE else if (target_is_m88110 && regno == SFIP_REGNUM)
+// OBSOLETE {
+// OBSOLETE /* m88110 has no sfip. */
+// OBSOLETE long l = 0;
+// OBSOLETE supply_register (regno, (char *) &l);
+// OBSOLETE }
+// OBSOLETE else if (regno < XFP_REGNUM)
+// OBSOLETE {
+// OBSOLETE char buffer[MAX_REGISTER_RAW_SIZE];
+// OBSOLETE
+// OBSOLETE sr_write ("rs ", 3);
+// OBSOLETE sr_write_cr (get_reg_name (regno));
+// OBSOLETE sr_expect ("=");
+// OBSOLETE store_unsigned_integer (buffer, REGISTER_RAW_SIZE (regno),
+// OBSOLETE sr_get_hex_word ());
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE supply_register (regno, buffer);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE /* Float register so we need to parse a strange data format. */
+// OBSOLETE long p;
+// OBSOLETE unsigned char fpreg_buf[10];
+// OBSOLETE
+// OBSOLETE sr_write ("rs ", 3);
+// OBSOLETE sr_write (get_reg_name (regno), strlen (get_reg_name (regno)));
+// OBSOLETE sr_write_cr (";d");
+// OBSOLETE sr_expect ("rs");
+// OBSOLETE sr_expect (get_reg_name (regno));
+// OBSOLETE sr_expect (";d");
+// OBSOLETE sr_expect ("=");
+// OBSOLETE
+// OBSOLETE /* sign */
+// OBSOLETE p = sr_get_hex_digit (1);
+// OBSOLETE fpreg_buf[0] = p << 7;
+// OBSOLETE
+// OBSOLETE /* exponent */
+// OBSOLETE sr_expect ("_");
+// OBSOLETE p = sr_get_hex_digit (1);
+// OBSOLETE fpreg_buf[0] += (p << 4);
+// OBSOLETE fpreg_buf[0] += sr_get_hex_digit (1);
+// OBSOLETE
+// OBSOLETE fpreg_buf[1] = sr_get_hex_digit (1) << 4;
+// OBSOLETE
+// OBSOLETE /* fraction */
+// OBSOLETE sr_expect ("_");
+// OBSOLETE fpreg_buf[1] += sr_get_hex_digit (1);
+// OBSOLETE
+// OBSOLETE fpreg_buf[2] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE fpreg_buf[3] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE fpreg_buf[4] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE fpreg_buf[5] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE fpreg_buf[6] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE fpreg_buf[7] = (sr_get_hex_digit (1) << 4) + sr_get_hex_digit (1);
+// OBSOLETE fpreg_buf[8] = 0;
+// OBSOLETE fpreg_buf[9] = 0;
+// OBSOLETE
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE supply_register (regno, fpreg_buf);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Store register REGNO, or all if REGNO == -1. */
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE bug_store_register (int regno)
+// OBSOLETE {
+// OBSOLETE char buffer[1024];
+// OBSOLETE sr_check_open ();
+// OBSOLETE
+// OBSOLETE if (regno == -1)
+// OBSOLETE {
+// OBSOLETE int i;
+// OBSOLETE
+// OBSOLETE for (i = 0; i < NUM_REGS; ++i)
+// OBSOLETE bug_store_register (i);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE char *regname;
+// OBSOLETE
+// OBSOLETE regname = get_reg_name (regno);
+// OBSOLETE
+// OBSOLETE if (target_is_m88110 && regno == SFIP_REGNUM)
+// OBSOLETE return;
+// OBSOLETE else if (regno < XFP_REGNUM)
+// OBSOLETE sprintf (buffer, "rs %s %08lx",
+// OBSOLETE regname,
+// OBSOLETE (long) read_register (regno));
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE unsigned char *fpreg_buf =
+// OBSOLETE (unsigned char *) ®isters[REGISTER_BYTE (regno)];
+// OBSOLETE
+// OBSOLETE sprintf (buffer, "rs %s %1x_%02x%1x_%1x%02x%02x%02x%02x%02x%02x;d",
+// OBSOLETE regname,
+// OBSOLETE /* sign */
+// OBSOLETE (fpreg_buf[0] >> 7) & 0xf,
+// OBSOLETE /* exponent */
+// OBSOLETE fpreg_buf[0] & 0x7f,
+// OBSOLETE (fpreg_buf[1] >> 8) & 0xf,
+// OBSOLETE /* fraction */
+// OBSOLETE fpreg_buf[1] & 0xf,
+// OBSOLETE fpreg_buf[2],
+// OBSOLETE fpreg_buf[3],
+// OBSOLETE fpreg_buf[4],
+// OBSOLETE fpreg_buf[5],
+// OBSOLETE fpreg_buf[6],
+// OBSOLETE fpreg_buf[7]);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE sr_write_cr (buffer);
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Transfer LEN bytes between GDB address MYADDR and target address
+// OBSOLETE MEMADDR. If WRITE is non-zero, transfer them to the target,
+// OBSOLETE otherwise transfer them from the target. TARGET is unused.
+// OBSOLETE
+// OBSOLETE Returns the number of bytes transferred. */
+// OBSOLETE
+// OBSOLETE int
+// OBSOLETE bug_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+// OBSOLETE struct mem_attrib *attrib, struct target_ops *target)
+// OBSOLETE {
+// OBSOLETE int res;
+// OBSOLETE
+// OBSOLETE if (len <= 0)
+// OBSOLETE return 0;
+// OBSOLETE
+// OBSOLETE if (write)
+// OBSOLETE res = bug_write_memory (memaddr, myaddr, len);
+// OBSOLETE else
+// OBSOLETE res = bug_read_memory (memaddr, myaddr, len);
+// OBSOLETE
+// OBSOLETE return res;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE start_load (void)
+// OBSOLETE {
+// OBSOLETE char *command;
+// OBSOLETE
+// OBSOLETE command = (srec_echo_pace ? "lo 0 ;x" : "lo 0");
+// OBSOLETE
+// OBSOLETE sr_write_cr (command);
+// OBSOLETE sr_expect (command);
+// OBSOLETE sr_expect ("\r\n");
+// OBSOLETE bug_srec_write_cr ("S0030000FC");
+// OBSOLETE return;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* This is an extremely vulnerable and fragile function. I've made
+// OBSOLETE considerable attempts to make this deterministic, but I've
+// OBSOLETE certainly forgotten something. The trouble is that S-records are
+// OBSOLETE only a partial file format, not a protocol. Worse, apparently the
+// OBSOLETE m88k bug monitor does not run in real time while receiving
+// OBSOLETE S-records. Hence, we must pay excruciating attention to when and
+// OBSOLETE where error messages are returned, and what has actually been sent.
+// OBSOLETE
+// OBSOLETE Each call represents a chunk of memory to be sent to the target.
+// OBSOLETE We break that chunk into an S0 header record, some number of S3
+// OBSOLETE data records each containing srec_bytes, and an S7 termination
+// OBSOLETE record. */
+// OBSOLETE
+// OBSOLETE static char *srecord_strings[] =
+// OBSOLETE {
+// OBSOLETE "S-RECORD",
+// OBSOLETE "-Bug>",
+// OBSOLETE NULL,
+// OBSOLETE };
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE bug_write_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
+// OBSOLETE {
+// OBSOLETE int done;
+// OBSOLETE int checksum;
+// OBSOLETE int x;
+// OBSOLETE int retries;
+// OBSOLETE char *buffer = alloca ((srec_bytes + 8) << 1);
+// OBSOLETE
+// OBSOLETE retries = 0;
+// OBSOLETE
+// OBSOLETE do
+// OBSOLETE {
+// OBSOLETE done = 0;
+// OBSOLETE
+// OBSOLETE if (retries > srec_max_retries)
+// OBSOLETE return (-1);
+// OBSOLETE
+// OBSOLETE if (retries > 0)
+// OBSOLETE {
+// OBSOLETE if (sr_get_debug () > 0)
+// OBSOLETE printf ("\n<retrying...>\n");
+// OBSOLETE
+// OBSOLETE /* This gr_expect_prompt call is extremely important. Without
+// OBSOLETE it, we will tend to resend our packet so fast that it
+// OBSOLETE will arrive before the bug monitor is ready to receive
+// OBSOLETE it. This would lead to a very ugly resend loop. */
+// OBSOLETE
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE start_load ();
+// OBSOLETE
+// OBSOLETE while (done < len)
+// OBSOLETE {
+// OBSOLETE int thisgo;
+// OBSOLETE int idx;
+// OBSOLETE char *buf = buffer;
+// OBSOLETE CORE_ADDR address;
+// OBSOLETE
+// OBSOLETE checksum = 0;
+// OBSOLETE thisgo = len - done;
+// OBSOLETE if (thisgo > srec_bytes)
+// OBSOLETE thisgo = srec_bytes;
+// OBSOLETE
+// OBSOLETE address = memaddr + done;
+// OBSOLETE sprintf (buf, "S3%02X%08lX", thisgo + 4 + 1, (long) address);
+// OBSOLETE buf += 12;
+// OBSOLETE
+// OBSOLETE checksum += (thisgo + 4 + 1
+// OBSOLETE + (address & 0xff)
+// OBSOLETE + ((address >> 8) & 0xff)
+// OBSOLETE + ((address >> 16) & 0xff)
+// OBSOLETE + ((address >> 24) & 0xff));
+// OBSOLETE
+// OBSOLETE for (idx = 0; idx < thisgo; idx++)
+// OBSOLETE {
+// OBSOLETE sprintf (buf, "%02X", myaddr[idx + done]);
+// OBSOLETE checksum += myaddr[idx + done];
+// OBSOLETE buf += 2;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (srec_noise > 0)
+// OBSOLETE {
+// OBSOLETE /* FIXME-NOW: insert a deliberate error every now and then.
+// OBSOLETE This is intended for testing/debugging the error handling
+// OBSOLETE stuff. */
+// OBSOLETE static int counter = 0;
+// OBSOLETE if (++counter > srec_noise)
+// OBSOLETE {
+// OBSOLETE counter = 0;
+// OBSOLETE ++checksum;
+// OBSOLETE }
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE sprintf (buf, "%02X", ~checksum & 0xff);
+// OBSOLETE bug_srec_write_cr (buffer);
+// OBSOLETE
+// OBSOLETE if (srec_sleep != 0)
+// OBSOLETE sleep (srec_sleep);
+// OBSOLETE
+// OBSOLETE /* This pollchar is probably redundant to the gr_multi_scan
+// OBSOLETE below. Trouble is, we can't be sure when or where an
+// OBSOLETE error message will appear. Apparently, when running at
+// OBSOLETE full speed from a typical sun4, error messages tend to
+// OBSOLETE appear to arrive only *after* the s7 record. */
+// OBSOLETE
+// OBSOLETE if ((x = sr_pollchar ()) != 0)
+// OBSOLETE {
+// OBSOLETE if (sr_get_debug () > 0)
+// OBSOLETE printf ("\n<retrying...>\n");
+// OBSOLETE
+// OBSOLETE ++retries;
+// OBSOLETE
+// OBSOLETE /* flush any remaining input and verify that we are back
+// OBSOLETE at the prompt level. */
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE /* start all over again. */
+// OBSOLETE start_load ();
+// OBSOLETE done = 0;
+// OBSOLETE continue;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE done += thisgo;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE bug_srec_write_cr ("S7060000000000F9");
+// OBSOLETE ++retries;
+// OBSOLETE
+// OBSOLETE /* Having finished the load, we need to figure out whether we
+// OBSOLETE had any errors. */
+// OBSOLETE }
+// OBSOLETE while (gr_multi_scan (srecord_strings, 0) == 0);;
+// OBSOLETE
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Copy LEN bytes of data from debugger memory at MYADDR
+// OBSOLETE to inferior's memory at MEMADDR. Returns errno value.
+// OBSOLETE * sb/sh instructions don't work on unaligned addresses, when TU=1.
+// OBSOLETE */
+// OBSOLETE
+// OBSOLETE /* Read LEN bytes from inferior memory at MEMADDR. Put the result
+// OBSOLETE at debugger address MYADDR. Returns errno value. */
+// OBSOLETE static int
+// OBSOLETE bug_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
+// OBSOLETE {
+// OBSOLETE char request[100];
+// OBSOLETE char *buffer;
+// OBSOLETE char *p;
+// OBSOLETE char type;
+// OBSOLETE char size;
+// OBSOLETE unsigned char c;
+// OBSOLETE unsigned int inaddr;
+// OBSOLETE unsigned int checksum;
+// OBSOLETE
+// OBSOLETE sprintf (request, "du 0 %lx:&%d", (long) memaddr, len);
+// OBSOLETE sr_write_cr (request);
+// OBSOLETE
+// OBSOLETE p = buffer = alloca (len);
+// OBSOLETE
+// OBSOLETE /* scan up through the header */
+// OBSOLETE sr_expect ("S0030000FC");
+// OBSOLETE
+// OBSOLETE while (p < buffer + len)
+// OBSOLETE {
+// OBSOLETE /* scan off any white space. */
+// OBSOLETE while (sr_readchar () != 'S');;
+// OBSOLETE
+// OBSOLETE /* what kind of s-rec? */
+// OBSOLETE type = sr_readchar ();
+// OBSOLETE
+// OBSOLETE /* scan record size */
+// OBSOLETE sr_get_hex_byte (&size);
+// OBSOLETE checksum = size;
+// OBSOLETE --size;
+// OBSOLETE inaddr = 0;
+// OBSOLETE
+// OBSOLETE switch (type)
+// OBSOLETE {
+// OBSOLETE case '7':
+// OBSOLETE case '8':
+// OBSOLETE case '9':
+// OBSOLETE goto done;
+// OBSOLETE
+// OBSOLETE case '3':
+// OBSOLETE sr_get_hex_byte (&c);
+// OBSOLETE inaddr = (inaddr << 8) + c;
+// OBSOLETE checksum += c;
+// OBSOLETE --size;
+// OBSOLETE /* intentional fall through */
+// OBSOLETE case '2':
+// OBSOLETE sr_get_hex_byte (&c);
+// OBSOLETE inaddr = (inaddr << 8) + c;
+// OBSOLETE checksum += c;
+// OBSOLETE --size;
+// OBSOLETE /* intentional fall through */
+// OBSOLETE case '1':
+// OBSOLETE sr_get_hex_byte (&c);
+// OBSOLETE inaddr = (inaddr << 8) + c;
+// OBSOLETE checksum += c;
+// OBSOLETE --size;
+// OBSOLETE sr_get_hex_byte (&c);
+// OBSOLETE inaddr = (inaddr << 8) + c;
+// OBSOLETE checksum += c;
+// OBSOLETE --size;
+// OBSOLETE break;
+// OBSOLETE
+// OBSOLETE default:
+// OBSOLETE /* bonk */
+// OBSOLETE error ("reading s-records.");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE if (inaddr < memaddr
+// OBSOLETE || (memaddr + len) < (inaddr + size))
+// OBSOLETE error ("srec out of memory range.");
+// OBSOLETE
+// OBSOLETE if (p != buffer + inaddr - memaddr)
+// OBSOLETE error ("srec out of sequence.");
+// OBSOLETE
+// OBSOLETE for (; size; --size, ++p)
+// OBSOLETE {
+// OBSOLETE sr_get_hex_byte (p);
+// OBSOLETE checksum += *p;
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE sr_get_hex_byte (&c);
+// OBSOLETE if (c != (~checksum & 0xff))
+// OBSOLETE error ("bad s-rec checksum");
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE done:
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE if (p != buffer + len)
+// OBSOLETE return (1);
+// OBSOLETE
+// OBSOLETE memcpy (myaddr, buffer, len);
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE #define MAX_BREAKS 16
+// OBSOLETE static int num_brkpts = 0;
+// OBSOLETE
+// OBSOLETE /* Insert a breakpoint at ADDR. SAVE is normally the address of the
+// OBSOLETE pattern buffer where the instruction that the breakpoint overwrites
+// OBSOLETE is saved. It is unused here since the bug is responsible for
+// OBSOLETE saving/restoring the original instruction. */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE bug_insert_breakpoint (CORE_ADDR addr, char *save)
+// OBSOLETE {
+// OBSOLETE sr_check_open ();
+// OBSOLETE
+// OBSOLETE if (num_brkpts < MAX_BREAKS)
+// OBSOLETE {
+// OBSOLETE char buffer[100];
+// OBSOLETE
+// OBSOLETE num_brkpts++;
+// OBSOLETE sprintf (buffer, "br %lx", (long) addr);
+// OBSOLETE sr_write_cr (buffer);
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE else
+// OBSOLETE {
+// OBSOLETE fprintf_filtered (gdb_stderr,
+// OBSOLETE "Too many break points, break point not installed\n");
+// OBSOLETE return (1);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Remove a breakpoint at ADDR. SAVE is normally the previously
+// OBSOLETE saved pattern, but is unused here since the bug is responsible
+// OBSOLETE for saving/restoring instructions. */
+// OBSOLETE
+// OBSOLETE static int
+// OBSOLETE bug_remove_breakpoint (CORE_ADDR addr, char *save)
+// OBSOLETE {
+// OBSOLETE if (num_brkpts > 0)
+// OBSOLETE {
+// OBSOLETE char buffer[100];
+// OBSOLETE
+// OBSOLETE num_brkpts--;
+// OBSOLETE sprintf (buffer, "nobr %lx", (long) addr);
+// OBSOLETE sr_write_cr (buffer);
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE
+// OBSOLETE }
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE /* Clear the bugs notion of what the break points are */
+// OBSOLETE static int
+// OBSOLETE bug_clear_breakpoints (void)
+// OBSOLETE {
+// OBSOLETE
+// OBSOLETE if (sr_is_open ())
+// OBSOLETE {
+// OBSOLETE sr_write_cr ("nobr");
+// OBSOLETE sr_expect ("nobr");
+// OBSOLETE gr_expect_prompt ();
+// OBSOLETE }
+// OBSOLETE num_brkpts = 0;
+// OBSOLETE return (0);
+// OBSOLETE }
+// OBSOLETE
+// OBSOLETE struct target_ops bug_ops;
+// OBSOLETE
+// OBSOLETE static void
+// OBSOLETE init_bug_ops (void)
+// OBSOLETE {
+// OBSOLETE bug_ops.to_shortname = "bug";
+// OBSOLETE "Remote BUG monitor",
+// OBSOLETE bug_ops.to_longname = "Use the mvme187 board running the BUG monitor connected by a serial line.";
+// OBSOLETE bug_ops.to_doc = " ";
+// OBSOLETE bug_ops.to_open = bug_open;
+// OBSOLETE bug_ops.to_close = gr_close;
+// OBSOLETE bug_ops.to_attach = 0;
+// OBSOLETE bug_ops.to_post_attach = NULL;
+// OBSOLETE bug_ops.to_require_attach = NULL;
+// OBSOLETE bug_ops.to_detach = gr_detach;
+// OBSOLETE bug_ops.to_require_detach = NULL;
+// OBSOLETE bug_ops.to_resume = bug_resume;
+// OBSOLETE bug_ops.to_wait = bug_wait;
+// OBSOLETE bug_ops.to_post_wait = NULL;
+// OBSOLETE bug_ops.to_fetch_registers = bug_fetch_register;
+// OBSOLETE bug_ops.to_store_registers = bug_store_register;
+// OBSOLETE bug_ops.to_prepare_to_store = gr_prepare_to_store;
+// OBSOLETE bug_ops.to_xfer_memory = bug_xfer_memory;
+// OBSOLETE bug_ops.to_files_info = gr_files_info;
+// OBSOLETE bug_ops.to_insert_breakpoint = bug_insert_breakpoint;
+// OBSOLETE bug_ops.to_remove_breakpoint = bug_remove_breakpoint;
+// OBSOLETE bug_ops.to_terminal_init = 0;
+// OBSOLETE bug_ops.to_terminal_inferior = 0;
+// OBSOLETE bug_ops.to_terminal_ours_for_output = 0;
+// OBSOLETE bug_ops.to_terminal_ours = 0;
+// OBSOLETE bug_ops.to_terminal_info = 0;
+// OBSOLETE bug_ops.to_kill = gr_kill;
+// OBSOLETE bug_ops.to_load = bug_load;
+// OBSOLETE bug_ops.to_lookup_symbol = 0;
+// OBSOLETE bug_ops.to_create_inferior = gr_create_inferior;
+// OBSOLETE bug_ops.to_post_startup_inferior = NULL;
+// OBSOLETE bug_ops.to_acknowledge_created_inferior = NULL;
+// OBSOLETE bug_ops.to_clone_and_follow_inferior = NULL;
+// OBSOLETE bug_ops.to_post_follow_inferior_by_clone = NULL;
+// OBSOLETE bug_ops.to_insert_fork_catchpoint = NULL;
+// OBSOLETE bug_ops.to_remove_fork_catchpoint = NULL;
+// OBSOLETE bug_ops.to_insert_vfork_catchpoint = NULL;
+// OBSOLETE bug_ops.to_remove_vfork_catchpoint = NULL;
+// OBSOLETE bug_ops.to_has_forked = NULL;
+// OBSOLETE bug_ops.to_has_vforked = NULL;
+// OBSOLETE bug_ops.to_can_follow_vfork_prior_to_exec = NULL;
+// OBSOLETE bug_ops.to_post_follow_vfork = NULL;
+// OBSOLETE bug_ops.to_insert_exec_catchpoint = NULL;
+// OBSOLETE bug_ops.to_remove_exec_catchpoint = NULL;
+// OBSOLETE bug_ops.to_has_execd = NULL;
+// OBSOLETE bug_ops.to_reported_exec_events_per_exec_call = NULL;
+// OBSOLETE bug_ops.to_has_exited = NULL;
+// OBSOLETE bug_ops.to_mourn_inferior = gr_mourn;
+// OBSOLETE bug_ops.to_can_run = 0;
+// OBSOLETE bug_ops.to_notice_signals = 0;
+// OBSOLETE bug_ops.to_thread_alive = 0;
+// OBSOLETE bug_ops.to_stop = 0;
+// OBSOLETE bug_ops.to_pid_to_exec_file = NULL;
+// OBSOLETE bug_ops.to_stratum = process_stratum;
+// OBSOLETE bug_ops.DONT_USE = 0;
+// OBSOLETE bug_ops.to_has_all_memory = 1;
+// OBSOLETE bug_ops.to_has_memory = 1;
+// OBSOLETE bug_ops.to_has_stack = 1;
+// OBSOLETE bug_ops.to_has_registers = 0;
+// OBSOLETE bug_ops.to_has_execution = 0;
+// OBSOLETE bug_ops.to_sections = 0;
+// OBSOLETE bug_ops.to_sections_end = 0;
+// OBSOLETE bug_ops.to_magic = OPS_MAGIC; /* Always the last thing */
+// OBSOLETE } /* init_bug_ops */
+// OBSOLETE
+// OBSOLETE void
+// OBSOLETE _initialize_remote_bug (void)
+// OBSOLETE {
+// OBSOLETE init_bug_ops ();
+// OBSOLETE add_target (&bug_ops);
+// OBSOLETE
+// OBSOLETE add_show_from_set
+// OBSOLETE (add_set_cmd ("srec-bytes", class_support, var_uinteger,
+// OBSOLETE (char *) &srec_bytes,
+// OBSOLETE "\
+// OBSOLETE Set the number of bytes represented in each S-record.\n\
+// OBSOLETE This affects the communication protocol with the remote target.",
+// OBSOLETE &setlist),
+// OBSOLETE &showlist);
+// OBSOLETE
+// OBSOLETE add_show_from_set
+// OBSOLETE (add_set_cmd ("srec-max-retries", class_support, var_uinteger,
+// OBSOLETE (char *) &srec_max_retries,
+// OBSOLETE "\
+// OBSOLETE Set the number of retries for shipping S-records.\n\
+// OBSOLETE This affects the communication protocol with the remote target.",
+// OBSOLETE &setlist),
+// OBSOLETE &showlist);
+// OBSOLETE
+// OBSOLETE #if 0
+// OBSOLETE /* This needs to set SREC_SIZE, not srec_frame which gets changed at the
+// OBSOLETE end of a download. But do we need the option at all? */
+// OBSOLETE add_show_from_set
+// OBSOLETE (add_set_cmd ("srec-frame", class_support, var_uinteger,
+// OBSOLETE (char *) &srec_frame,
+// OBSOLETE "\
+// OBSOLETE Set the number of bytes in an S-record frame.\n\
+// OBSOLETE This affects the communication protocol with the remote target.",
+// OBSOLETE &setlist),
+// OBSOLETE &showlist);
+// OBSOLETE #endif /* 0 */
+// OBSOLETE
+// OBSOLETE add_show_from_set
+// OBSOLETE (add_set_cmd ("srec-noise", class_support, var_zinteger,
+// OBSOLETE (char *) &srec_noise,
+// OBSOLETE "\
+// OBSOLETE Set number of S-record to send before deliberately flubbing a checksum.\n\
+// OBSOLETE Zero means flub none at all. This affects the communication protocol\n\
+// OBSOLETE with the remote target.",
+// OBSOLETE &setlist),
+// OBSOLETE &showlist);
+// OBSOLETE
+// OBSOLETE add_show_from_set
+// OBSOLETE (add_set_cmd ("srec-sleep", class_support, var_zinteger,
+// OBSOLETE (char *) &srec_sleep,
+// OBSOLETE "\
+// OBSOLETE Set number of seconds to sleep after an S-record for a possible error message to arrive.\n\
+// OBSOLETE This affects the communication protocol with the remote target.",
+// OBSOLETE &setlist),
+// OBSOLETE &showlist);
+// OBSOLETE
+// OBSOLETE add_show_from_set
+// OBSOLETE (add_set_cmd ("srec-echo-pace", class_support, var_boolean,
+// OBSOLETE (char *) &srec_echo_pace,
+// OBSOLETE "\
+// OBSOLETE Set echo-verification.\n\
+// OBSOLETE When on, use verification by echo when downloading S-records. This is\n\
+// OBSOLETE much slower, but generally more reliable.",
+// OBSOLETE &setlist),
+// OBSOLETE &showlist);
+// OBSOLETE }
long remote_packet_size;
};
+
/* Handle for retreving the remote protocol data from gdbarch. */
static struct gdbarch_data *remote_gdbarch_data_handle;
return NULL;
}
-/* */
+/* FIXME: graces/2002-08-08: These variables should eventually be
+ bound to an instance of the target object (as in gdbarch-tdep()),
+ when such a thing exists. */
+
+/* This is set to the data address of the access causing the target
+ to stop for a watchpoint. */
+static CORE_ADDR remote_watch_data_address;
+
+/* This is non-zero if taregt stopped for a watchpoint. */
+static int remote_stopped_by_watchpoint_p;
+
static struct target_ops remote_ops;
#define BUF_THREAD_ID_SIZE (OPAQUETHREADBYTES*2)
-char *unpack_varlen_hex (char *buff, int *result);
+char *unpack_varlen_hex (char *buff, ULONGEST *result);
static char *unpack_nibble (char *buf, int *val);
char *
unpack_varlen_hex (char *buff, /* packet to parse */
- int *result)
+ ULONGEST *result)
{
int nibble;
int retval = 0;
{
struct remote_state *rs = get_remote_state ();
unsigned char *buf = alloca (rs->remote_packet_size);
- int thread_num = -1;
+ ULONGEST thread_num = -1;
+ ULONGEST addr;
status->kind = TARGET_WAITKIND_EXITED;
status->value.integer = 0;
if (target_wait_loop_hook)
(*target_wait_loop_hook) ();
+ remote_stopped_by_watchpoint_p = 0;
+
switch (buf[0])
{
case 'E': /* Error of some sort */
unsigned char *p1;
char *p_temp;
int fieldsize;
+ LONGEST pnum = 0;
+
+ /* If the packet contains a register number save it in pnum
+ and set p1 to point to the character following it.
+ Otherwise p1 points to p. */
- /* Read the ``P'' register number. */
- LONGEST pnum = strtol ((const char *) p, &p_temp, 16);
- p1 = (unsigned char *) p_temp;
+ /* If this packet is an awatch packet, don't parse the 'a'
+ as a register number. */
+
+ if (strncmp (p, "awatch", strlen("awatch")) != 0)
+ {
+ /* Read the ``P'' register number. */
+ pnum = strtol (p, &p_temp, 16);
+ p1 = (unsigned char *) p_temp;
+ }
+ else
+ p1 = p;
if (p1 == p) /* No register number present here */
{
- p1 = (unsigned char *) strchr ((const char *) p, ':');
+ p1 = (unsigned char *) strchr (p, ':');
if (p1 == NULL)
warning ("Malformed packet(a) (missing colon): %s\n\
Packet: '%s'\n",
p, buf);
- if (strncmp ((const char *) p, "thread", p1 - p) == 0)
+ if (strncmp (p, "thread", p1 - p) == 0)
{
p_temp = unpack_varlen_hex (++p1, &thread_num);
record_currthread (thread_num);
p = (unsigned char *) p_temp;
}
+ else if ((strncmp (p, "watch", p1 - p) == 0)
+ || (strncmp (p, "rwatch", p1 - p) == 0)
+ || (strncmp (p, "awatch", p1 - p) == 0))
+ {
+ remote_stopped_by_watchpoint_p = 1;
+ p = unpack_varlen_hex (++p1, &addr);
+ remote_watch_data_address = (CORE_ADDR)addr;
+ }
+ else
+ {
+ /* Silently skip unknown optional info. */
+ p_temp = strchr (p1 + 1, ';');
+ if (p_temp)
+ p = (unsigned char *) p_temp;
+ }
}
else
{
{
struct remote_state *rs = get_remote_state ();
unsigned char *buf = alloca (rs->remote_packet_size);
- int thread_num = -1;
+ ULONGEST thread_num = -1;
+ ULONGEST addr;
status->kind = TARGET_WAITKIND_EXITED;
status->value.integer = 0;
+ remote_stopped_by_watchpoint_p = 0;
+
while (1)
{
unsigned char *p;
unsigned char *p1;
char *p_temp;
int fieldsize;
+ long pnum = 0;
- /* Read the register number */
- long pnum = strtol ((const char *) p, &p_temp, 16);
- p1 = (unsigned char *) p_temp;
+ /* If the packet contains a register number, save it in pnum
+ and set p1 to point to the character following it.
+ Otherwise p1 points to p. */
+
+ /* If this packet is an awatch packet, don't parse the 'a'
+ as a register number. */
+
+ if (!strncmp (p, "awatch", strlen ("awatch")) != 0)
+ {
+ /* Read the register number. */
+ pnum = strtol (p, &p_temp, 16);
+ p1 = (unsigned char *) p_temp;
+ }
+ else
+ p1 = p;
if (p1 == p) /* No register number present here */
{
- p1 = (unsigned char *) strchr ((const char *) p, ':');
+ p1 = (unsigned char *) strchr (p, ':');
if (p1 == NULL)
warning ("Malformed packet(a) (missing colon): %s\n\
Packet: '%s'\n",
p, buf);
- if (strncmp ((const char *) p, "thread", p1 - p) == 0)
+ if (strncmp (p, "thread", p1 - p) == 0)
{
p_temp = unpack_varlen_hex (++p1, &thread_num);
record_currthread (thread_num);
p = (unsigned char *) p_temp;
}
+ else if ((strncmp (p, "watch", p1 - p) == 0)
+ || (strncmp (p, "rwatch", p1 - p) == 0)
+ || (strncmp (p, "awatch", p1 - p) == 0))
+ {
+ remote_stopped_by_watchpoint_p = 1;
+ p = unpack_varlen_hex (++p1, &addr);
+ remote_watch_data_address = (CORE_ADDR)addr;
+ }
+ else
+ {
+ /* Silently skip unknown optional info. */
+ p_temp = (unsigned char *) strchr (p1 + 1, ';');
+ if (p_temp)
+ p = p_temp;
+ }
}
+
else
{
struct packet_reg *reg = packet_reg_from_pnum (rs, pnum);
putpkt (buf);
getpkt (buf, sizeof_buf, 0);
- if (buf[0] == 'E')
+ if (buf[0] == 'E'
+ && isxdigit (buf[1]) && isxdigit (buf[2])
+ && buf[3] == '\0')
{
/* There is no correspondance between what the remote protocol uses
for errors and errno codes. We would like a cleaner way of
}
}
-/* FIXME: This function should be static and a member of the remote
- target vector. */
-
-int
+static int
remote_insert_watchpoint (CORE_ADDR addr, int len, int type)
{
struct remote_state *rs = get_remote_state ();
"remote_insert_watchpoint: reached end of function");
}
-/* FIXME: This function should be static and a member of the remote
- target vector. */
-int
+static int
remote_remove_watchpoint (CORE_ADDR addr, int len, int type)
{
struct remote_state *rs = get_remote_state ();
"remote_remove_watchpoint: reached end of function");
}
-/* FIXME: This function should be static and a member of the remote
- target vector. */
+
+int remote_hw_watchpoint_limit = 0;
+int remote_hw_breakpoint_limit = 0;
+
+int
+remote_check_watch_resources (int type, int cnt, int ot)
+{
+ if (type == bp_hardware_breakpoint)
+ {
+ if (remote_hw_breakpoint_limit == 0)
+ return 0;
+ else if (cnt <= remote_hw_breakpoint_limit)
+ return 1;
+ }
+ else
+ {
+ if (remote_hw_watchpoint_limit == 0)
+ return 0;
+ else if (ot)
+ return -1;
+ else if (cnt <= remote_hw_watchpoint_limit)
+ return 1;
+ }
+ return -1;
+}
int
-remote_insert_hw_breakpoint (CORE_ADDR addr, int len)
+remote_stopped_by_watchpoint (void)
{
+ return remote_stopped_by_watchpoint_p;
+}
+
+CORE_ADDR
+remote_stopped_data_address (void)
+{
+ if (remote_stopped_by_watchpoint ())
+ return remote_watch_data_address;
+ return (CORE_ADDR)0;
+}
+
+
+static int
+remote_insert_hw_breakpoint (CORE_ADDR addr, char *shadow)
+{
+ int len = 0;
struct remote_state *rs = get_remote_state ();
char *buf = alloca (rs->remote_packet_size);
char *p = buf;
+ /* The length field should be set to soething so that the packet is
+ well formed. */
+
+ len = strlen (shadow);
+ len = len ? len : 1;
if (remote_protocol_Z[Z_PACKET_HARDWARE_BP].support == PACKET_DISABLE)
error ("Can't set hardware breakpoint without the '%s' (%s) packet\n",
remote_protocol_Z[Z_PACKET_HARDWARE_BP].name,
return 0;
}
internal_error (__FILE__, __LINE__,
- "remote_remove_watchpoint: reached end of function");
+ "remote_insert_hw_breakpoint: reached end of function");
}
-/* FIXME: This function should be static and a member of the remote
- target vector. */
-int
-remote_remove_hw_breakpoint (CORE_ADDR addr, int len)
+static int
+remote_remove_hw_breakpoint (CORE_ADDR addr, char *shadow)
{
+ int len;
struct remote_state *rs = get_remote_state ();
char *buf = alloca (rs->remote_packet_size);
char *p = buf;
+ len = sizeof (shadow);
if (remote_protocol_Z[Z_PACKET_HARDWARE_BP].support == PACKET_DISABLE)
error ("Can't clear hardware breakpoint without the '%s' (%s) packet\n",
remote_protocol_Z[Z_PACKET_HARDWARE_BP].name,
return 0;
}
internal_error (__FILE__, __LINE__,
- "remote_remove_watchpoint: reached end of function");
+ "remote_remove_hw_breakpoint: reached end of function");
}
/* Some targets are only capable of doing downloads, and afterwards
remote_ops.to_files_info = remote_files_info;
remote_ops.to_insert_breakpoint = remote_insert_breakpoint;
remote_ops.to_remove_breakpoint = remote_remove_breakpoint;
+ remote_ops.to_stopped_by_watchpoint = remote_stopped_by_watchpoint;
+ remote_ops.to_stopped_data_address = remote_stopped_data_address;
+ remote_ops.to_can_use_hw_breakpoint = remote_check_watch_resources;
+ remote_ops.to_insert_hw_breakpoint = remote_insert_hw_breakpoint;
+ remote_ops.to_remove_hw_breakpoint = remote_remove_hw_breakpoint;
+ remote_ops.to_insert_watchpoint = remote_insert_watchpoint;
+ remote_ops.to_remove_watchpoint = remote_remove_watchpoint;
remote_ops.to_kill = remote_kill;
remote_ops.to_load = generic_load;
remote_ops.to_mourn_inferior = remote_mourn;
remote_cisco_ops.to_xfer_memory = remote_xfer_memory;
remote_cisco_ops.to_files_info = remote_files_info;
remote_cisco_ops.to_insert_breakpoint = remote_insert_breakpoint;
- remote_cisco_ops.to_remove_breakpoint = remote_remove_breakpoint;
+ remote_cisco_ops.to_remove_breakpoint = remote_remove_breakpoint;
+ remote_cisco_ops.to_remove_hw_breakpoint = remote_remove_hw_breakpoint;
+ remote_cisco_ops.to_insert_hw_breakpoint = remote_insert_hw_breakpoint;
+ remote_cisco_ops.to_insert_watchpoint = remote_insert_watchpoint;
+ remote_cisco_ops.to_remove_watchpoint = remote_remove_watchpoint;
+ remote_cisco_ops.to_stopped_by_watchpoint = remote_stopped_by_watchpoint;
+ remote_cisco_ops.to_stopped_data_address = remote_stopped_data_address;
+ remote_cisco_ops.to_can_use_hw_breakpoint = remote_check_watch_resources;
remote_cisco_ops.to_kill = remote_kill;
remote_cisco_ops.to_load = generic_load;
remote_cisco_ops.to_mourn_inferior = remote_cisco_mourn;
remote_async_ops.to_files_info = remote_files_info;
remote_async_ops.to_insert_breakpoint = remote_insert_breakpoint;
remote_async_ops.to_remove_breakpoint = remote_remove_breakpoint;
+ remote_async_ops.to_can_use_hw_breakpoint = remote_check_watch_resources;
+ remote_async_ops.to_insert_hw_breakpoint = remote_insert_hw_breakpoint;
+ remote_async_ops.to_remove_hw_breakpoint = remote_remove_hw_breakpoint;
+ remote_async_ops.to_insert_watchpoint = remote_insert_watchpoint;
+ remote_async_ops.to_remove_watchpoint = remote_remove_watchpoint;
+ remote_async_ops.to_stopped_by_watchpoint = remote_stopped_by_watchpoint;
+ remote_async_ops.to_stopped_data_address = remote_stopped_data_address;
remote_async_ops.to_terminal_inferior = remote_async_terminal_inferior;
remote_async_ops.to_terminal_ours = remote_async_terminal_ours;
remote_async_ops.to_kill = remote_async_kill;
#include "gdb-stabs.h"
#include "regcache.h"
#include "arch-utils.h"
+#include "language.h" /* for local_hex_string(). */
+#include "ppc-tdep.h"
#include <sys/ptrace.h>
#include <sys/reg.h>
extern void
fixup_breakpoints (CORE_ADDR low, CORE_ADDR high, CORE_ADDR delta);
-/* Conversion from gdb-to-system special purpose register numbers. */
+/* Given REGNO, a gdb register number, return the corresponding
+ number suitable for use as a ptrace() parameter. Return -1 if
+ there's no suitable mapping. Also, set the int pointed to by
+ ISFLOAT to indicate whether REGNO is a floating point register. */
-static int special_regs[] =
+static int
+regmap (int regno, int *isfloat)
{
- IAR, /* PC_REGNUM */
- MSR, /* PS_REGNUM */
- CR, /* CR_REGNUM */
- LR, /* LR_REGNUM */
- CTR, /* CTR_REGNUM */
- XER, /* XER_REGNUM */
- MQ /* MQ_REGNUM */
-};
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ *isfloat = 0;
+ if (tdep->ppc_gp0_regnum <= regno && regno <= tdep->ppc_gplast_regnum)
+ return regno;
+ else if (FP0_REGNUM <= regno && regno <= FPLAST_REGNUM)
+ {
+ *isfloat = 1;
+ return regno - FP0_REGNUM + FPR0;
+ }
+ else if (regno == PC_REGNUM)
+ return IAR;
+ else if (regno == tdep->ppc_ps_regnum)
+ return MSR;
+ else if (regno == tdep->ppc_cr_regnum)
+ return CR;
+ else if (regno == tdep->ppc_lr_regnum)
+ return LR;
+ else if (regno == tdep->ppc_ctr_regnum)
+ return CTR;
+ else if (regno == tdep->ppc_xer_regnum)
+ return XER;
+ else if (regno == tdep->ppc_fpscr_regnum)
+ return FPSCR;
+ else if (tdep->ppc_mq_regnum >= 0 && regno == tdep->ppc_mq_regnum)
+ return MQ;
+ else
+ return -1;
+}
/* Call ptrace(REQ, ID, ADDR, DATA, BUF). */
static void
fetch_register (int regno)
{
- int *addr = (int *) ®isters[REGISTER_BYTE (regno)];
- int nr;
+ int *addr = alloca (MAX_REGISTER_RAW_SIZE);
+ int nr, isfloat;
/* Retrieved values may be -1, so infer errors from errno. */
errno = 0;
+ nr = regmap (regno, &isfloat);
+
/* Floating-point registers. */
- if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
- {
- nr = regno - FP0_REGNUM + FPR0;
- rs6000_ptrace32 (PT_READ_FPR, PIDGET (inferior_ptid), addr, nr, 0);
- }
+ if (isfloat)
+ rs6000_ptrace32 (PT_READ_FPR, PIDGET (inferior_ptid), addr, nr, 0);
/* Bogus register number. */
- else if (regno > LAST_UISA_SP_REGNUM)
+ else if (nr < 0)
{
if (regno >= NUM_REGS)
fprintf_unfiltered (gdb_stderr,
"gdb error: register no %d not implemented.\n",
regno);
+ return;
}
/* Fixed-point registers. */
else
{
- if (regno >= FIRST_UISA_SP_REGNUM)
- nr = special_regs[regno - FIRST_UISA_SP_REGNUM];
- else
- nr = regno;
-
if (!ARCH64 ())
*addr = rs6000_ptrace32 (PT_READ_GPR, PIDGET (inferior_ptid), (int *)nr, 0, 0);
else
}
if (!errno)
- register_valid[regno] = 1;
+ supply_register (regno, (char *) addr);
else
{
#if 0
static void
store_register (int regno)
{
- int *addr = (int *) ®isters[REGISTER_BYTE (regno)];
- int nr;
+ int *addr = alloca (MAX_REGISTER_RAW_SIZE);
+ int nr, isfloat;
+
+ /* Fetch the register's value from the register cache. */
+ regcache_collect (regno, addr);
/* -1 can be a successful return value, so infer errors from errno. */
errno = 0;
+ nr = regmap (regno, &isfloat);
+
/* Floating-point registers. */
- if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM)
- {
- nr = regno - FP0_REGNUM + FPR0;
- rs6000_ptrace32 (PT_WRITE_FPR, PIDGET (inferior_ptid), addr, nr, 0);
- }
+ if (isfloat)
+ rs6000_ptrace32 (PT_WRITE_FPR, PIDGET (inferior_ptid), addr, nr, 0);
/* Bogus register number. */
- else if (regno > LAST_UISA_SP_REGNUM)
+ else if (nr < 0)
{
if (regno >= NUM_REGS)
fprintf_unfiltered (gdb_stderr,
(%sp). */
exec_one_dummy_insn ();
- if (regno >= FIRST_UISA_SP_REGNUM)
- nr = special_regs[regno - FIRST_UISA_SP_REGNUM];
- else
- nr = regno;
-
+ /* The PT_WRITE_GPR operation is rather odd. For 32-bit inferiors,
+ the register's value is passed by value, but for 64-bit inferiors,
+ the address of a buffer containing the value is passed. */
if (!ARCH64 ())
rs6000_ptrace32 (PT_WRITE_GPR, PIDGET (inferior_ptid), (int *)nr, *addr, 0);
else
else
{
- /* read 32 general purpose registers. */
- for (regno = 0; regno < 32; regno++)
- fetch_register (regno);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ /* Read 32 general purpose registers. */
+ for (regno = tdep->ppc_gp0_regnum;
+ regno <= tdep->ppc_gplast_regnum;
+ regno++)
+ {
+ fetch_register (regno);
+ }
- /* read general purpose floating point registers. */
+ /* Read general purpose floating point registers. */
for (regno = FP0_REGNUM; regno <= FPLAST_REGNUM; regno++)
fetch_register (regno);
- /* read special registers. */
- for (regno = FIRST_UISA_SP_REGNUM; regno <= LAST_UISA_SP_REGNUM; regno++)
- fetch_register (regno);
+ /* Read special registers. */
+ fetch_register (PC_REGNUM);
+ fetch_register (tdep->ppc_ps_regnum);
+ fetch_register (tdep->ppc_cr_regnum);
+ fetch_register (tdep->ppc_lr_regnum);
+ fetch_register (tdep->ppc_ctr_regnum);
+ fetch_register (tdep->ppc_xer_regnum);
+ fetch_register (tdep->ppc_fpscr_regnum);
+ if (tdep->ppc_mq_regnum >= 0)
+ fetch_register (tdep->ppc_mq_regnum);
}
}
else
{
- /* write general purpose registers first! */
- for (regno = GPR0; regno <= GPR31; regno++)
- store_register (regno);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+
+ /* Write general purpose registers first. */
+ for (regno = tdep->ppc_gp0_regnum;
+ regno <= tdep->ppc_gplast_regnum;
+ regno++)
+ {
+ store_register (regno);
+ }
- /* write floating point registers now. */
+ /* Write floating point registers. */
for (regno = FP0_REGNUM; regno <= FPLAST_REGNUM; regno++)
store_register (regno);
- /* write special registers. */
-
- for (regno = FIRST_UISA_SP_REGNUM; regno <= LAST_UISA_SP_REGNUM; regno++)
- store_register (regno);
+ /* Write special registers. */
+ store_register (PC_REGNUM);
+ store_register (tdep->ppc_ps_regnum);
+ store_register (tdep->ppc_cr_regnum);
+ store_register (tdep->ppc_lr_regnum);
+ store_register (tdep->ppc_ctr_regnum);
+ store_register (tdep->ppc_xer_regnum);
+ store_register (tdep->ppc_fpscr_regnum);
+ if (tdep->ppc_mq_regnum >= 0)
+ store_register (tdep->ppc_mq_regnum);
}
}
int which, CORE_ADDR reg_addr)
{
CoreRegs *regs;
- double *fprs;
- int arch64, i, size;
- void *gprs, *sprs[7];
+ int regi;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
if (which != 0)
{
return;
}
- arch64 = ARCH64 ();
regs = (CoreRegs *) core_reg_sect;
- /* Retrieve register pointers. */
+ /* Put the register values from the core file section in the regcache. */
- if (arch64)
+ if (ARCH64 ())
{
- gprs = regs->r64.gpr;
- fprs = regs->r64.fpr;
- sprs[0] = ®s->r64.iar;
- sprs[1] = ®s->r64.msr;
- sprs[2] = ®s->r64.cr;
- sprs[3] = ®s->r64.lr;
- sprs[4] = ®s->r64.ctr;
- sprs[5] = ®s->r64.xer;
+ for (regi = 0; regi < 32; regi++)
+ supply_register (regi, (char *) ®s->r64.gpr[regi]);
+
+ for (regi = 0; regi < 32; regi++)
+ supply_register (FP0_REGNUM + regi, (char *) ®s->r64.fpr[regi]);
+
+ supply_register (PC_REGNUM, (char *) ®s->r64.iar);
+ supply_register (tdep->ppc_ps_regnum, (char *) ®s->r64.msr);
+ supply_register (tdep->ppc_cr_regnum, (char *) ®s->r64.cr);
+ supply_register (tdep->ppc_lr_regnum, (char *) ®s->r64.lr);
+ supply_register (tdep->ppc_ctr_regnum, (char *) ®s->r64.ctr);
+ supply_register (tdep->ppc_xer_regnum, (char *) ®s->r64.xer);
+ supply_register (tdep->ppc_fpscr_regnum, (char *) ®s->r64.fpscr);
}
else
{
- gprs = regs->r32.gpr;
- fprs = regs->r32.fpr;
- sprs[0] = ®s->r32.iar;
- sprs[1] = ®s->r32.msr;
- sprs[2] = ®s->r32.cr;
- sprs[3] = ®s->r32.lr;
- sprs[4] = ®s->r32.ctr;
- sprs[5] = ®s->r32.xer;
- sprs[6] = ®s->r32.mq;
- }
-
- /* Copy from pointers to registers[]. */
-
- memcpy (registers, gprs, 32 * (arch64 ? 8 : 4));
- memcpy (registers + REGISTER_BYTE (FP0_REGNUM), fprs, 32 * 8);
- for (i = FIRST_UISA_SP_REGNUM; i <= LAST_UISA_SP_REGNUM; i++)
- {
- size = REGISTER_RAW_SIZE (i);
- if (size)
- memcpy (registers + REGISTER_BYTE (i),
- sprs[i - FIRST_UISA_SP_REGNUM], size);
+ for (regi = 0; regi < 32; regi++)
+ supply_register (regi, (char *) ®s->r32.gpr[regi]);
+
+ for (regi = 0; regi < 32; regi++)
+ supply_register (FP0_REGNUM + regi, (char *) ®s->r32.fpr[regi]);
+
+ supply_register (PC_REGNUM, (char *) ®s->r32.iar);
+ supply_register (tdep->ppc_ps_regnum, (char *) ®s->r32.msr);
+ supply_register (tdep->ppc_cr_regnum, (char *) ®s->r32.cr);
+ supply_register (tdep->ppc_lr_regnum, (char *) ®s->r32.lr);
+ supply_register (tdep->ppc_ctr_regnum, (char *) ®s->r32.ctr);
+ supply_register (tdep->ppc_xer_regnum, (char *) ®s->r32.xer);
+ supply_register (tdep->ppc_fpscr_regnum, (char *) ®s->r32.fpscr);
+ if (tdep->ppc_mq_regnum >= 0)
+ supply_register (tdep->ppc_mq_regnum, (char *) ®s->r32.mq);
}
}
\f
: vp->objfile);
}
}
- error ("Unable to find TOC entry for pc 0x%x\n", pc);
+ error ("Unable to find TOC entry for pc %s\n", local_hex_string (pc));
}
\f
/* Register that we are able to handle rs6000 core file formats. */
set_gdbarch_num_regs (gdbarch, S390_NUM_REGS);
set_gdbarch_cannot_fetch_register (gdbarch, s390_cannot_fetch_register);
set_gdbarch_cannot_store_register (gdbarch, s390_cannot_fetch_register);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
set_gdbarch_use_struct_convention (gdbarch, s390_use_struct_convention);
set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
set_gdbarch_register_name (gdbarch, s390_register_name);
#include "defs.h"
#include "frame.h"
-#include "obstack.h"
#include "symtab.h"
#include "symfile.h"
#include "gdbtypes.h"
}
#endif
/* Note: must use write_register_gen here instead
- of regcache_write, because regcache_write works
- only for real registers, not pseudo.
- write_register_gen will call the gdbarch
- function to do register writes, and that will
- properly know how to deal with pseudoregs. */
+ of regcache_raw_write, because
+ regcache_raw_write works only for real
+ registers, not pseudo. write_register_gen will
+ call the gdbarch function to do register
+ writes, and that will properly know how to deal
+ with pseudoregs. */
write_register_gen (regnum, val);
fp_args[double_arg_index] = 1;
fp_args[double_arg_index + 1] = 1;
static void
sh_sh4_register_convert_to_raw (struct type *type, int regnum,
- char *from, char *to)
+ const void *from, void *to)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
void
sh_sh64_register_convert_to_raw (struct type *type, int regnum,
- char *from, char *to)
+ const void *from, void *to)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
}
void
-sh_pseudo_register_read (int reg_nr, char *buffer)
+sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+ int reg_nr, void *buffer)
{
int base_regnum, portion;
char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->DR0_REGNUM
&& reg_nr <= tdep->DR_LAST_REGNUM)
/* Build the value in the provided buffer. */
/* Read the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_read (regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
/* We must pay attention to the endiannes. */
sh_sh4_register_convert_to_virtual (reg_nr,
REGISTER_VIRTUAL_TYPE (reg_nr),
/* Read the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_read (regcache, base_regnum + portion,
+ ((char *) buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
}
static void
-sh4_register_read (struct gdbarch *gdbarch, int reg_nr, char *buffer)
-{
- if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
- /* It is a regular register. */
- regcache_read (current_regcache, reg_nr, buffer);
- else
- /* It is a pseudo register and we need to construct its value */
- sh_pseudo_register_read (reg_nr, buffer);
-}
-
-static void
-sh64_pseudo_register_read (int reg_nr, char *buffer)
+sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+ int reg_nr, void *buffer)
{
int base_regnum;
int portion;
int offset = 0;
char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->DR0_REGNUM
&& reg_nr <= tdep->DR_LAST_REGNUM)
/* DR regs are double precision registers obtained by
concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_read (regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
/* We must pay attention to the endiannes. */
sh_sh64_register_convert_to_virtual (reg_nr, REGISTER_VIRTUAL_TYPE (reg_nr),
/* FPP regs are pairs of single precision registers obtained by
concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_read (regcache, base_regnum + portion,
+ ((char *) buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= tdep->FV0_REGNUM
/* FV regs are vectors of single precision registers obtained by
concatenating 4 single precision floating point registers. */
for (portion = 0; portion < 4; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_read (regcache, base_regnum + portion,
+ ((char *) buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
/* sh compact pseudo registers. 1-to-1 with a shmedia register */
base_regnum = sh64_compact_reg_base_num (reg_nr);
/* Build the value in the provided buffer. */
- regcache_read (current_regcache, base_regnum, temp_buffer);
+ regcache_raw_read (regcache, base_regnum, temp_buffer);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = 4;
memcpy (buffer, temp_buffer + offset, 4); /* get LOWER 32 bits only????*/
/* Build the value in the provided buffer. */
/* Floating point registers map 1-1 to the media fp regs,
they have the same size and endienness. */
- regcache_read (current_regcache, base_regnum, buffer);
+ regcache_raw_read (regcache, base_regnum, buffer);
}
else if (reg_nr >= tdep->DR0_C_REGNUM
/* DR_C regs are double precision registers obtained by
concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_read (regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
/* We must pay attention to the endiannes. */
sh_sh64_register_convert_to_virtual (reg_nr, REGISTER_VIRTUAL_TYPE (reg_nr),
/* FV_C regs are vectors of single precision registers obtained by
concatenating 4 single precision floating point registers. */
for (portion = 0; portion < 4; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_read (regcache, base_regnum + portion,
+ ((char *) buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr == tdep->FPSCR_C_REGNUM)
*/
/* *INDENT-ON* */
/* Get FPSCR into a local buffer */
- regcache_read (current_regcache, fpscr_base_regnum, temp_buffer);
+ regcache_raw_read (regcache, fpscr_base_regnum, temp_buffer);
/* Get value as an int. */
fpscr_value = extract_unsigned_integer (temp_buffer, 4);
/* Get SR into a local buffer */
- regcache_read (current_regcache, sr_base_regnum, temp_buffer);
+ regcache_raw_read (regcache, sr_base_regnum, temp_buffer);
/* Get value as an int. */
sr_value = extract_unsigned_integer (temp_buffer, 4);
/* Build the new value. */
/* FPUL_C register is floating point register 32,
same size, same endianness. */
- regcache_read (current_regcache, base_regnum, buffer);
+ regcache_raw_read (regcache, base_regnum, buffer);
}
}
-static void
-sh64_register_read (struct gdbarch *gdbarch, int reg_nr, char *buffer)
-{
-
- if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
- /* It is a regular register. */
- regcache_read (current_regcache, reg_nr, buffer);
- else
- /* It is a pseudo register and we need to construct its value */
- sh64_pseudo_register_read (reg_nr, buffer);
-}
-
void
-sh_pseudo_register_write (int reg_nr, char *buffer)
+sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
+ int reg_nr, const void *buffer)
{
int base_regnum, portion;
char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->DR0_REGNUM
&& reg_nr <= tdep->DR_LAST_REGNUM)
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_write (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_write (regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= tdep->FV0_REGNUM
&& reg_nr <= tdep->FV_LAST_REGNUM)
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache_write (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_write (regcache, base_regnum + portion,
+ ((char *) buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
}
-static void
-sh4_register_write (struct gdbarch *gdbarch, int reg_nr, char *buffer)
-{
- if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
- /* It is a regular register. */
- regcache_write (current_regcache, reg_nr, buffer);
- else
- /* It is a pseudo register and we need to construct its value */
- sh_pseudo_register_write (reg_nr, buffer);
-}
-
void
-sh64_pseudo_register_write (int reg_nr, char *buffer)
+sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
+ int reg_nr, const void *buffer)
{
int base_regnum, portion;
int offset;
char *temp_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (reg_nr >= tdep->DR0_REGNUM
&& reg_nr <= tdep->DR_LAST_REGNUM)
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_write (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_write (regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= tdep->FPP0_REGNUM
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_write (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_write (regcache, base_regnum + portion,
+ ((char *) buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= tdep->FV0_REGNUM
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache_write (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_write (regcache, base_regnum + portion,
+ ((char *) buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
/* sh compact general pseudo registers. 1-to-1 with a shmedia
/* Let's read the value of the base register into a temporary
buffer, so that overwriting the last four bytes with the new
value of the pseudo will leave the upper 4 bytes unchanged. */
- regcache_read (current_regcache, base_regnum, temp_buffer);
+ regcache_raw_read (regcache, base_regnum, temp_buffer);
/* Write as an 8 byte quantity */
memcpy (temp_buffer + offset, buffer, 4);
- regcache_write (current_regcache, base_regnum, temp_buffer);
+ regcache_raw_write (regcache, base_regnum, temp_buffer);
}
/* sh floating point compact pseudo registers. 1-to-1 with a shmedia
&& reg_nr <= tdep->FP_LAST_C_REGNUM)
{
base_regnum = sh64_compact_reg_base_num (reg_nr);
- regcache_write (current_regcache, base_regnum, buffer);
+ regcache_raw_write (regcache, base_regnum, buffer);
}
else if (reg_nr >= tdep->DR0_C_REGNUM
sh_sh64_register_convert_to_raw (REGISTER_VIRTUAL_TYPE (reg_nr), reg_nr,
buffer, temp_buffer);
- regcache_write (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_write (regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
}
for (portion = 0; portion < 4; portion++)
{
- regcache_write (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_write (regcache, base_regnum + portion,
+ ((char *) buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
}
fpscr_value = fpscr_c_value & fpscr_mask;
sr_value = (fpscr_value & sr_mask) >> 6;
- regcache_read (current_regcache, fpscr_base_regnum, temp_buffer);
+ regcache_raw_read (regcache, fpscr_base_regnum, temp_buffer);
old_fpscr_value = extract_unsigned_integer (temp_buffer, 4);
old_fpscr_value &= 0xfffc0002;
fpscr_value |= old_fpscr_value;
store_unsigned_integer (temp_buffer, 4, fpscr_value);
- regcache_write (current_regcache, fpscr_base_regnum, temp_buffer);
+ regcache_raw_write (regcache, fpscr_base_regnum, temp_buffer);
- regcache_read (current_regcache, sr_base_regnum, temp_buffer);
+ regcache_raw_read (regcache, sr_base_regnum, temp_buffer);
old_sr_value = extract_unsigned_integer (temp_buffer, 4);
old_sr_value &= 0xffff8fff;
sr_value |= old_sr_value;
store_unsigned_integer (temp_buffer, 4, sr_value);
- regcache_write (current_regcache, sr_base_regnum, temp_buffer);
+ regcache_raw_write (regcache, sr_base_regnum, temp_buffer);
}
else if (reg_nr == tdep->FPUL_C_REGNUM)
{
base_regnum = sh64_compact_reg_base_num (reg_nr);
- regcache_write (current_regcache, base_regnum, buffer);
+ regcache_raw_write (regcache, base_regnum, buffer);
}
}
-static void
-sh64_register_write (struct gdbarch *gdbarch, int reg_nr, char *buffer)
-{
- if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
- /* It is a regular register. */
- regcache_write (current_regcache, reg_nr, buffer);
- else
- /* It is a pseudo register and we need to construct its value */
- sh64_pseudo_register_write (reg_nr, buffer);
-}
-
/* Floating point vector of 4 float registers. */
static void
do_fv_register_info (int fv_regnum)
set_gdbarch_num_pseudo_regs (gdbarch, 12);
set_gdbarch_max_register_raw_size (gdbarch, 4 * 4);
set_gdbarch_max_register_virtual_size (gdbarch, 4 * 4);
- set_gdbarch_register_read (gdbarch, sh4_register_read);
- set_gdbarch_register_write (gdbarch, sh4_register_write);
+ set_gdbarch_pseudo_register_read (gdbarch, sh_pseudo_register_read);
+ set_gdbarch_pseudo_register_write (gdbarch, sh_pseudo_register_write);
tdep->FPUL_REGNUM = 23;
tdep->FPSCR_REGNUM = 24;
tdep->FP_LAST_REGNUM = 40;
/* Or should that go in the virtual_size? */
/*set_gdbarch_max_register_virtual_size (gdbarch, 8);*/
set_gdbarch_max_register_virtual_size (gdbarch, 4 * 4);
- set_gdbarch_register_read (gdbarch, sh64_register_read);
- set_gdbarch_register_write (gdbarch, sh64_register_write);
+ set_gdbarch_pseudo_register_read (gdbarch, sh64_pseudo_register_read);
+ set_gdbarch_pseudo_register_write (gdbarch, sh64_pseudo_register_write);
set_gdbarch_do_registers_info (gdbarch, sh64_do_registers_info);
set_gdbarch_frame_init_saved_regs (gdbarch, sh64_nofp_frame_init_saved_regs);
#include "arch-utils.h"
#include "frame.h"
#include "inferior.h"
-#include "obstack.h"
#include "target.h"
#include "value.h"
#include "bfd.h"
#include "defs.h"
#include "gdb_string.h"
#include "bfd.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
}
if (p[0] == ':' && p[1] == ':')
{
- /* chill the list of fields: the last entry (at the head) is a
- partially constructed entry which we now scrub. */
+ /* (OBSOLETE) chill (OBSOLETE) the list of fields: the last
+ entry (at the head) is a partially constructed entry which we
+ now scrub. */
fip->list = fip->list->next;
}
return 1;
else if (self_subrange && n2 == 0 && n3 == 127)
return init_type (TYPE_CODE_INT, 1, 0, NULL, objfile);
- else if (current_symbol && SYMBOL_LANGUAGE (current_symbol) == language_chill
- && !self_subrange)
- goto handle_true_range;
+#if 0
+ /* OBSOLETE else if (current_symbol && SYMBOL_LANGUAGE (current_symbol) == language_chill */
+ /* OBSOLETE && !self_subrange) */
+ /* OBSOLETE goto handle_true_range; */
+#endif
/* We used to do this only for subrange of self or subrange of int. */
else if (n2 == 0)
#include "frame.h"
#include "gdbtypes.h"
#include "value.h"
+#include "gdb_string.h"
/* Types that describe the various builtin registers. */
#include "demangle.h"
#include "inferior.h" /* for write_pc */
#include "gdb-stabs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "completer.h"
#include "bcache.h"
add_filename_language (".c++", language_cplus);
add_filename_language (".java", language_java);
add_filename_language (".class", language_java);
- add_filename_language (".ch", language_chill);
- add_filename_language (".c186", language_chill);
- add_filename_language (".c286", language_chill);
+ /* OBSOLETE add_filename_language (".ch", language_chill); */
+ /* OBSOLETE add_filename_language (".c186", language_chill); */
+ /* OBSOLETE add_filename_language (".c286", language_chill); */
add_filename_language (".f", language_fortran);
add_filename_language (".F", language_fortran);
add_filename_language (".s", language_asm);
SYMBOL_CPLUS_DEMANGLED_NAME (&psymbol) =
bcache (buf, dem_namelength + 1, objfile->psymbol_cache);
break;
- case language_chill:
- SYMBOL_CHILL_DEMANGLED_NAME (&psymbol) =
- bcache (buf, dem_namelength + 1, objfile->psymbol_cache);
+ /* OBSOLETE case language_chill: */
+ /* OBSOLETE SYMBOL_CHILL_DEMANGLED_NAME (&psymbol) = */
+ /* OBSOLETE bcache (buf, dem_namelength + 1, objfile->psymbol_cache); */
/* FIXME What should be done for the default case? Ignoring for now. */
}
#include "objfiles.h"
#include "breakpoint.h"
#include "command.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "language.h"
#include "bcache.h"
#include "linespec.h"
#include "filenames.h" /* for FILENAME_CMP */
-#include "obstack.h"
+#include "gdb_obstack.h"
#include <sys/types.h>
#include <fcntl.h>
gsymbol->language_specific.cplus_specific.demangled_name = NULL;
}
}
- if (demangled == NULL
- && (gsymbol->language == language_chill
- || gsymbol->language == language_auto))
- {
- demangled =
- chill_demangle (gsymbol->name);
- if (demangled != NULL)
- {
- gsymbol->language = language_chill;
- gsymbol->language_specific.chill_specific.demangled_name =
- obsavestring (demangled, strlen (demangled), obstack);
- xfree (demangled);
- }
- else
- {
- gsymbol->language_specific.chill_specific.demangled_name = NULL;
- }
- }
+#if 0
+ /* OBSOLETE if (demangled == NULL */
+ /* OBSOLETE && (gsymbol->language == language_chill */
+ /* OBSOLETE || gsymbol->language == language_auto)) */
+ /* OBSOLETE { */
+ /* OBSOLETE demangled = */
+ /* OBSOLETE chill_demangle (gsymbol->name); */
+ /* OBSOLETE if (demangled != NULL) */
+ /* OBSOLETE { */
+ /* OBSOLETE gsymbol->language = language_chill; */
+ /* OBSOLETE gsymbol->language_specific.chill_specific.demangled_name = */
+ /* OBSOLETE obsavestring (demangled, strlen (demangled), obstack); */
+ /* OBSOLETE xfree (demangled); */
+ /* OBSOLETE } */
+ /* OBSOLETE else */
+ /* OBSOLETE { */
+ /* OBSOLETE gsymbol->language_specific.chill_specific.demangled_name = NULL; */
+ /* OBSOLETE } */
+ /* OBSOLETE } */
+#endif
}
const namespace_enum namespace, int *is_a_field_of_this,
struct symtab **symtab)
{
- char *modified_name = NULL;
- char *modified_name2 = NULL;
+ char *demangled_name = NULL;
+ const char *modified_name = NULL;
const char *mangled_name = NULL;
int needtofreename = 0;
struct symbol *returnval;
+ modified_name = name;
+
+ /* If we are using C++ language, demangle the name before doing a lookup, so
+ we can always binary search. */
+ if (current_language->la_language == language_cplus)
+ {
+ demangled_name = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS);
+ if (demangled_name)
+ {
+ mangled_name = name;
+ modified_name = demangled_name;
+ needtofreename = 1;
+ }
+ }
+
if (case_sensitivity == case_sensitive_off)
{
char *copy;
copy[len] = 0;
modified_name = copy;
}
- else
- modified_name = (char *) name;
-
- /* If we are using C++ language, demangle the name before doing a lookup, so
- we can always binary search. */
- if (current_language->la_language == language_cplus)
- {
- modified_name2 = cplus_demangle (modified_name, DMGL_ANSI | DMGL_PARAMS);
- if (modified_name2)
- {
- mangled_name = name;
- modified_name = modified_name2;
- needtofreename = 1;
- }
- }
returnval = lookup_symbol_aux (modified_name, mangled_name, block,
namespace, is_a_field_of_this, symtab);
if (needtofreename)
- xfree (modified_name2);
+ xfree (demangled_name);
return returnval;
}
#if !defined (SYMTAB_H)
#define SYMTAB_H 1
-/* Some definitions and declarations to go with use of obstacks. */
-
-#include "obstack.h"
-#define obstack_chunk_alloc xmalloc
-#define obstack_chunk_free xfree
+/* Opaque declarations. */
+struct obstack;
/* Don't do this; it means that if some .o's are compiled with GNU C
and some are not (easy to do accidentally the way we configure
char *demangled_name;
}
cplus_specific;
- struct chill_specific /* For Chill */
- {
- char *demangled_name;
- }
- chill_specific;
+#if 0
+ /* OBSOLETE struct chill_specific *//* For Chill */
+ /* OBSOLETE { */
+ /* OBSOLETE char *demangled_name; */
+ /* OBSOLETE } */
+ /* OBSOLETE chill_specific; */
+#endif
}
language_specific;
{ \
SYMBOL_CPLUS_DEMANGLED_NAME (symbol) = NULL; \
} \
- else if (SYMBOL_LANGUAGE (symbol) == language_chill) \
- { \
- SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; \
- } \
+ /* OBSOLETE else if (SYMBOL_LANGUAGE (symbol) == language_chill) */ \
+ /* OBSOLETE { */ \
+ /* OBSOLETE SYMBOL_CHILL_DEMANGLED_NAME (symbol) = NULL; */ \
+ /* OBSOLETE } */ \
else \
{ \
memset (&(symbol)->ginfo.language_specific, 0, \
(SYMBOL_LANGUAGE (symbol) == language_cplus \
|| SYMBOL_LANGUAGE (symbol) == language_java \
? SYMBOL_CPLUS_DEMANGLED_NAME (symbol) \
- : (SYMBOL_LANGUAGE (symbol) == language_chill \
- ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) \
- : NULL))
+ : /* OBSOLETE (SYMBOL_LANGUAGE (symbol) == language_chill */ \
+ /* OBSOLETE ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) */ \
+ NULL)
-#define SYMBOL_CHILL_DEMANGLED_NAME(symbol) \
- (symbol)->ginfo.language_specific.chill_specific.demangled_name
+/* OBSOLETE #define SYMBOL_CHILL_DEMANGLED_NAME(symbol) */
+/* OBSOLETE (symbol)->ginfo.language_specific.chill_specific.demangled_name */
/* Macro that returns the "natural source name" of a symbol. In C++ this is
the "demangled" form of the name if demangle is on and the "mangled" form
static void default_terminal_info (char *, int);
+static int default_region_size_ok_for_hw_watchpoint (int);
+
static int nosymbol (char *, CORE_ADDR *);
static void tcomplain (void);
static int return_one (void);
+static int return_minus_one (void);
+
void target_ignore (void);
static void target_command (char *, int);
static int debug_to_remove_breakpoint (CORE_ADDR, char *);
+static int debug_to_can_use_hw_breakpoint (int, int, int);
+
+static int debug_to_insert_hw_breakpoint (CORE_ADDR, char *);
+
+static int debug_to_remove_hw_breakpoint (CORE_ADDR, char *);
+
+static int debug_to_insert_watchpoint (CORE_ADDR, int, int);
+
+static int debug_to_remove_watchpoint (CORE_ADDR, int, int);
+
+static int debug_to_stopped_by_watchpoint (void);
+
+static CORE_ADDR debug_to_stopped_data_address (void);
+
+static int debug_to_region_size_ok_for_hw_watchpoint (int);
+
static void debug_to_terminal_init (void);
static void debug_to_terminal_inferior (void);
memory_insert_breakpoint);
de_fault (to_remove_breakpoint,
memory_remove_breakpoint);
+ de_fault (to_can_use_hw_breakpoint,
+ (int (*) (int, int, int))
+ return_zero);
+ de_fault (to_insert_hw_breakpoint,
+ (int (*) (CORE_ADDR, char *))
+ return_minus_one);
+ de_fault (to_remove_hw_breakpoint,
+ (int (*) (CORE_ADDR, char *))
+ return_minus_one);
+ de_fault (to_insert_watchpoint,
+ (int (*) (CORE_ADDR, int, int))
+ return_minus_one);
+ de_fault (to_remove_watchpoint,
+ (int (*) (CORE_ADDR, int, int))
+ return_minus_one);
+ de_fault (to_stopped_by_watchpoint,
+ (int (*) (void))
+ return_zero);
+ de_fault (to_stopped_data_address,
+ (CORE_ADDR (*) (void))
+ return_zero);
+ de_fault (to_region_size_ok_for_hw_watchpoint,
+ default_region_size_ok_for_hw_watchpoint);
de_fault (to_terminal_init,
(void (*) (void))
target_ignore);
INHERIT (to_files_info, t);
INHERIT (to_insert_breakpoint, t);
INHERIT (to_remove_breakpoint, t);
+ INHERIT (to_can_use_hw_breakpoint, t);
+ INHERIT (to_insert_hw_breakpoint, t);
+ INHERIT (to_remove_hw_breakpoint, t);
+ INHERIT (to_insert_watchpoint, t);
+ INHERIT (to_remove_watchpoint, t);
+ INHERIT (to_stopped_data_address, t);
+ INHERIT (to_stopped_by_watchpoint, t);
+ INHERIT (to_region_size_ok_for_hw_watchpoint, t);
INHERIT (to_terminal_init, t);
INHERIT (to_terminal_inferior, t);
INHERIT (to_terminal_ours_for_output, t);
return;
}
+static int
+default_region_size_ok_for_hw_watchpoint (int byte_count)
+{
+ return (byte_count <= REGISTER_SIZE);
+}
+
static int
return_zero (void)
{
return 1;
}
+static int
+return_minus_one (void)
+{
+ return -1;
+}
+
/*
* Resize the to_sections pointer. Also make sure that anyone that
* was holding on to an old value of it gets updated.
return retval;
}
+static int
+debug_to_can_use_hw_breakpoint (int type, int cnt, int from_tty)
+{
+ int retval;
+
+ retval = debug_target.to_can_use_hw_breakpoint (type, cnt, from_tty);
+
+ fprintf_unfiltered (gdb_stdlog,
+ "target_can_use_hw_breakpoint (%ld, %ld, %ld) = %ld\n",
+ (unsigned long) type,
+ (unsigned long) cnt,
+ (unsigned long) from_tty,
+ (unsigned long) retval);
+ return retval;
+}
+
+static int
+debug_to_region_size_ok_for_hw_watchpoint (int byte_count)
+{
+ CORE_ADDR retval;
+
+ retval = debug_target.to_region_size_ok_for_hw_watchpoint (byte_count);
+
+ fprintf_unfiltered (gdb_stdlog,
+ "TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (%ld) = 0x%lx\n",
+ (unsigned long) byte_count,
+ (unsigned long) retval);
+ return retval;
+}
+
+static int
+debug_to_stopped_by_watchpoint (void)
+{
+ int retval;
+
+ retval = debug_target.to_stopped_by_watchpoint ();
+
+ fprintf_unfiltered (gdb_stdlog,
+ "STOPPED_BY_WATCHPOINT () = %ld\n",
+ (unsigned long) retval);
+ return retval;
+}
+
+static CORE_ADDR
+debug_to_stopped_data_address (void)
+{
+ CORE_ADDR retval;
+
+ retval = debug_target.to_stopped_data_address ();
+
+ fprintf_unfiltered (gdb_stdlog,
+ "target_stopped_data_address () = 0x%lx\n",
+ (unsigned long) retval);
+ return retval;
+}
+
+static int
+debug_to_insert_hw_breakpoint (CORE_ADDR addr, char *save)
+{
+ int retval;
+
+ retval = debug_target.to_insert_hw_breakpoint (addr, save);
+
+ fprintf_unfiltered (gdb_stdlog,
+ "target_insert_hw_breakpoint (0x%lx, xxx) = %ld\n",
+ (unsigned long) addr,
+ (unsigned long) retval);
+ return retval;
+}
+
+static int
+debug_to_remove_hw_breakpoint (CORE_ADDR addr, char *save)
+{
+ int retval;
+
+ retval = debug_target.to_remove_hw_breakpoint (addr, save);
+
+ fprintf_unfiltered (gdb_stdlog,
+ "target_remove_hw_breakpoint (0x%lx, xxx) = %ld\n",
+ (unsigned long) addr,
+ (unsigned long) retval);
+ return retval;
+}
+
+static int
+debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type)
+{
+ int retval;
+
+ retval = debug_target.to_insert_watchpoint (addr, len, type);
+
+ fprintf_unfiltered (gdb_stdlog,
+ "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n",
+ (unsigned long) addr, len, type, (unsigned long) retval);
+ return retval;
+}
+
+static int
+debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type)
+{
+ int retval;
+
+ retval = debug_target.to_insert_watchpoint (addr, len, type);
+
+ fprintf_unfiltered (gdb_stdlog,
+ "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n",
+ (unsigned long) addr, len, type, (unsigned long) retval);
+ return retval;
+}
+
static void
debug_to_terminal_init (void)
{
current_target.to_files_info = debug_to_files_info;
current_target.to_insert_breakpoint = debug_to_insert_breakpoint;
current_target.to_remove_breakpoint = debug_to_remove_breakpoint;
+ current_target.to_can_use_hw_breakpoint = debug_to_can_use_hw_breakpoint;
+ current_target.to_insert_hw_breakpoint = debug_to_insert_hw_breakpoint;
+ current_target.to_remove_hw_breakpoint = debug_to_remove_hw_breakpoint;
+ current_target.to_insert_watchpoint = debug_to_insert_watchpoint;
+ current_target.to_remove_watchpoint = debug_to_remove_watchpoint;
+ current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint;
+ current_target.to_stopped_data_address = debug_to_stopped_data_address;
+ current_target.to_region_size_ok_for_hw_watchpoint = debug_to_region_size_ok_for_hw_watchpoint;
current_target.to_terminal_init = debug_to_terminal_init;
current_target.to_terminal_inferior = debug_to_terminal_inferior;
current_target.to_terminal_ours_for_output = debug_to_terminal_ours_for_output;
void (*to_files_info) (struct target_ops *);
int (*to_insert_breakpoint) (CORE_ADDR, char *);
int (*to_remove_breakpoint) (CORE_ADDR, char *);
+ int (*to_can_use_hw_breakpoint) (int, int, int);
+ int (*to_insert_hw_breakpoint) (CORE_ADDR, char *);
+ int (*to_remove_hw_breakpoint) (CORE_ADDR, char *);
+ int (*to_remove_watchpoint) (CORE_ADDR, int, int);
+ int (*to_insert_watchpoint) (CORE_ADDR, int, int);
+ int (*to_stopped_by_watchpoint) (void);
+ CORE_ADDR (*to_stopped_data_address) (void);
+ int (*to_region_size_ok_for_hw_watchpoint) (int);
void (*to_terminal_init) (void);
void (*to_terminal_inferior) (void);
void (*to_terminal_ours_for_output) (void);
write). */
#ifndef STOPPED_BY_WATCHPOINT
-#define STOPPED_BY_WATCHPOINT(w) 0
+#define STOPPED_BY_WATCHPOINT(w) \
+ (*current_target.to_stopped_by_watchpoint) ()
#endif
/* HP-UX supplies these operations, which respectively disable and enable
#define TARGET_ENABLE_HW_WATCHPOINTS(pid)
#endif
-/* Provide defaults for systems that don't support hardware watchpoints. */
+/* Provide defaults for hardware watchpoint functions. */
-#ifndef TARGET_HAS_HARDWARE_WATCHPOINTS
+/* If the *_hw_beakpoint functions have not been defined
+ elsewhere use the definitions in the target vector. */
/* Returns non-zero if we can set a hardware watchpoint of type TYPE. TYPE is
one of bp_hardware_watchpoint, bp_read_watchpoint, bp_write_watchpoint, or
bp_hardware_breakpoint. CNT is the number of such watchpoints used so far
(including this one?). OTHERTYPE is who knows what... */
-#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(TYPE,CNT,OTHERTYPE) 0
+#ifndef TARGET_CAN_USE_HARDWARE_WATCHPOINT
+#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(TYPE,CNT,OTHERTYPE) \
+ (*current_target.to_can_use_hw_breakpoint) (TYPE, CNT, OTHERTYPE);
+#endif
#if !defined(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(byte_count) \
- ((LONGEST)(byte_count) <= REGISTER_SIZE)
+ (*current_target.to_region_size_ok_for_hw_watchpoint) (byte_count)
#endif
for write, 1 for read, and 2 for read/write accesses. Returns 0 for
success, non-zero for failure. */
-#define target_remove_watchpoint(ADDR,LEN,TYPE) -1
-#define target_insert_watchpoint(ADDR,LEN,TYPE) -1
+#ifndef target_insert_watchpoint
+#define target_insert_watchpoint(addr, len, type) \
+ (*current_target.to_insert_watchpoint) (addr, len, type)
-#endif /* TARGET_HAS_HARDWARE_WATCHPOINTS */
+#define target_remove_watchpoint(addr, len, type) \
+ (*current_target.to_remove_watchpoint) (addr, len, type)
+#endif
#ifndef target_insert_hw_breakpoint
-#define target_remove_hw_breakpoint(ADDR,SHADOW) -1
-#define target_insert_hw_breakpoint(ADDR,SHADOW) -1
+#define target_insert_hw_breakpoint(addr, save) \
+ (*current_target.to_insert_hw_breakpoint) (addr, save)
+
+#define target_remove_hw_breakpoint(addr, save) \
+ (*current_target.to_remove_hw_breakpoint) (addr, save)
#endif
#ifndef target_stopped_data_address
-#define target_stopped_data_address() 0
+#define target_stopped_data_address() \
+ (*current_target.to_stopped_data_address) ()
#endif
/* If defined, then we need to decr pc by this much after a hardware break-
out what version of MI is running. Use this to determine the proper
output of setting a breakpoint.
+2002-08-01 Andrew Cagney <ac131313@redhat.com>
+
+ * lib/gdb.exp (gdb_expect_list): Only print one pass, fail, or
+ supress message.
+
+2002-08-01 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (TARGET_FLAGS_TO_PASS): Remove CHILLFLAGS, CHILL,
+ CHILL_FOR_TARGET and CHILL_LIB.
+ * configure.in (configdirs): Remove gdb.chill.
+ * configure: Regenerate.
+ * lib/gdb.exp: Obsolete references to chill.
+ * gdb.fortran/types.exp: Ditto.
+ * gdb.fortran/exprs.exp: Ditto.
+
+2002-07-30 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb.base/shlib-call.exp (additional_flags): Conditionally
+ set Irix-specific compile and link flags.
+
+2002-07-29 Kevin Buettner <kevinb@redhat.com>
+
+ * lib/gdb.exp (mips*-*-irix*): Use alternate method for preprocessing
+ source files. The ``-o'' option doesn't work with the ``-E'' option
+ when using the Irix compiler.
+
2002-07-19 Daniel Jacobowitz <drow@mvista.com>
* config/gdbserver.exp (gdb_load): Don't use TCL varargs.
'CC=$$(CC_FOR_TARGET)' \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(TESTSUITE_CFLAGS)" \
- "CHILLFLAGS=$(CHILLFLAGS)" \
- 'CHILL=$$(CHILL_FOR_TARGET)' \
- "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
- "CHILL_LIB=$(CHILL_LIB)" \
'CXX=$$(CXX_FOR_TARGET)' \
"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
"CXXFLAGS=$(CXXFLAGS)" \
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
- --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
- -site-file | --site-file | --site-fil | --site-fi | --site-f)
- ac_prev=sitefile ;;
- -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
- sitefile="$ac_optarg" ;;
-
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
- if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:590: checking host system type" >&5
+echo "configure:579: checking host system type" >&5
host_alias=$host
case "$host_alias" in
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:611: checking target system type" >&5
+echo "configure:600: checking target system type" >&5
target_alias=$target
case "$target_alias" in
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:629: checking build system type" >&5
+echo "configure:618: checking build system type" >&5
build_alias=$build
case "$build_alias" in
gdb.c++ \
gdb.java \
gdb.disasm \
- gdb.chill \
gdb.mi \
gdb.threads \
gdb.trace"
# End stuff to support --enable-shared
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:754: checking for Cygwin environment" >&5
+echo "configure:742: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
+#line 747 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:787: checking for mingw32 environment" >&5
+echo "configure:775: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 792 "configure"
+#line 780 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:818: checking for executable suffix" >&5
+echo "configure:806: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
gdb.c++ \
gdb.java \
gdb.disasm \
- gdb.chill \
gdb.mi \
gdb.threads \
gdb.trace"
if {$gcc_compiled == 0} {
if [istarget "hppa*-hp-hpux*"] then {
set additional_flags "additional_flags=+z"
+ } elseif { [istarget "mips-sgi-irix*"] } {
+ # Disable SGI compiler's implicit -Dsgi
+ set additional_flags "additional_flags=-Usgi"
} else {
# don't know what the compiler is...
set additional_flags ""
&& ([istarget "powerpc*-*-aix*"]
|| [istarget "rs6000*-*-aix*"] )) } {
set additional_flags "additional_flags=-L${objdir}/${subdir}"
+} elseif { [istarget "mips-sgi-irix*"] } {
+ set additional_flags "additional_flags=-rpath ${objdir}/${subdir}"
} else {
set additional_flags ""
}
+2002-08-01 Andrew Cagney <cagney@redhat.com>
+
+ * builtins.exp, callch.exp, chillvars.exp: Make files obsolete.
+ * enum.exp, gch1041.exp, gch1272.exp: Make files obsolete.
+ * gch1280.exp, gch922.exp, gch981.exp: Make files obsolete.
+ * misc.exp, powerset.exp, pr-4975.exp: Make files obsolete.
+ * pr-5016.exp, pr-5020.exp, pr-5022.exp: Make files obsolete.
+ * pr-5646.exp, pr-5984.exp, pr-6292.exp: Make files obsolete.
+ * pr-6632.exp, pr-8134.exp, pr-8136.exp: Make files obsolete.
+ * pr-8405.exp, pr-8742.exp, pr-8894.exp: Make files obsolete.
+ * pr-9095.exp, pr-9946.exp, result.exp: Make files obsolete.
+ * string.exp, tests1.exp, tests2.exp: Make files obsolete.
+ * tuples.exp, xstruct.exp: Make files obsolete.
+
2001-03-06 Kevin Buettner <kevinb@redhat.com>
* builtins.exp, callch.exp, chexp.exp, chillvars.exp,
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests various Chill values, expressions, and types.
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "builtins"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- send_gdb "show language\n"
- gdb_expect {
- -re ".* source language is \"chill\".*$gdb_prompt $" {
- pass "set language to \"chill\""
- send_gdb "break xx_\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {
- send_gdb "run\n"
- gdb_expect -re ".*$gdb_prompt $" {}
- return 1
- }
- timeout {
- fail "can't set breakpoint (timeout)"
- return 0
- }
- }
- }
- -re ".*$gdb_prompt $" {
- fail "setting language to \"chill\""
- return 0
- }
- timeout {
- fail "can't show language (timeout)"
- return 0
- }
- }
-}
-
-# Testing printing of a specific value. Increment passcount for
-# success or issue fail message for failure. In both cases, return
-# a 1 to indicate that more tests can proceed. However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-#
-# Args are:
-#
-# First one is string to send_gdb to gdb
-# Second one is string to match gdb result to
-# Third one is an optional message to be printed
-
-proc test_print_accept { args } {
- global gdb_prompt
- global passcount
- global verbose
-
- if [llength $args]==3 then {
- set message [lindex $args 2]
- } else {
- set message [lindex $args 0]
- }
- set sendthis [lindex $args 0]
- set expectthis [lindex $args 1]
- set result [gdb_test $sendthis ".* = ${expectthis}" $message]
- if $result==0 {incr passcount}
- return $result
-}
-
-proc test_lower {} {
- global passcount
-
- verbose "testing builtin LOWER"
- set passcount 0
-
- # discrete mode names
- test_print_accept "print lower(bool)" "FALSE"
- test_print_accept "print lower(char)" {'\^[(]0[)]'}
- test_print_accept "print lower(byte)" "-128"
- test_print_accept "print lower(ubyte)" "0"
- if [istarget "alpha-*-*"] then {
- test_print_accept "print lower(int)" "-2147483648"
- } else {
- test_print_accept "print lower(int)" "-32768"
- }
- test_print_accept "print lower(uint)" "0"
- setup_xfail "alpha-*-*"
- test_print_accept "print lower(long)" "-2147483648"
- test_print_accept "print lower(ulong)" "0"
- test_print_accept "print lower(m_set)" "e1"
- test_print_accept "print lower(m_set_range)" "e2"
- test_print_accept "print lower(m_numbered_set)" "n2"
- test_print_accept "print lower(m_char_range)" "'A'"
- test_print_accept "print lower(m_bool_range)" "FALSE"
- test_print_accept "print lower(m_long_range)" "255"
- test_print_accept "print lower(m_range)" "12"
-
- # discrete locations
- test_print_accept "print lower(v_bool)" "FALSE"
- test_print_accept "print lower(v_char)" {'\^[(]0[)]'}
- test_print_accept "print lower(v_byte)" "-128"
- test_print_accept "print lower(v_ubyte)" "0"
- if [istarget "alpha-*-*"] then {
- test_print_accept "print lower(v_int)" "-2147483648"
- } else {
- test_print_accept "print lower(v_int)" "-32768"
- }
- test_print_accept "print lower(v_uint)" "0"
- setup_xfail "alpha-*-*"
- test_print_accept "print lower(v_long)" "-2147483648"
- test_print_accept "print lower(v_ulong)" "0"
- test_print_accept "print lower(v_set)" "e1"
- test_print_accept "print lower(v_set_range)" "e2"
- test_print_accept "print lower(v_numbered_set)" "n2"
- test_print_accept "print lower(v_char_range)" "'A'"
- test_print_accept "print lower(v_bool_range)" "FALSE"
- test_print_accept "print lower(v_long_range)" "255"
- test_print_accept "print lower(v_range)" "12"
-
- # string mode names
- test_print_accept "print lower(m_chars)" "0"
- test_print_accept "print lower(m_chars_v)" "0"
- test_print_accept "print lower(m_bits)" "0"
-
- # string locations
- test_print_accept "print lower(v_chars)" "0"
- test_print_accept "print lower(v_chars_v)" "0"
- test_print_accept "print lower(v_bits)" "0"
-
- # string expressions
- test_print_accept "print lower(\"abcd\")" "0"
- test_print_accept "print lower(B'010101')" "0"
-
- # array mode name
- test_print_accept "print lower(m_arr)" "1";
- test_print_accept "print lower(m_char_arr)" {'\^[(]0[)]'}
- test_print_accept "print lower(m_bool_arr)" "FALSE"
- if [istarget "alpha-*-*"] then {
- test_print_accept "print lower(m_int_arr)" "-2147483648"
- } else {
- test_print_accept "print lower(m_int_arr)" "-32768"
- }
- test_print_accept "print lower(m_set_arr)" "e1"
- test_print_accept "print lower(m_set_range_arr)" "e2"
- test_print_accept "print lower(m_numbered_set_arr)" "n2"
- test_print_accept "print lower(m_char_range_arr)" "'A'"
- test_print_accept "print lower(m_bool_range_arr)" "FALSE"
- test_print_accept "print lower(m_long_range_arr)" "255"
- test_print_accept "print lower(m_range_arr)" "12"
-
- # array locations
- test_print_accept "print lower(v_arr)" "1";
- test_print_accept "print lower(v_char_arr)" {'\^[(]0[)]'}
- test_print_accept "print lower(v_bool_arr)" "FALSE"
- if [istarget "alpha-*-*"] then {
- test_print_accept "print lower(v_int_arr)" "-2147483648"
- } else {
- test_print_accept "print lower(v_int_arr)" "-32768"
- }
- test_print_accept "print lower(v_set_arr)" "e1"
- test_print_accept "print lower(v_set_range_arr)" "e2"
- test_print_accept "print lower(v_numbered_set_arr)" "n2"
- test_print_accept "print lower(v_char_range_arr)" "'A'"
- test_print_accept "print lower(v_bool_range_arr)" "FALSE"
- test_print_accept "print lower(v_long_range_arr)" "255"
- test_print_accept "print lower(v_range_arr)" "12"
-}
-
-proc test_upper {} {
- global passcount
-
- verbose "testing builtin UPPER"
- set passcount 0
-
- # discrete mode names
- test_print_accept "print upper(bool)" "TRUE"
- test_print_accept "print upper(char)" {'\^[(]255[)]'}
- test_print_accept "print upper(byte)" "127"
- test_print_accept "print upper(ubyte)" "255"
- if [istarget "alpha-*-*"] then {
- test_print_accept "print upper(int)" "2147483647"
- test_print_accept "print upper(uint)" "4294967295"
- setup_xfail "alpha-*-*"
- test_print_accept "print upper(long)" "4294967295"
- test_print_accept "print upper(ulong)" "18446744073709551615"
- } else {
- test_print_accept "print upper(int)" "32767"
- test_print_accept "print upper(uint)" "65535"
- test_print_accept "print upper(long)" "2147483647"
- test_print_accept "print upper(ulong)" "4294967295"
- }
- test_print_accept "print upper(m_set)" "e6"
- test_print_accept "print upper(m_set_range)" "e5"
- test_print_accept "print upper(m_numbered_set)" "n5"
- test_print_accept "print upper(m_char_range)" "'Z'"
- test_print_accept "print upper(m_bool_range)" "FALSE"
- test_print_accept "print upper(m_long_range)" "3211"
- test_print_accept "print upper(m_range)" "28"
-
- # discrete locations
- test_print_accept "print upper(v_bool)" "TRUE"
- test_print_accept "print upper(v_char)" {'\^[(]255[)]'}
- test_print_accept "print upper(v_byte)" "127"
- test_print_accept "print upper(v_ubyte)" "255"
- if [istarget "alpha-*-*"] then {
- test_print_accept "print upper(v_int)" "2147483647"
- test_print_accept "print upper(v_uint)" "4294967295"
- setup_xfail "alpha-*-*"
- test_print_accept "print upper(v_long)" "4294967295"
- test_print_accept "print upper(v_ulong)" "18446744073709551615"
- } else {
- test_print_accept "print upper(v_int)" "32767"
- test_print_accept "print upper(v_uint)" "65535"
- test_print_accept "print upper(v_long)" "2147483647"
- test_print_accept "print upper(v_ulong)" "4294967295"
- }
- test_print_accept "print upper(v_set)" "e6"
- test_print_accept "print upper(v_set_range)" "e5"
- test_print_accept "print upper(v_numbered_set)" "n5"
- test_print_accept "print upper(v_char_range)" "'Z'"
- test_print_accept "print upper(v_bool_range)" "FALSE"
- test_print_accept "print upper(v_long_range)" "3211"
- test_print_accept "print upper(v_range)" "28"
-
- # string mode names
- test_print_accept "print upper(m_chars)" "19"
- test_print_accept "print upper(m_chars_v)" "19"
- test_print_accept "print upper(m_bits)" "9"
-
- # string locations
- test_print_accept "print upper(v_chars)" "19"
- test_print_accept "print upper(v_chars_v)" "19"
- test_print_accept "print upper(v_bits)" "9"
-
- # string expressions
- test_print_accept "print upper(\"abcd\")" "3"
- test_print_accept "print upper(B'010101')" "5"
-
- # array mode name
- test_print_accept "print upper(m_arr)" "10";
- test_print_accept "print upper(m_char_arr)" {'\^[(]255[)]'}
- test_print_accept "print upper(m_bool_arr)" "TRUE"
- if [istarget "alpha-*-*"] then {
- test_print_accept "print upper(m_int_arr)" "2147483647"
- } else {
- test_print_accept "print upper(m_int_arr)" "32767"
- }
- test_print_accept "print upper(m_set_arr)" "e6"
- test_print_accept "print upper(m_set_range_arr)" "e5"
- test_print_accept "print upper(m_numbered_set_arr)" "n5"
- test_print_accept "print upper(m_char_range_arr)" "'Z'"
- test_print_accept "print upper(m_bool_range_arr)" "FALSE"
- test_print_accept "print upper(m_long_range_arr)" "3211"
- test_print_accept "print upper(m_range_arr)" "28"
-
- # array locations
- test_print_accept "print upper(v_arr)" "10";
- test_print_accept "print upper(v_char_arr)" {'\^[(]255[)]'}
- test_print_accept "print upper(v_bool_arr)" "TRUE"
- if [istarget "alpha-*-*"] then {
- test_print_accept "print upper(v_int_arr)" "2147483647"
- } else {
- test_print_accept "print upper(v_int_arr)" "32767"
- }
- test_print_accept "print upper(v_set_arr)" "e6"
- test_print_accept "print upper(v_set_range_arr)" "e5"
- test_print_accept "print upper(v_numbered_set_arr)" "n5"
- test_print_accept "print upper(v_char_range_arr)" "'Z'"
- test_print_accept "print upper(v_bool_range_arr)" "FALSE"
- test_print_accept "print upper(v_long_range_arr)" "3211"
- test_print_accept "print upper(v_range_arr)" "28"
-}
-
-proc test_length {} {
- global passcount
-
- verbose "testing builtin LENGTH"
- set passcount 0
-
- # string locations
- test_print_accept "print length(v_chars)" "20"
- test_print_accept "print length(v_chars_v)" "7";
- test_print_accept "print length(v_bits)" "10";
-
- # string expressions
- test_print_accept "print length(\"the quick brown fox ...\")" "23"
- test_print_accept "print length(B'010101010101')" "12"
- test_print_accept "print length(\"foo \" // \"bar\")" "7"
-
- # check some failures
- setup_xfail "*-*-*"
- test_print_accept "print length(m_chars)" "typename in invalid context"
- setup_xfail "*-*-*"
- test_print_accept "print length(v_byte)" "bad argument to LENGTH builtin"
- setup_xfail "*-*-*"
- test_print_accept "print length(b'000000' // b'111111')" "12"
-}
-
-proc test_size {} {
- global passcount
-
- verbose "testing builtin SIZE"
- set passcount 0
-
- # modes
- test_print_accept "print size(bool)" "1"
- test_print_accept "print size(char)" "1"
- test_print_accept "print size(byte)" "1"
- if [istarget "alpha-*-*"] then {
- test_print_accept "print size(int)" "4"
- test_print_accept "print size(ulong)" "8"
- test_print_accept "print size(ptr)" "8"
- test_print_accept "print size(m_chars_v)" "24"
- test_print_accept "print size(m_struct)" "40"
- } else {
- test_print_accept "print size(int)" "2"
- test_print_accept "print size(ulong)" "4"
- test_print_accept "print size(ptr)" "4"
- test_print_accept "print size(m_chars_v)" "22"
- test_print_accept "print size(m_struct)" "36"
- }
- test_print_accept "print size(m_set)" "1"
- test_print_accept "print size(m_numbered_set)" "1"
- test_print_accept "print size(m_char_range)" "1"
- test_print_accept "print size(m_range_arr)" "17"
- test_print_accept "print size(m_chars)" "20"
- test_print_accept "print size(m_bits)" "2"
-
- # locations
- test_print_accept "print size(v_bool)" "1"
- test_print_accept "print size(v_char)" "1"
- test_print_accept "print size(v_byte)" "1"
- if [istarget "alpha-*-*"] then {
- test_print_accept "print size(v_int)" "4"
- test_print_accept "print size(v_ulong)" "8"
- test_print_accept "print size(v_ptr)" "8"
- test_print_accept "print size(v_chars_v)" "24"
- test_print_accept "print size(v_struct)" "40"
- } else {
- test_print_accept "print size(v_int)" "2"
- test_print_accept "print size(v_ulong)" "4"
- test_print_accept "print size(v_ptr)" "4"
- test_print_accept "print size(v_chars_v)" "22"
- test_print_accept "print size(v_struct)" "36"
- }
- test_print_accept "print size(v_set)" "1"
- test_print_accept "print size(v_numbered_set)" "1"
- test_print_accept "print size(v_char_range)" "1"
- test_print_accept "print size(v_range_arr)" "17"
- test_print_accept "print size(v_chars)" "20"
- test_print_accept "print size(v_bits)" "2"
-}
-
-proc test_num {} {
- global passcount
-
- verbose "testing builtin NUM"
- set passcount 0
-
- # constants
- test_print_accept "print num(false)" "0"
- test_print_accept "print num(true)" "1"
- test_print_accept "print num(10)" "10"
- test_print_accept "print num(33-34)" "-1"
- test_print_accept "print num('X')" "88"
- test_print_accept "print num(e5)" "4"
-
- # locations
- test_print_accept "print num(v_bool)" "0"
- test_print_accept "print num(v_char)" "88"
- test_print_accept "print num(v_byte)" "-30"
- test_print_accept "print num(v_ubyte)" "30"
- test_print_accept "print num(v_int)" "-333"
- test_print_accept "print num(v_uint)" "333"
- test_print_accept "print num(v_long)" "-4444"
- test_print_accept "print num(v_ulong)" "4444"
- test_print_accept "print num(v_set)" "2"
- test_print_accept "print num(v_set_range)" "2"
- test_print_accept "print num(v_numbered_set)" "35"
- test_print_accept "print num(v_char_range)" "71"
- test_print_accept "print num(v_long_range)" "1000"
- test_print_accept "print num(v_range)" "23"
-}
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if [set_lang_chill] then {
- # test builtins as described in chapter 6.20.3 Z.200
- test_num
- test_size
- test_lower
- test_upper
- test_length
-} else {
- warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file tests various Chill values, expressions, and types.
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "builtins"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE verbose "loading file '$binfile'"
+# OBSOLETE gdb_load $binfile
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE send_gdb "show language\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE pass "set language to \"chill\""
+# OBSOLETE send_gdb "break xx_\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE send_gdb "run\n"
+# OBSOLETE gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE return 1
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't set breakpoint (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE fail "setting language to \"chill\""
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't show language (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Testing printing of a specific value. Increment passcount for
+# OBSOLETE # success or issue fail message for failure. In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed. However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE #
+# OBSOLETE # Args are:
+# OBSOLETE #
+# OBSOLETE # First one is string to send_gdb to gdb
+# OBSOLETE # Second one is string to match gdb result to
+# OBSOLETE # Third one is an optional message to be printed
+# OBSOLETE
+# OBSOLETE proc test_print_accept { args } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global passcount
+# OBSOLETE global verbose
+# OBSOLETE
+# OBSOLETE if [llength $args]==3 then {
+# OBSOLETE set message [lindex $args 2]
+# OBSOLETE } else {
+# OBSOLETE set message [lindex $args 0]
+# OBSOLETE }
+# OBSOLETE set sendthis [lindex $args 0]
+# OBSOLETE set expectthis [lindex $args 1]
+# OBSOLETE set result [gdb_test $sendthis ".* = ${expectthis}" $message]
+# OBSOLETE if $result==0 {incr passcount}
+# OBSOLETE return $result
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_lower {} {
+# OBSOLETE global passcount
+# OBSOLETE
+# OBSOLETE verbose "testing builtin LOWER"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE # discrete mode names
+# OBSOLETE test_print_accept "print lower(bool)" "FALSE"
+# OBSOLETE test_print_accept "print lower(char)" {'\^[(]0[)]'}
+# OBSOLETE test_print_accept "print lower(byte)" "-128"
+# OBSOLETE test_print_accept "print lower(ubyte)" "0"
+# OBSOLETE if [istarget "alpha-*-*"] then {
+# OBSOLETE test_print_accept "print lower(int)" "-2147483648"
+# OBSOLETE } else {
+# OBSOLETE test_print_accept "print lower(int)" "-32768"
+# OBSOLETE }
+# OBSOLETE test_print_accept "print lower(uint)" "0"
+# OBSOLETE setup_xfail "alpha-*-*"
+# OBSOLETE test_print_accept "print lower(long)" "-2147483648"
+# OBSOLETE test_print_accept "print lower(ulong)" "0"
+# OBSOLETE test_print_accept "print lower(m_set)" "e1"
+# OBSOLETE test_print_accept "print lower(m_set_range)" "e2"
+# OBSOLETE test_print_accept "print lower(m_numbered_set)" "n2"
+# OBSOLETE test_print_accept "print lower(m_char_range)" "'A'"
+# OBSOLETE test_print_accept "print lower(m_bool_range)" "FALSE"
+# OBSOLETE test_print_accept "print lower(m_long_range)" "255"
+# OBSOLETE test_print_accept "print lower(m_range)" "12"
+# OBSOLETE
+# OBSOLETE # discrete locations
+# OBSOLETE test_print_accept "print lower(v_bool)" "FALSE"
+# OBSOLETE test_print_accept "print lower(v_char)" {'\^[(]0[)]'}
+# OBSOLETE test_print_accept "print lower(v_byte)" "-128"
+# OBSOLETE test_print_accept "print lower(v_ubyte)" "0"
+# OBSOLETE if [istarget "alpha-*-*"] then {
+# OBSOLETE test_print_accept "print lower(v_int)" "-2147483648"
+# OBSOLETE } else {
+# OBSOLETE test_print_accept "print lower(v_int)" "-32768"
+# OBSOLETE }
+# OBSOLETE test_print_accept "print lower(v_uint)" "0"
+# OBSOLETE setup_xfail "alpha-*-*"
+# OBSOLETE test_print_accept "print lower(v_long)" "-2147483648"
+# OBSOLETE test_print_accept "print lower(v_ulong)" "0"
+# OBSOLETE test_print_accept "print lower(v_set)" "e1"
+# OBSOLETE test_print_accept "print lower(v_set_range)" "e2"
+# OBSOLETE test_print_accept "print lower(v_numbered_set)" "n2"
+# OBSOLETE test_print_accept "print lower(v_char_range)" "'A'"
+# OBSOLETE test_print_accept "print lower(v_bool_range)" "FALSE"
+# OBSOLETE test_print_accept "print lower(v_long_range)" "255"
+# OBSOLETE test_print_accept "print lower(v_range)" "12"
+# OBSOLETE
+# OBSOLETE # string mode names
+# OBSOLETE test_print_accept "print lower(m_chars)" "0"
+# OBSOLETE test_print_accept "print lower(m_chars_v)" "0"
+# OBSOLETE test_print_accept "print lower(m_bits)" "0"
+# OBSOLETE
+# OBSOLETE # string locations
+# OBSOLETE test_print_accept "print lower(v_chars)" "0"
+# OBSOLETE test_print_accept "print lower(v_chars_v)" "0"
+# OBSOLETE test_print_accept "print lower(v_bits)" "0"
+# OBSOLETE
+# OBSOLETE # string expressions
+# OBSOLETE test_print_accept "print lower(\"abcd\")" "0"
+# OBSOLETE test_print_accept "print lower(B'010101')" "0"
+# OBSOLETE
+# OBSOLETE # array mode name
+# OBSOLETE test_print_accept "print lower(m_arr)" "1";
+# OBSOLETE test_print_accept "print lower(m_char_arr)" {'\^[(]0[)]'}
+# OBSOLETE test_print_accept "print lower(m_bool_arr)" "FALSE"
+# OBSOLETE if [istarget "alpha-*-*"] then {
+# OBSOLETE test_print_accept "print lower(m_int_arr)" "-2147483648"
+# OBSOLETE } else {
+# OBSOLETE test_print_accept "print lower(m_int_arr)" "-32768"
+# OBSOLETE }
+# OBSOLETE test_print_accept "print lower(m_set_arr)" "e1"
+# OBSOLETE test_print_accept "print lower(m_set_range_arr)" "e2"
+# OBSOLETE test_print_accept "print lower(m_numbered_set_arr)" "n2"
+# OBSOLETE test_print_accept "print lower(m_char_range_arr)" "'A'"
+# OBSOLETE test_print_accept "print lower(m_bool_range_arr)" "FALSE"
+# OBSOLETE test_print_accept "print lower(m_long_range_arr)" "255"
+# OBSOLETE test_print_accept "print lower(m_range_arr)" "12"
+# OBSOLETE
+# OBSOLETE # array locations
+# OBSOLETE test_print_accept "print lower(v_arr)" "1";
+# OBSOLETE test_print_accept "print lower(v_char_arr)" {'\^[(]0[)]'}
+# OBSOLETE test_print_accept "print lower(v_bool_arr)" "FALSE"
+# OBSOLETE if [istarget "alpha-*-*"] then {
+# OBSOLETE test_print_accept "print lower(v_int_arr)" "-2147483648"
+# OBSOLETE } else {
+# OBSOLETE test_print_accept "print lower(v_int_arr)" "-32768"
+# OBSOLETE }
+# OBSOLETE test_print_accept "print lower(v_set_arr)" "e1"
+# OBSOLETE test_print_accept "print lower(v_set_range_arr)" "e2"
+# OBSOLETE test_print_accept "print lower(v_numbered_set_arr)" "n2"
+# OBSOLETE test_print_accept "print lower(v_char_range_arr)" "'A'"
+# OBSOLETE test_print_accept "print lower(v_bool_range_arr)" "FALSE"
+# OBSOLETE test_print_accept "print lower(v_long_range_arr)" "255"
+# OBSOLETE test_print_accept "print lower(v_range_arr)" "12"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_upper {} {
+# OBSOLETE global passcount
+# OBSOLETE
+# OBSOLETE verbose "testing builtin UPPER"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE # discrete mode names
+# OBSOLETE test_print_accept "print upper(bool)" "TRUE"
+# OBSOLETE test_print_accept "print upper(char)" {'\^[(]255[)]'}
+# OBSOLETE test_print_accept "print upper(byte)" "127"
+# OBSOLETE test_print_accept "print upper(ubyte)" "255"
+# OBSOLETE if [istarget "alpha-*-*"] then {
+# OBSOLETE test_print_accept "print upper(int)" "2147483647"
+# OBSOLETE test_print_accept "print upper(uint)" "4294967295"
+# OBSOLETE setup_xfail "alpha-*-*"
+# OBSOLETE test_print_accept "print upper(long)" "4294967295"
+# OBSOLETE test_print_accept "print upper(ulong)" "18446744073709551615"
+# OBSOLETE } else {
+# OBSOLETE test_print_accept "print upper(int)" "32767"
+# OBSOLETE test_print_accept "print upper(uint)" "65535"
+# OBSOLETE test_print_accept "print upper(long)" "2147483647"
+# OBSOLETE test_print_accept "print upper(ulong)" "4294967295"
+# OBSOLETE }
+# OBSOLETE test_print_accept "print upper(m_set)" "e6"
+# OBSOLETE test_print_accept "print upper(m_set_range)" "e5"
+# OBSOLETE test_print_accept "print upper(m_numbered_set)" "n5"
+# OBSOLETE test_print_accept "print upper(m_char_range)" "'Z'"
+# OBSOLETE test_print_accept "print upper(m_bool_range)" "FALSE"
+# OBSOLETE test_print_accept "print upper(m_long_range)" "3211"
+# OBSOLETE test_print_accept "print upper(m_range)" "28"
+# OBSOLETE
+# OBSOLETE # discrete locations
+# OBSOLETE test_print_accept "print upper(v_bool)" "TRUE"
+# OBSOLETE test_print_accept "print upper(v_char)" {'\^[(]255[)]'}
+# OBSOLETE test_print_accept "print upper(v_byte)" "127"
+# OBSOLETE test_print_accept "print upper(v_ubyte)" "255"
+# OBSOLETE if [istarget "alpha-*-*"] then {
+# OBSOLETE test_print_accept "print upper(v_int)" "2147483647"
+# OBSOLETE test_print_accept "print upper(v_uint)" "4294967295"
+# OBSOLETE setup_xfail "alpha-*-*"
+# OBSOLETE test_print_accept "print upper(v_long)" "4294967295"
+# OBSOLETE test_print_accept "print upper(v_ulong)" "18446744073709551615"
+# OBSOLETE } else {
+# OBSOLETE test_print_accept "print upper(v_int)" "32767"
+# OBSOLETE test_print_accept "print upper(v_uint)" "65535"
+# OBSOLETE test_print_accept "print upper(v_long)" "2147483647"
+# OBSOLETE test_print_accept "print upper(v_ulong)" "4294967295"
+# OBSOLETE }
+# OBSOLETE test_print_accept "print upper(v_set)" "e6"
+# OBSOLETE test_print_accept "print upper(v_set_range)" "e5"
+# OBSOLETE test_print_accept "print upper(v_numbered_set)" "n5"
+# OBSOLETE test_print_accept "print upper(v_char_range)" "'Z'"
+# OBSOLETE test_print_accept "print upper(v_bool_range)" "FALSE"
+# OBSOLETE test_print_accept "print upper(v_long_range)" "3211"
+# OBSOLETE test_print_accept "print upper(v_range)" "28"
+# OBSOLETE
+# OBSOLETE # string mode names
+# OBSOLETE test_print_accept "print upper(m_chars)" "19"
+# OBSOLETE test_print_accept "print upper(m_chars_v)" "19"
+# OBSOLETE test_print_accept "print upper(m_bits)" "9"
+# OBSOLETE
+# OBSOLETE # string locations
+# OBSOLETE test_print_accept "print upper(v_chars)" "19"
+# OBSOLETE test_print_accept "print upper(v_chars_v)" "19"
+# OBSOLETE test_print_accept "print upper(v_bits)" "9"
+# OBSOLETE
+# OBSOLETE # string expressions
+# OBSOLETE test_print_accept "print upper(\"abcd\")" "3"
+# OBSOLETE test_print_accept "print upper(B'010101')" "5"
+# OBSOLETE
+# OBSOLETE # array mode name
+# OBSOLETE test_print_accept "print upper(m_arr)" "10";
+# OBSOLETE test_print_accept "print upper(m_char_arr)" {'\^[(]255[)]'}
+# OBSOLETE test_print_accept "print upper(m_bool_arr)" "TRUE"
+# OBSOLETE if [istarget "alpha-*-*"] then {
+# OBSOLETE test_print_accept "print upper(m_int_arr)" "2147483647"
+# OBSOLETE } else {
+# OBSOLETE test_print_accept "print upper(m_int_arr)" "32767"
+# OBSOLETE }
+# OBSOLETE test_print_accept "print upper(m_set_arr)" "e6"
+# OBSOLETE test_print_accept "print upper(m_set_range_arr)" "e5"
+# OBSOLETE test_print_accept "print upper(m_numbered_set_arr)" "n5"
+# OBSOLETE test_print_accept "print upper(m_char_range_arr)" "'Z'"
+# OBSOLETE test_print_accept "print upper(m_bool_range_arr)" "FALSE"
+# OBSOLETE test_print_accept "print upper(m_long_range_arr)" "3211"
+# OBSOLETE test_print_accept "print upper(m_range_arr)" "28"
+# OBSOLETE
+# OBSOLETE # array locations
+# OBSOLETE test_print_accept "print upper(v_arr)" "10";
+# OBSOLETE test_print_accept "print upper(v_char_arr)" {'\^[(]255[)]'}
+# OBSOLETE test_print_accept "print upper(v_bool_arr)" "TRUE"
+# OBSOLETE if [istarget "alpha-*-*"] then {
+# OBSOLETE test_print_accept "print upper(v_int_arr)" "2147483647"
+# OBSOLETE } else {
+# OBSOLETE test_print_accept "print upper(v_int_arr)" "32767"
+# OBSOLETE }
+# OBSOLETE test_print_accept "print upper(v_set_arr)" "e6"
+# OBSOLETE test_print_accept "print upper(v_set_range_arr)" "e5"
+# OBSOLETE test_print_accept "print upper(v_numbered_set_arr)" "n5"
+# OBSOLETE test_print_accept "print upper(v_char_range_arr)" "'Z'"
+# OBSOLETE test_print_accept "print upper(v_bool_range_arr)" "FALSE"
+# OBSOLETE test_print_accept "print upper(v_long_range_arr)" "3211"
+# OBSOLETE test_print_accept "print upper(v_range_arr)" "28"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_length {} {
+# OBSOLETE global passcount
+# OBSOLETE
+# OBSOLETE verbose "testing builtin LENGTH"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE # string locations
+# OBSOLETE test_print_accept "print length(v_chars)" "20"
+# OBSOLETE test_print_accept "print length(v_chars_v)" "7";
+# OBSOLETE test_print_accept "print length(v_bits)" "10";
+# OBSOLETE
+# OBSOLETE # string expressions
+# OBSOLETE test_print_accept "print length(\"the quick brown fox ...\")" "23"
+# OBSOLETE test_print_accept "print length(B'010101010101')" "12"
+# OBSOLETE test_print_accept "print length(\"foo \" // \"bar\")" "7"
+# OBSOLETE
+# OBSOLETE # check some failures
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print length(m_chars)" "typename in invalid context"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print length(v_byte)" "bad argument to LENGTH builtin"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print length(b'000000' // b'111111')" "12"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_size {} {
+# OBSOLETE global passcount
+# OBSOLETE
+# OBSOLETE verbose "testing builtin SIZE"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE # modes
+# OBSOLETE test_print_accept "print size(bool)" "1"
+# OBSOLETE test_print_accept "print size(char)" "1"
+# OBSOLETE test_print_accept "print size(byte)" "1"
+# OBSOLETE if [istarget "alpha-*-*"] then {
+# OBSOLETE test_print_accept "print size(int)" "4"
+# OBSOLETE test_print_accept "print size(ulong)" "8"
+# OBSOLETE test_print_accept "print size(ptr)" "8"
+# OBSOLETE test_print_accept "print size(m_chars_v)" "24"
+# OBSOLETE test_print_accept "print size(m_struct)" "40"
+# OBSOLETE } else {
+# OBSOLETE test_print_accept "print size(int)" "2"
+# OBSOLETE test_print_accept "print size(ulong)" "4"
+# OBSOLETE test_print_accept "print size(ptr)" "4"
+# OBSOLETE test_print_accept "print size(m_chars_v)" "22"
+# OBSOLETE test_print_accept "print size(m_struct)" "36"
+# OBSOLETE }
+# OBSOLETE test_print_accept "print size(m_set)" "1"
+# OBSOLETE test_print_accept "print size(m_numbered_set)" "1"
+# OBSOLETE test_print_accept "print size(m_char_range)" "1"
+# OBSOLETE test_print_accept "print size(m_range_arr)" "17"
+# OBSOLETE test_print_accept "print size(m_chars)" "20"
+# OBSOLETE test_print_accept "print size(m_bits)" "2"
+# OBSOLETE
+# OBSOLETE # locations
+# OBSOLETE test_print_accept "print size(v_bool)" "1"
+# OBSOLETE test_print_accept "print size(v_char)" "1"
+# OBSOLETE test_print_accept "print size(v_byte)" "1"
+# OBSOLETE if [istarget "alpha-*-*"] then {
+# OBSOLETE test_print_accept "print size(v_int)" "4"
+# OBSOLETE test_print_accept "print size(v_ulong)" "8"
+# OBSOLETE test_print_accept "print size(v_ptr)" "8"
+# OBSOLETE test_print_accept "print size(v_chars_v)" "24"
+# OBSOLETE test_print_accept "print size(v_struct)" "40"
+# OBSOLETE } else {
+# OBSOLETE test_print_accept "print size(v_int)" "2"
+# OBSOLETE test_print_accept "print size(v_ulong)" "4"
+# OBSOLETE test_print_accept "print size(v_ptr)" "4"
+# OBSOLETE test_print_accept "print size(v_chars_v)" "22"
+# OBSOLETE test_print_accept "print size(v_struct)" "36"
+# OBSOLETE }
+# OBSOLETE test_print_accept "print size(v_set)" "1"
+# OBSOLETE test_print_accept "print size(v_numbered_set)" "1"
+# OBSOLETE test_print_accept "print size(v_char_range)" "1"
+# OBSOLETE test_print_accept "print size(v_range_arr)" "17"
+# OBSOLETE test_print_accept "print size(v_chars)" "20"
+# OBSOLETE test_print_accept "print size(v_bits)" "2"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_num {} {
+# OBSOLETE global passcount
+# OBSOLETE
+# OBSOLETE verbose "testing builtin NUM"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE # constants
+# OBSOLETE test_print_accept "print num(false)" "0"
+# OBSOLETE test_print_accept "print num(true)" "1"
+# OBSOLETE test_print_accept "print num(10)" "10"
+# OBSOLETE test_print_accept "print num(33-34)" "-1"
+# OBSOLETE test_print_accept "print num('X')" "88"
+# OBSOLETE test_print_accept "print num(e5)" "4"
+# OBSOLETE
+# OBSOLETE # locations
+# OBSOLETE test_print_accept "print num(v_bool)" "0"
+# OBSOLETE test_print_accept "print num(v_char)" "88"
+# OBSOLETE test_print_accept "print num(v_byte)" "-30"
+# OBSOLETE test_print_accept "print num(v_ubyte)" "30"
+# OBSOLETE test_print_accept "print num(v_int)" "-333"
+# OBSOLETE test_print_accept "print num(v_uint)" "333"
+# OBSOLETE test_print_accept "print num(v_long)" "-4444"
+# OBSOLETE test_print_accept "print num(v_ulong)" "4444"
+# OBSOLETE test_print_accept "print num(v_set)" "2"
+# OBSOLETE test_print_accept "print num(v_set_range)" "2"
+# OBSOLETE test_print_accept "print num(v_numbered_set)" "35"
+# OBSOLETE test_print_accept "print num(v_char_range)" "71"
+# OBSOLETE test_print_accept "print num(v_long_range)" "1000"
+# OBSOLETE test_print_accept "print num(v_range)" "23"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE # test builtins as described in chapter 6.20.3 Z.200
+# OBSOLETE test_num
+# OBSOLETE test_size
+# OBSOLETE test_lower
+# OBSOLETE test_upper
+# OBSOLETE test_length
+# OBSOLETE } else {
+# OBSOLETE warning "$test_name tests suppressed."
+# OBSOLETE }
-# Copyright 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests that gdb can call functions in a Chill inferior.
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "callch"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- send_gdb "set language chill\n" ;
-
- gdb_test "break callch.ch:48" ""
- send_gdb "run\n"; gdb_expect -re "Breakpoint .*callch.ch:48.*$gdb_prompt $"
- gdb_test {set fred(10, i)} {a is '10'; b is '12'.}
- gdb_test_exact "call klaus()" {here's klaus calling.}
- gdb_test_exact "call fred()" {too few arguments in function call}
- # Too many arguments are allowed
- gdb_test_exact "call klaus(10, 20, 30)" {here's klaus calling.}
- gdb_test "print a" { = \[\(FALSE:TRUE\): \[\(FALSE:TRUE\): 1\]\]}\
- "print a before king"
- # Current gdb prints 255 for the results that are expected to be -1.
- setup_xfail "mips*-sgi-irix*"
- gdb_test {call king(a, otto[[10, 15], [20, 25]])} "x\\(FALSE, FALSE\\) = 10.*p\\(FALSE, FALSE\\) = -1.*x\\(FALSE, TRUE\\) = 15.*p\\(FALSE, TRUE\\) = -1.*x\\(TRUE, FALSE\\) = 20.*p\\(TRUE, FALSE\\) = -1.*x\\(TRUE, TRUE\\) = 25.*p\\(TRUE, TRUE\\) = -1.*"
- gdb_test "print a" { = \[\(FALSE:TRUE\): \[\(FALSE:TRUE\): -1\]\]}\
- "print a after king"
- gdb_test_exact "call ralph(b)" {x.f1 = 10, x.f2 = FALSE.}
- gdb_test "call whitney(c)" "x.f1\\(FALSE, FALSE\\) = 1.*x.f1\\(FALSE, TRUE\\) = 1.*x.f1\\(TRUE, FALSE\\) = 1.*x.f1\\(TRUE, TRUE\\) = 1.*"
-}
-
-do_tests
+# OBSOLETE # Copyright 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file tests that gdb can call functions in a Chill inferior.
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "callch"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE send_gdb "set language chill\n" ;
+# OBSOLETE
+# OBSOLETE gdb_test "break callch.ch:48" ""
+# OBSOLETE send_gdb "run\n"; gdb_expect -re "Breakpoint .*callch.ch:48.*$gdb_prompt $"
+# OBSOLETE gdb_test {set fred(10, i)} {a is '10'; b is '12'.}
+# OBSOLETE gdb_test_exact "call klaus()" {here's klaus calling.}
+# OBSOLETE gdb_test_exact "call fred()" {too few arguments in function call}
+# OBSOLETE # Too many arguments are allowed
+# OBSOLETE gdb_test_exact "call klaus(10, 20, 30)" {here's klaus calling.}
+# OBSOLETE gdb_test "print a" { = \[\(FALSE:TRUE\): \[\(FALSE:TRUE\): 1\]\]}\
+# OBSOLETE "print a before king"
+# OBSOLETE # Current gdb prints 255 for the results that are expected to be -1.
+# OBSOLETE setup_xfail "mips*-sgi-irix*"
+# OBSOLETE gdb_test {call king(a, otto[[10, 15], [20, 25]])} "x\\(FALSE, FALSE\\) = 10.*p\\(FALSE, FALSE\\) = -1.*x\\(FALSE, TRUE\\) = 15.*p\\(FALSE, TRUE\\) = -1.*x\\(TRUE, FALSE\\) = 20.*p\\(TRUE, FALSE\\) = -1.*x\\(TRUE, TRUE\\) = 25.*p\\(TRUE, TRUE\\) = -1.*"
+# OBSOLETE gdb_test "print a" { = \[\(FALSE:TRUE\): \[\(FALSE:TRUE\): -1\]\]}\
+# OBSOLETE "print a after king"
+# OBSOLETE gdb_test_exact "call ralph(b)" {x.f1 = 10, x.f2 = FALSE.}
+# OBSOLETE gdb_test "call whitney(c)" "x.f1\\(FALSE, FALSE\\) = 1.*x.f1\\(FALSE, TRUE\\) = 1.*x.f1\\(TRUE, FALSE\\) = 1.*x.f1\\(TRUE, TRUE\\) = 1.*"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "chillvars"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- # This is needed (at least on SunOS4) to make sure the
- # the symbol table is read.
- gdb_test "break chillvars.ch:3" ""
- gdb_test "delete 1" ""
-
- gdb_test "set width 0" ""
- gdb_test "set print sevenbit-strings" ""
- gdb_test "set print address off" ""
-
- test_BOOL
- test_CHAR
- test_BYTE
- test_UBYTE
- test_INT
- test_UINT
- test_LONG
- test_ULONG
- test_REAL
- test_LONG_REAL
- test_POWERSET
- test_arrays
- test_strings
- test_structs
-
- test_ptr
-}
-
-proc test_BOOL {} {
-
- gdb_test "ptype bool_true" "type = (BOOL|bool)"
- gdb_test "ptype bool_false" "type = (BOOL|bool)"
- gdb_test "whatis bool_true" "type = (BOOL|bool)"
- gdb_test "whatis bool_false" "type = (BOOL|bool)"
- gdb_test "print bool_false" " = FALSE"
- gdb_test "print bool_true" " = TRUE"
-
-}
-
-proc test_CHAR {} {
- gdb_test "ptype control_char" "type = (CHAR|char)"
- gdb_test "whatis control_char" "type = (CHAR|char)"
- gdb_test "print control_char" { = '\^[(]7[)]'}
- gdb_test "ptype printable_char" "type = (CHAR|char)"
- gdb_test "whatis printable_char" "type = (CHAR|char)"
- gdb_test "print printable_char" " = 'a'"
-
- gdb_test "print lower(char)" { = '\^[(]0[)]'}
- gdb_test "print upper(char)" { = '\^[(]255[)]'}
-}
-
-proc test_BYTE {} {
- gdb_test "ptype byte_low" "type = (BYTE|byte)"
- gdb_test "whatis byte_low" "type = (BYTE|byte)"
- gdb_test "print byte_low" " = -128"
- gdb_test "ptype byte_high" "type = (BYTE|byte)"
- gdb_test "whatis byte_high" "type = (BYTE|byte)"
- gdb_test "print byte_high" " = 127"
-
- gdb_test "print lower(byte)" " = -128"
- gdb_test "print upper(byte)" " = 127"
- gdb_test "print lower(byte_high)" " = -128"
- gdb_test "print upper(byte_high)" " = 127"
-}
-
-proc test_UBYTE {} {
- gdb_test "ptype ubyte_low" "type = (UBYTE|ubyte)"
- gdb_test "whatis ubyte_low" "type = (UBYTE|ubyte)"
- gdb_test "print ubyte_low" " = 0"
- gdb_test "ptype ubyte_high" "type = (UBYTE|ubyte)"
- gdb_test "whatis ubyte_high" "type = (UBYTE|ubyte)"
- gdb_test "print ubyte_high" " = 255"
-}
-
-proc test_INT {} {
- gdb_test "ptype int_low" "type = (INT|int)"
- gdb_test "whatis int_low" "type = (INT|int)"
- gdb_test "print int_low" " = -32768"
- gdb_test "ptype int_high" "type = (INT|int)"
- gdb_test "whatis int_high" "type = (INT|int)"
- gdb_test "print int_high" " = 32767"
-}
-
-proc test_UINT {} {
- gdb_test "ptype uint_low" "type = (UINT|uint)"
- gdb_test "whatis uint_low" "type = (UINT|uint)"
- gdb_test "print uint_low" " = 0"
- gdb_test "ptype uint_high" "type = (UINT|uint)"
- gdb_test "whatis uint_high" "type = (UINT|uint)"
- gdb_test "print uint_high" " = 65535"
-}
-
-proc test_LONG {} {
- gdb_test "ptype long_low" "type = (LONG|long)"
- gdb_test "whatis long_low" "type = (LONG|long)"
- gdb_test "print long_low" " = -2147483648"
- gdb_test "ptype long_high" "type = (LONG|long)"
- gdb_test "whatis long_high" "type = (LONG|long)"
- gdb_test "print long_high" " = 2147483647"
-}
-
-proc test_ULONG {} {
- gdb_test "ptype ulong_low" "type = (ULONG|ulong)"
- gdb_test "whatis ulong_low" "type = (ULONG|ulong)"
- gdb_test "print ulong_low" " = 0"
- gdb_test "ptype ulong_high" "type = (ULONG|ulong)"
- gdb_test "whatis ulong_high" "type = (ULONG|ulong)"
- gdb_test "print ulong_high" " = 4294967295"
-}
-
-proc test_REAL {} {
- gdb_test "ptype real1" "type = (FLOAT|float)"
- gdb_test "whatis real1" "type = (FLOAT|float)"
- gdb_test "print real1" " = 3.14159274"
-}
-
-proc test_LONG_REAL {} {
- gdb_test "ptype long_real1" "type = (DOUBLE|double)"
- gdb_test "whatis long_real1" "type = (DOUBLE|double)"
- gdb_test "print long_real1" " = 3\\.1400000000000001e\\+300"
-}
-
-proc test_POWERSET {} {
-}
-
-proc test_arrays {} {
- gdb_test "ptype booltable1" "type = ARRAY \\(+0:3\\)+ (BOOL|bool)"
- gdb_test_exact "print booltable1" \
- { = [(0): TRUE, (1:2): FALSE, (3): TRUE]}
-
- gdb_test "ptype booltable2" "type = ARRAY \\(+4:7\\)+ (BOOL|bool)"
- gdb_test_exact "print booltable2" { = [(4): TRUE, (5:6): FALSE, (7): TRUE]}
-
- gdb_test "ptype chartable1" "type = ARRAY \\(+0:2\\)+ (CHAR|char)"
- gdb_test_exact "print chartable1" {= [(0): '^(0)', (1): '^(1)', (2): '^(2)']}
-
- gdb_test "ptype chartable2" "type = ARRAY \\(+3:5\\)+ (CHAR|char)"
- gdb_test_exact "print chartable2" \
- {= [(3): '^(0)', (4): '^(1)', (5): '^(2)']}
-
- gdb_test "ptype bytetable1" "type = ARRAY \\(+0:4\\)+ (BYTE|byte)"
- gdb_test_exact "print bytetable1" \
- {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
-
- gdb_test "ptype bytetable2" "type = ARRAY \\(+5:9\\)+ (BYTE|byte)"
- gdb_test_exact "print bytetable2" \
- {= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
-
- gdb_test "ptype bytetable3" \
- "type = ARRAY \\(1:2\\) ARRAY \\('c':'d'\\) ARRAY \\(FALSE:TRUE\\) (BYTE|byte)"
- gdb_test_exact "print bytetable3" \
- {= [(1): [('c'): [(FALSE): 0, (TRUE): 1], ('d'): [(FALSE): 2, (TRUE): 3]], (2): [('c'): [(FALSE): 4, (TRUE): 5], ('d'): [(FALSE): 6, (TRUE): 7]]]}
- gdb_test "ptype bytetable4" \
- "type = ARRAY \\(1:2\\) ARRAY \\('c':'d'\\) ARRAY \\(FALSE:TRUE\\) (BYTE|byte)"
- gdb_test_exact "print bytetable4" \
- {= [(1): [('c'): [(FALSE): 0, (TRUE): 1], ('d'): [(FALSE): 2, (TRUE): 3]], (2): [('c'): [(FALSE): 4, (TRUE): 5], ('d'): [(FALSE): 6, (TRUE): 7]]]}
-
- gdb_test "ptype ubytetable1" "type = ARRAY \\(+0:4\\)+ (UBYTE|ubyte)"
- gdb_test_exact "print ubytetable1" \
- {= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
-
- gdb_test "ptype ubytetable2" "type = ARRAY \\(+5:9\\)+ (UBYTE|ubyte)"
- gdb_test_exact "print ubytetable2" \
- {= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
-
- gdb_test "ptype inttable1" "type = ARRAY \\(+0:4\\)+ (INT|int)"
- gdb_test_exact "print inttable1" \
- {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
-
- gdb_test "ptype inttable2" "type = ARRAY \\(+5:9\\)+ (INT|int)"
- gdb_test_exact "print inttable2" \
- {= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
-
- gdb_test "ptype uinttable1" "type = ARRAY \\(+0:4\\)+ (UINT|uint)"
- gdb_test_exact "print uinttable1" \
- {= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
-
- gdb_test "ptype uinttable2" "type = ARRAY \\(+5:9\\)+ (UINT|uint)"
- gdb_test_exact "print uinttable2" \
- {= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
-
- gdb_test "ptype longtable1" "type = ARRAY \\(+0:4\\)+ (LONG|long)"
- gdb_test_exact "print longtable1" \
- {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
-
- gdb_test "ptype longtable2" "type = ARRAY \\(+5:9\\)+ (LONG|long)"
- gdb_test_exact "print longtable2" \
- {= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
-
- gdb_test "ptype ulongtable1" "type = ARRAY \\(+0:4\\)+ (ULONG|ulong)"
- gdb_test_exact "print ulongtable1" \
- {= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
-
- gdb_test "ptype ulongtable2" "type = ARRAY \\(+5:9\\)+ (ULONG|ulong)"
- gdb_test_exact "print ulongtable2" \
- {= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
-
- gdb_test "ptype realtable1" "type = ARRAY \\(+0:4\\)+ (FLOAT|float)"
- gdb_test_exact "print realtable1" \
- {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
-
- gdb_test "ptype realtable2" "type = ARRAY \\(+5:9\\)+ (FLOAT|float)"
- gdb_test_exact "print realtable2" \
- {= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
-
- gdb_test "ptype longrealtable1" "type = ARRAY \\(+0:4\\)+ (DOUBLE|double)"
- gdb_test_exact "print longrealtable1" \
- {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
-
- gdb_test "ptype longrealtable2" "type = ARRAY \\(+5:9\\)+ (DOUBLE|double)"
- gdb_test_exact "print longrealtable2" \
- {= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
-
- gdb_test "print length(longrealtable2)" {= 5}
- gdb_test "print lower(longrealtable2)" {= 5}
- gdb_test "print upper(longrealtable2)" {= 9}
-}
-
-proc test_strings {} {
-
- gdb_test "ptype string1" "type = CHARS \[(\]4\[)\]+"
- gdb_test "print string1" " = \"abcd\""
-
- gdb_test "ptype string2" "type = CHARS \[(\]+5\[)\]+"
- gdb_test "print string2" { = \"ef\^\(0\)gh\"}
-
- gdb_test "ptype string3" "type = CHARS \[(\]+6\[)\]+"
- gdb_test "print string3" " = \"efghij\""
-
- gdb_test "ptype string4" "type = CHARS \[(\]+7\[)\]+"
- gdb_test "print string4" { = \"zzzzzz\^\(0\)\"}
-
- # These tests require a running process, so run to one of the procs
- # and then do the tests.
-
- if [runto scalar_arithmetic] then {
- gdb_test "ptype string1//string2" "type = CHARS \\(9\\)"
- gdb_test "print string1//string2" { = \"abcdef\^\(0\)gh\"}
- gdb_test_exact {ptype "a chill string"} {type = CHARS (14)}
- gdb_test "print 'a chill string'" " = \"a chill string\""
- gdb_test "print \"ef\"//c'00'//\"gh\"" { = \"ef\^\(0\)gh\"}
- gdb_test "print string1 // \"efgh\"" " = \"abcdefgh\""
- gdb_test "print (6) 'z'" " = \"zzzzzz\""
- gdb_test "ptype (6) 'z'" "type = CHARS \[(\]+6\[)\]+"
- gdb_test "print (1+2*3) 'x'" " = \"xxxxxxx\""
- gdb_test "ptype (1+2*3) 'x'" "type = CHARS \[(\]+7\[)\]+"
- }
-
-}
-
-proc test_structs {} {
- gdb_test "ptype struct1" \
- "type = STRUCT \\(+.*abool (BOOL|bool),.*aint (INT|int),.*astring CHARS \\(+8\\)+.*\\)+"
- gdb_test "print struct1" \
- ".* = \\\[\.abool: TRUE, \.aint: 123, \.astring: \"a string\"\\\]"
- gdb_test "ptype struct2" \
- "type = STRUCT \\(+.*abool (BOOL|bool),.*nstruct simple_struct,.*aint (INT|int).*\\)+"
- gdb_test "print struct2" \
- ".* = \\\[.abool: TRUE, \.nstruct: \\\[\.abool: FALSE, \.aint: 456, \.astring: \"deadbeef\"\\\], \.aint: 789\\\]"
-}
-
-proc test_ptr {} {
- # This is to test Cygnus PR 6932
- gdb_test "print xptr->int" ".* = 32767"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Fred Fish. (fnf@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "chillvars"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE # This is needed (at least on SunOS4) to make sure the
+# OBSOLETE # the symbol table is read.
+# OBSOLETE gdb_test "break chillvars.ch:3" ""
+# OBSOLETE gdb_test "delete 1" ""
+# OBSOLETE
+# OBSOLETE gdb_test "set width 0" ""
+# OBSOLETE gdb_test "set print sevenbit-strings" ""
+# OBSOLETE gdb_test "set print address off" ""
+# OBSOLETE
+# OBSOLETE test_BOOL
+# OBSOLETE test_CHAR
+# OBSOLETE test_BYTE
+# OBSOLETE test_UBYTE
+# OBSOLETE test_INT
+# OBSOLETE test_UINT
+# OBSOLETE test_LONG
+# OBSOLETE test_ULONG
+# OBSOLETE test_REAL
+# OBSOLETE test_LONG_REAL
+# OBSOLETE test_POWERSET
+# OBSOLETE test_arrays
+# OBSOLETE test_strings
+# OBSOLETE test_structs
+# OBSOLETE
+# OBSOLETE test_ptr
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_BOOL {} {
+# OBSOLETE
+# OBSOLETE gdb_test "ptype bool_true" "type = (BOOL|bool)"
+# OBSOLETE gdb_test "ptype bool_false" "type = (BOOL|bool)"
+# OBSOLETE gdb_test "whatis bool_true" "type = (BOOL|bool)"
+# OBSOLETE gdb_test "whatis bool_false" "type = (BOOL|bool)"
+# OBSOLETE gdb_test "print bool_false" " = FALSE"
+# OBSOLETE gdb_test "print bool_true" " = TRUE"
+# OBSOLETE
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_CHAR {} {
+# OBSOLETE gdb_test "ptype control_char" "type = (CHAR|char)"
+# OBSOLETE gdb_test "whatis control_char" "type = (CHAR|char)"
+# OBSOLETE gdb_test "print control_char" { = '\^[(]7[)]'}
+# OBSOLETE gdb_test "ptype printable_char" "type = (CHAR|char)"
+# OBSOLETE gdb_test "whatis printable_char" "type = (CHAR|char)"
+# OBSOLETE gdb_test "print printable_char" " = 'a'"
+# OBSOLETE
+# OBSOLETE gdb_test "print lower(char)" { = '\^[(]0[)]'}
+# OBSOLETE gdb_test "print upper(char)" { = '\^[(]255[)]'}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_BYTE {} {
+# OBSOLETE gdb_test "ptype byte_low" "type = (BYTE|byte)"
+# OBSOLETE gdb_test "whatis byte_low" "type = (BYTE|byte)"
+# OBSOLETE gdb_test "print byte_low" " = -128"
+# OBSOLETE gdb_test "ptype byte_high" "type = (BYTE|byte)"
+# OBSOLETE gdb_test "whatis byte_high" "type = (BYTE|byte)"
+# OBSOLETE gdb_test "print byte_high" " = 127"
+# OBSOLETE
+# OBSOLETE gdb_test "print lower(byte)" " = -128"
+# OBSOLETE gdb_test "print upper(byte)" " = 127"
+# OBSOLETE gdb_test "print lower(byte_high)" " = -128"
+# OBSOLETE gdb_test "print upper(byte_high)" " = 127"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_UBYTE {} {
+# OBSOLETE gdb_test "ptype ubyte_low" "type = (UBYTE|ubyte)"
+# OBSOLETE gdb_test "whatis ubyte_low" "type = (UBYTE|ubyte)"
+# OBSOLETE gdb_test "print ubyte_low" " = 0"
+# OBSOLETE gdb_test "ptype ubyte_high" "type = (UBYTE|ubyte)"
+# OBSOLETE gdb_test "whatis ubyte_high" "type = (UBYTE|ubyte)"
+# OBSOLETE gdb_test "print ubyte_high" " = 255"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_INT {} {
+# OBSOLETE gdb_test "ptype int_low" "type = (INT|int)"
+# OBSOLETE gdb_test "whatis int_low" "type = (INT|int)"
+# OBSOLETE gdb_test "print int_low" " = -32768"
+# OBSOLETE gdb_test "ptype int_high" "type = (INT|int)"
+# OBSOLETE gdb_test "whatis int_high" "type = (INT|int)"
+# OBSOLETE gdb_test "print int_high" " = 32767"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_UINT {} {
+# OBSOLETE gdb_test "ptype uint_low" "type = (UINT|uint)"
+# OBSOLETE gdb_test "whatis uint_low" "type = (UINT|uint)"
+# OBSOLETE gdb_test "print uint_low" " = 0"
+# OBSOLETE gdb_test "ptype uint_high" "type = (UINT|uint)"
+# OBSOLETE gdb_test "whatis uint_high" "type = (UINT|uint)"
+# OBSOLETE gdb_test "print uint_high" " = 65535"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_LONG {} {
+# OBSOLETE gdb_test "ptype long_low" "type = (LONG|long)"
+# OBSOLETE gdb_test "whatis long_low" "type = (LONG|long)"
+# OBSOLETE gdb_test "print long_low" " = -2147483648"
+# OBSOLETE gdb_test "ptype long_high" "type = (LONG|long)"
+# OBSOLETE gdb_test "whatis long_high" "type = (LONG|long)"
+# OBSOLETE gdb_test "print long_high" " = 2147483647"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_ULONG {} {
+# OBSOLETE gdb_test "ptype ulong_low" "type = (ULONG|ulong)"
+# OBSOLETE gdb_test "whatis ulong_low" "type = (ULONG|ulong)"
+# OBSOLETE gdb_test "print ulong_low" " = 0"
+# OBSOLETE gdb_test "ptype ulong_high" "type = (ULONG|ulong)"
+# OBSOLETE gdb_test "whatis ulong_high" "type = (ULONG|ulong)"
+# OBSOLETE gdb_test "print ulong_high" " = 4294967295"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_REAL {} {
+# OBSOLETE gdb_test "ptype real1" "type = (FLOAT|float)"
+# OBSOLETE gdb_test "whatis real1" "type = (FLOAT|float)"
+# OBSOLETE gdb_test "print real1" " = 3.14159274"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_LONG_REAL {} {
+# OBSOLETE gdb_test "ptype long_real1" "type = (DOUBLE|double)"
+# OBSOLETE gdb_test "whatis long_real1" "type = (DOUBLE|double)"
+# OBSOLETE gdb_test "print long_real1" " = 3\\.1400000000000001e\\+300"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_POWERSET {} {
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_arrays {} {
+# OBSOLETE gdb_test "ptype booltable1" "type = ARRAY \\(+0:3\\)+ (BOOL|bool)"
+# OBSOLETE gdb_test_exact "print booltable1" \
+# OBSOLETE { = [(0): TRUE, (1:2): FALSE, (3): TRUE]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype booltable2" "type = ARRAY \\(+4:7\\)+ (BOOL|bool)"
+# OBSOLETE gdb_test_exact "print booltable2" { = [(4): TRUE, (5:6): FALSE, (7): TRUE]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype chartable1" "type = ARRAY \\(+0:2\\)+ (CHAR|char)"
+# OBSOLETE gdb_test_exact "print chartable1" {= [(0): '^(0)', (1): '^(1)', (2): '^(2)']}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype chartable2" "type = ARRAY \\(+3:5\\)+ (CHAR|char)"
+# OBSOLETE gdb_test_exact "print chartable2" \
+# OBSOLETE {= [(3): '^(0)', (4): '^(1)', (5): '^(2)']}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype bytetable1" "type = ARRAY \\(+0:4\\)+ (BYTE|byte)"
+# OBSOLETE gdb_test_exact "print bytetable1" \
+# OBSOLETE {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype bytetable2" "type = ARRAY \\(+5:9\\)+ (BYTE|byte)"
+# OBSOLETE gdb_test_exact "print bytetable2" \
+# OBSOLETE {= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype bytetable3" \
+# OBSOLETE "type = ARRAY \\(1:2\\) ARRAY \\('c':'d'\\) ARRAY \\(FALSE:TRUE\\) (BYTE|byte)"
+# OBSOLETE gdb_test_exact "print bytetable3" \
+# OBSOLETE {= [(1): [('c'): [(FALSE): 0, (TRUE): 1], ('d'): [(FALSE): 2, (TRUE): 3]], (2): [('c'): [(FALSE): 4, (TRUE): 5], ('d'): [(FALSE): 6, (TRUE): 7]]]}
+# OBSOLETE gdb_test "ptype bytetable4" \
+# OBSOLETE "type = ARRAY \\(1:2\\) ARRAY \\('c':'d'\\) ARRAY \\(FALSE:TRUE\\) (BYTE|byte)"
+# OBSOLETE gdb_test_exact "print bytetable4" \
+# OBSOLETE {= [(1): [('c'): [(FALSE): 0, (TRUE): 1], ('d'): [(FALSE): 2, (TRUE): 3]], (2): [('c'): [(FALSE): 4, (TRUE): 5], ('d'): [(FALSE): 6, (TRUE): 7]]]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype ubytetable1" "type = ARRAY \\(+0:4\\)+ (UBYTE|ubyte)"
+# OBSOLETE gdb_test_exact "print ubytetable1" \
+# OBSOLETE {= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype ubytetable2" "type = ARRAY \\(+5:9\\)+ (UBYTE|ubyte)"
+# OBSOLETE gdb_test_exact "print ubytetable2" \
+# OBSOLETE {= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype inttable1" "type = ARRAY \\(+0:4\\)+ (INT|int)"
+# OBSOLETE gdb_test_exact "print inttable1" \
+# OBSOLETE {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype inttable2" "type = ARRAY \\(+5:9\\)+ (INT|int)"
+# OBSOLETE gdb_test_exact "print inttable2" \
+# OBSOLETE {= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype uinttable1" "type = ARRAY \\(+0:4\\)+ (UINT|uint)"
+# OBSOLETE gdb_test_exact "print uinttable1" \
+# OBSOLETE {= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype uinttable2" "type = ARRAY \\(+5:9\\)+ (UINT|uint)"
+# OBSOLETE gdb_test_exact "print uinttable2" \
+# OBSOLETE {= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype longtable1" "type = ARRAY \\(+0:4\\)+ (LONG|long)"
+# OBSOLETE gdb_test_exact "print longtable1" \
+# OBSOLETE {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype longtable2" "type = ARRAY \\(+5:9\\)+ (LONG|long)"
+# OBSOLETE gdb_test_exact "print longtable2" \
+# OBSOLETE {= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype ulongtable1" "type = ARRAY \\(+0:4\\)+ (ULONG|ulong)"
+# OBSOLETE gdb_test_exact "print ulongtable1" \
+# OBSOLETE {= [(0): 0, (1): 1, (2): 2, (3): 3, (4): 4]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype ulongtable2" "type = ARRAY \\(+5:9\\)+ (ULONG|ulong)"
+# OBSOLETE gdb_test_exact "print ulongtable2" \
+# OBSOLETE {= [(5): 0, (6): 1, (7): 2, (8): 3, (9): 4]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype realtable1" "type = ARRAY \\(+0:4\\)+ (FLOAT|float)"
+# OBSOLETE gdb_test_exact "print realtable1" \
+# OBSOLETE {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype realtable2" "type = ARRAY \\(+5:9\\)+ (FLOAT|float)"
+# OBSOLETE gdb_test_exact "print realtable2" \
+# OBSOLETE {= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype longrealtable1" "type = ARRAY \\(+0:4\\)+ (DOUBLE|double)"
+# OBSOLETE gdb_test_exact "print longrealtable1" \
+# OBSOLETE {= [(0): -2, (1): -1, (2): 0, (3): 1, (4): 2]}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype longrealtable2" "type = ARRAY \\(+5:9\\)+ (DOUBLE|double)"
+# OBSOLETE gdb_test_exact "print longrealtable2" \
+# OBSOLETE {= [(5): -2, (6): -1, (7): 0, (8): 1, (9): 2]}
+# OBSOLETE
+# OBSOLETE gdb_test "print length(longrealtable2)" {= 5}
+# OBSOLETE gdb_test "print lower(longrealtable2)" {= 5}
+# OBSOLETE gdb_test "print upper(longrealtable2)" {= 9}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_strings {} {
+# OBSOLETE
+# OBSOLETE gdb_test "ptype string1" "type = CHARS \[(\]4\[)\]+"
+# OBSOLETE gdb_test "print string1" " = \"abcd\""
+# OBSOLETE
+# OBSOLETE gdb_test "ptype string2" "type = CHARS \[(\]+5\[)\]+"
+# OBSOLETE gdb_test "print string2" { = \"ef\^\(0\)gh\"}
+# OBSOLETE
+# OBSOLETE gdb_test "ptype string3" "type = CHARS \[(\]+6\[)\]+"
+# OBSOLETE gdb_test "print string3" " = \"efghij\""
+# OBSOLETE
+# OBSOLETE gdb_test "ptype string4" "type = CHARS \[(\]+7\[)\]+"
+# OBSOLETE gdb_test "print string4" { = \"zzzzzz\^\(0\)\"}
+# OBSOLETE
+# OBSOLETE # These tests require a running process, so run to one of the procs
+# OBSOLETE # and then do the tests.
+# OBSOLETE
+# OBSOLETE if [runto scalar_arithmetic] then {
+# OBSOLETE gdb_test "ptype string1//string2" "type = CHARS \\(9\\)"
+# OBSOLETE gdb_test "print string1//string2" { = \"abcdef\^\(0\)gh\"}
+# OBSOLETE gdb_test_exact {ptype "a chill string"} {type = CHARS (14)}
+# OBSOLETE gdb_test "print 'a chill string'" " = \"a chill string\""
+# OBSOLETE gdb_test "print \"ef\"//c'00'//\"gh\"" { = \"ef\^\(0\)gh\"}
+# OBSOLETE gdb_test "print string1 // \"efgh\"" " = \"abcdefgh\""
+# OBSOLETE gdb_test "print (6) 'z'" " = \"zzzzzz\""
+# OBSOLETE gdb_test "ptype (6) 'z'" "type = CHARS \[(\]+6\[)\]+"
+# OBSOLETE gdb_test "print (1+2*3) 'x'" " = \"xxxxxxx\""
+# OBSOLETE gdb_test "ptype (1+2*3) 'x'" "type = CHARS \[(\]+7\[)\]+"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_structs {} {
+# OBSOLETE gdb_test "ptype struct1" \
+# OBSOLETE "type = STRUCT \\(+.*abool (BOOL|bool),.*aint (INT|int),.*astring CHARS \\(+8\\)+.*\\)+"
+# OBSOLETE gdb_test "print struct1" \
+# OBSOLETE ".* = \\\[\.abool: TRUE, \.aint: 123, \.astring: \"a string\"\\\]"
+# OBSOLETE gdb_test "ptype struct2" \
+# OBSOLETE "type = STRUCT \\(+.*abool (BOOL|bool),.*nstruct simple_struct,.*aint (INT|int).*\\)+"
+# OBSOLETE gdb_test "print struct2" \
+# OBSOLETE ".* = \\\[.abool: TRUE, \.nstruct: \\\[\.abool: FALSE, \.aint: 456, \.astring: \"deadbeef\"\\\], \.aint: 789\\\]"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_ptr {} {
+# OBSOLETE # This is to test Cygnus PR 6932
+# OBSOLETE gdb_test "print xptr->int" ".* = 32767"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Wilfried Moser (moser@aut.alcatel.at
-#
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "enum"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
-
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- return [gdb_test "show language" ".* source language is \"chill\".*" \
- "set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
- runto hugo_
-
- send_gdb "set var \$i := d\n"
- gdb_expect -re ".*$gdb_prompt $"
- gdb_test "print \$i" { = d}
- gdb_test "print size (\$i)" { = 1}
- gdb_test "print b+c" { = 3}
- gdb_test "print c*d" { = 6}
- gdb_test "print a<b" { = TRUE}
- gdb_test "print a=b" { = FALSE}
- gdb_test "print a=a" { = TRUE}
- gdb_test "print a/=\$i" { = TRUE}
-
-# This is PR 8870
- gdb_test "break malloc" ".*"
- gdb_test {set var $j := m_set[b]} ".*invalid.*tuple.*"
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Wilfried Moser (moser@aut.alcatel.at
+# OBSOLETE #
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "enum"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE verbose "loading file '$binfile'"
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE "set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE runto hugo_
+# OBSOLETE
+# OBSOLETE send_gdb "set var \$i := d\n"
+# OBSOLETE gdb_expect -re ".*$gdb_prompt $"
+# OBSOLETE gdb_test "print \$i" { = d}
+# OBSOLETE gdb_test "print size (\$i)" { = 1}
+# OBSOLETE gdb_test "print b+c" { = 3}
+# OBSOLETE gdb_test "print c*d" { = 6}
+# OBSOLETE gdb_test "print a<b" { = TRUE}
+# OBSOLETE gdb_test "print a=b" { = FALSE}
+# OBSOLETE gdb_test "print a=a" { = TRUE}
+# OBSOLETE gdb_test "print a/=\$i" { = TRUE}
+# OBSOLETE
+# OBSOLETE # This is PR 8870
+# OBSOLETE gdb_test "break malloc" ".*"
+# OBSOLETE gdb_test {set var $j := m_set[b]} ".*invalid.*tuple.*"
+# OBSOLETE }
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-# Martin Pottendorfer (pottendo@aut.alcatel.at)
-#
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "gch1041"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
-
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- return [gdb_test "show language" ".* source language is \"chill\".*" \
- "set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
- runto arr_
- # check if array slices print correct index
- gdb_test {print a1(10:30)} { = \[\(10:30\): 33\]}
- gdb_test {print a2(3:5)} { = \[\(3:5\): \[.l: 22, .c: "mowi", .b: TRUE\]\]}
- gdb_test {print a3('a':'c')} { = \[\('a':'c'\): 'X'\]}
- gdb_test {print a4(e2:e5)} { = \[\(e2:e5\): TRUE\]}
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Fred Fish. (fnf@cygnus.com)
+# OBSOLETE # Martin Pottendorfer (pottendo@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "gch1041"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE verbose "loading file '$binfile'"
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE "set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE runto arr_
+# OBSOLETE # check if array slices print correct index
+# OBSOLETE gdb_test {print a1(10:30)} { = \[\(10:30\): 33\]}
+# OBSOLETE gdb_test {print a2(3:5)} { = \[\(3:5\): \[.l: 22, .c: "mowi", .b: TRUE\]\]}
+# OBSOLETE gdb_test {print a3('a':'c')} { = \[\('a':'c'\): 'X'\]}
+# OBSOLETE gdb_test {print a4(e2:e5)} { = \[\(e2:e5\): TRUE\]}
+# OBSOLETE }
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Wilfried Moser (moser@aut.alcatel.at)
-#
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "gch1272"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
-
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- return [gdb_test "show language" ".* source language is \"chill\".*" \
- "set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
- runto brrr
-
- # check foo
- gdb_test {print foo} { = \[\(0:99\): 222\]}
- gdb_test "set var foo := m_array\[\(\*\):44\]" ".*"
- gdb_test {print foo} { = \[\(0:99\): 44\]}
-
- # check bar
- gdb_test {print bar} { = \[\(-10:20\): \[.i: 0, .b: FALSE\]\]}
- gdb_test "set var bar := m_bar\[\(\*\): \[42, TRUE\]\]" ".*"
- gdb_test {print bar} { = \[\(-10:20\): \[.i: 42, .b: TRUE\]\]}
-
- # some failues
- gdb_test "set var foo := \[\(\*\):44\]" {\(\*\) only possible with modename in front of tuple \(mode\[\.\.\]\)}
- gdb_test "set var foo := m_xxx\[\(\*\):44\]" {Invalid cast\.}
- gdb_test "set var foo := m_struct\[\(\*\):44\]" {\(\*\) in invalid context}
- gdb_test "set var foo := m_ps\[\(\*\):44\]" {\(\*\) in invalid context}
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Wilfried Moser (moser@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "gch1272"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE verbose "loading file '$binfile'"
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE "set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE runto brrr
+# OBSOLETE
+# OBSOLETE # check foo
+# OBSOLETE gdb_test {print foo} { = \[\(0:99\): 222\]}
+# OBSOLETE gdb_test "set var foo := m_array\[\(\*\):44\]" ".*"
+# OBSOLETE gdb_test {print foo} { = \[\(0:99\): 44\]}
+# OBSOLETE
+# OBSOLETE # check bar
+# OBSOLETE gdb_test {print bar} { = \[\(-10:20\): \[.i: 0, .b: FALSE\]\]}
+# OBSOLETE gdb_test "set var bar := m_bar\[\(\*\): \[42, TRUE\]\]" ".*"
+# OBSOLETE gdb_test {print bar} { = \[\(-10:20\): \[.i: 42, .b: TRUE\]\]}
+# OBSOLETE
+# OBSOLETE # some failues
+# OBSOLETE gdb_test "set var foo := \[\(\*\):44\]" {\(\*\) only possible with modename in front of tuple \(mode\[\.\.\]\)}
+# OBSOLETE gdb_test "set var foo := m_xxx\[\(\*\):44\]" {Invalid cast\.}
+# OBSOLETE gdb_test "set var foo := m_struct\[\(\*\):44\]" {\(\*\) in invalid context}
+# OBSOLETE gdb_test "set var foo := m_ps\[\(\*\):44\]" {\(\*\) in invalid context}
+# OBSOLETE }
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Wilfried Moser (moser@aut.alcatel.at)
-#
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "gch1280"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
-
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- return [gdb_test "show language" ".* source language is \"chill\".*" \
- "set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
- runto doit
- gdb_test "next" ""
- # check too many array elements
- gdb_test {set var v_x := [1,2,3,4,5]} {Too many array elements}
- gdb_test {set var $i := m_x[(3): 22, 25]} {Too many array elements}
- gdb_test "set var \$i := m_x\[\(2\): 22, 25\]" ""
- gdb_test {print $i} { = \[\(1\): 0, \(2\): 22, \(3\): 25\]}
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Wilfried Moser (moser@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "gch1280"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE verbose "loading file '$binfile'"
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE "set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE runto doit
+# OBSOLETE gdb_test "next" ""
+# OBSOLETE # check too many array elements
+# OBSOLETE gdb_test {set var v_x := [1,2,3,4,5]} {Too many array elements}
+# OBSOLETE gdb_test {set var $i := m_x[(3): 22, 25]} {Too many array elements}
+# OBSOLETE gdb_test "set var \$i := m_x\[\(2\): 22, 25\]" ""
+# OBSOLETE gdb_test {print $i} { = \[\(1\): 0, \(2\): 22, \(3\): 25\]}
+# OBSOLETE }
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests various Chill values, expressions, and types.
-
-# This file was written by Wilfried Moser (moser@aut.alcatel.at)
-# Kurt Fuchs (fuchs_k@aut.alcatel.at)
-#
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "gch922"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- send_gdb "show language\n"
- gdb_expect {
- -re ".* source language is \"chill\".*$gdb_prompt $" {
- pass "set language to \"chill\""
- send_gdb "break xx_\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {
- send_gdb "run\n"
- gdb_expect -re ".*$gdb_prompt $" {}
- return 1
- }
- timeout {
- fail "can't set breakpoint (timeout)"
- return 0
- }
- }
- }
- -re ".*$gdb_prompt $" {
- fail "setting language to \"chill\""
- return 0
- }
- timeout {
- fail "can't show language (timeout)"
- return 0
- }
- }
-}
-
-# Testing printing of a specific value. Increment passcount for
-# success or issue fail message for failure. In both cases, return
-# a 1 to indicate that more tests can proceed. However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-#
-# Args are:
-#
-# First one is string to send_gdb to gdb
-# Second one is string to match gdb result to
-# Third one is an optional message to be printed
-
-proc test_print_accept { args } {
- global gdb_prompt
- global passcount
- global verbose
-
- if [llength $args]==3 then {
- set message [lindex $args 2]
- } else {
- set message [lindex $args 0]
- }
- set sendthis [lindex $args 0]
- set expectthis [lindex $args 1]
- set result [gdb_test $sendthis ".* = ${expectthis}" $message]
- if $result==0 {incr passcount}
- return $result
-}
-
-
-proc test_chars {} {
- global passcount gdb_prompt
-
- verbose "Testing Chars"
- set passcount 0
-
- test_print_accept "print a" {'\^\(0\)'<repeats 70 times>//"Jason""\^\(0,5\)""Hugo\^\(10\)"//'\^\(1\)'<repeats 70 times>}
- test_print_accept "print b" {"Jason""\^\(0,5\)""Hugo\^\(10\)"}
- test_print_accept "print c" {'a'<repeats 70 times>//"\^\(0,5\)Jason"//'b'<repeats 70 times>}
- test_print_accept "print d" {'\^\(11\)'}
-
- gdb_test "set var a := (100)'\^(0,255)'" ""
- test_print_accept "print a" {"\^\(0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255\)"}
-
- send_gdb "set var a := (10)'\^(1)'//(26)\"\^(66,67)\"//\" \"//'I'//' '//'a'//'m'//\" Hugo\" \n" ; gdb_expect -re "$gdb_prompt $"
- test_print_accept "print a" {"\^\(1,1,1,1,1,1,1,1,1,1\)BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC I am Hugo"}
- send_gdb "set var b := \"Hugo \"\"\^(3,4)\"\"Otto\^(17)\" \n" ; gdb_expect -re "$gdb_prompt $"
- test_print_accept "print b" {"Hugo ""\^\(3,4\)""Otto\^\(17\)"}
- send_gdb "set var c := (70)'b' // \"\^(2,3)Hugo \" // (70)'c' \n" ; gdb_expect -re "$gdb_prompt $"
- test_print_accept "print c" {'b'<repeats 70 times>//"\^\(2,3\)Hugo "//'c'<repeats 70 times>}
- gdb_test "set var d := '\^(199)'" ""
- test_print_accept "print d" {'\^\(199\)'}
-
- test_print_accept "print (10)'\^(0)'//(26)\"\^(66,67)\"//\" \"//'I'//' '//'a'//'m'//\" Hugo\"" {"\^\(0,0,0,0,0,0,0,0,0,0\)BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC I am Hugo"}
- test_print_accept "print \"Jason\"\"\^(0,5)\"\"Hugo\^(10)\"" {"Jason""\^\(0,5\)""Hugo\^\(10\)"}
-
- send_gdb "set var a := \"\" \n" ; gdb_expect -re "$gdb_prompt $"
- test_print_accept "print a" {""}
- send_gdb "set var a := \"\"\"\" \n" ; gdb_expect -re "$gdb_prompt $"
- test_print_accept "print a" {""""}
- send_gdb "set var a := \" \"\"\" \n" ; gdb_expect -re "$gdb_prompt $"
- test_print_accept "print a" {" """}
- send_gdb "set var a := \"\^\^\" \n" ; gdb_expect -re "$gdb_prompt $"
- test_print_accept "print a" {"\^\^"}
- send_gdb "set var a := \"'\" \n" ; gdb_expect -re "$gdb_prompt $"
- test_print_accept "print a" {"'"}
-}
-
-
-proc test_code {} {
- global passcount gdb_prompt
-
- verbose "Testing Chars"
- set passcount 0
-
- runto bulk
- test_print_accept "print a" {"\^\(255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127\)"}
- test_print_accept "print b" {"\^\(200\)"}
-# test_print_accept "print c" {'a'<repeats 70 times>//"\^\(0,5\)Jason"//'b'<repeats 70 times>}
- test_print_accept "print d" {'a'}
-}
-
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-
-if [set_lang_chill] then {
- # test builtins as described in chapter 6.20.3 Z.200
-
- test_chars
-# test_code
-} else {
- warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file tests various Chill values, expressions, and types.
+# OBSOLETE
+# OBSOLETE # This file was written by Wilfried Moser (moser@aut.alcatel.at)
+# OBSOLETE # Kurt Fuchs (fuchs_k@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "gch922"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE verbose "loading file '$binfile'"
+# OBSOLETE gdb_load $binfile
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE send_gdb "show language\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE pass "set language to \"chill\""
+# OBSOLETE send_gdb "break xx_\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE send_gdb "run\n"
+# OBSOLETE gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE return 1
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't set breakpoint (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE fail "setting language to \"chill\""
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't show language (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Testing printing of a specific value. Increment passcount for
+# OBSOLETE # success or issue fail message for failure. In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed. However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE #
+# OBSOLETE # Args are:
+# OBSOLETE #
+# OBSOLETE # First one is string to send_gdb to gdb
+# OBSOLETE # Second one is string to match gdb result to
+# OBSOLETE # Third one is an optional message to be printed
+# OBSOLETE
+# OBSOLETE proc test_print_accept { args } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global passcount
+# OBSOLETE global verbose
+# OBSOLETE
+# OBSOLETE if [llength $args]==3 then {
+# OBSOLETE set message [lindex $args 2]
+# OBSOLETE } else {
+# OBSOLETE set message [lindex $args 0]
+# OBSOLETE }
+# OBSOLETE set sendthis [lindex $args 0]
+# OBSOLETE set expectthis [lindex $args 1]
+# OBSOLETE set result [gdb_test $sendthis ".* = ${expectthis}" $message]
+# OBSOLETE if $result==0 {incr passcount}
+# OBSOLETE return $result
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE proc test_chars {} {
+# OBSOLETE global passcount gdb_prompt
+# OBSOLETE
+# OBSOLETE verbose "Testing Chars"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE test_print_accept "print a" {'\^\(0\)'<repeats 70 times>//"Jason""\^\(0,5\)""Hugo\^\(10\)"//'\^\(1\)'<repeats 70 times>}
+# OBSOLETE test_print_accept "print b" {"Jason""\^\(0,5\)""Hugo\^\(10\)"}
+# OBSOLETE test_print_accept "print c" {'a'<repeats 70 times>//"\^\(0,5\)Jason"//'b'<repeats 70 times>}
+# OBSOLETE test_print_accept "print d" {'\^\(11\)'}
+# OBSOLETE
+# OBSOLETE gdb_test "set var a := (100)'\^(0,255)'" ""
+# OBSOLETE test_print_accept "print a" {"\^\(0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255\)"}
+# OBSOLETE
+# OBSOLETE send_gdb "set var a := (10)'\^(1)'//(26)\"\^(66,67)\"//\" \"//'I'//' '//'a'//'m'//\" Hugo\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE test_print_accept "print a" {"\^\(1,1,1,1,1,1,1,1,1,1\)BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC I am Hugo"}
+# OBSOLETE send_gdb "set var b := \"Hugo \"\"\^(3,4)\"\"Otto\^(17)\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE test_print_accept "print b" {"Hugo ""\^\(3,4\)""Otto\^\(17\)"}
+# OBSOLETE send_gdb "set var c := (70)'b' // \"\^(2,3)Hugo \" // (70)'c' \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE test_print_accept "print c" {'b'<repeats 70 times>//"\^\(2,3\)Hugo "//'c'<repeats 70 times>}
+# OBSOLETE gdb_test "set var d := '\^(199)'" ""
+# OBSOLETE test_print_accept "print d" {'\^\(199\)'}
+# OBSOLETE
+# OBSOLETE test_print_accept "print (10)'\^(0)'//(26)\"\^(66,67)\"//\" \"//'I'//' '//'a'//'m'//\" Hugo\"" {"\^\(0,0,0,0,0,0,0,0,0,0\)BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC I am Hugo"}
+# OBSOLETE test_print_accept "print \"Jason\"\"\^(0,5)\"\"Hugo\^(10)\"" {"Jason""\^\(0,5\)""Hugo\^\(10\)"}
+# OBSOLETE
+# OBSOLETE send_gdb "set var a := \"\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE test_print_accept "print a" {""}
+# OBSOLETE send_gdb "set var a := \"\"\"\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE test_print_accept "print a" {""""}
+# OBSOLETE send_gdb "set var a := \" \"\"\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE test_print_accept "print a" {" """}
+# OBSOLETE send_gdb "set var a := \"\^\^\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE test_print_accept "print a" {"\^\^"}
+# OBSOLETE send_gdb "set var a := \"'\" \n" ; gdb_expect -re "$gdb_prompt $"
+# OBSOLETE test_print_accept "print a" {"'"}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE proc test_code {} {
+# OBSOLETE global passcount gdb_prompt
+# OBSOLETE
+# OBSOLETE verbose "Testing Chars"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE runto bulk
+# OBSOLETE test_print_accept "print a" {"\^\(255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127\)"}
+# OBSOLETE test_print_accept "print b" {"\^\(200\)"}
+# OBSOLETE # test_print_accept "print c" {'a'<repeats 70 times>//"\^\(0,5\)Jason"//'b'<repeats 70 times>}
+# OBSOLETE test_print_accept "print d" {'a'}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE # test builtins as described in chapter 6.20.3 Z.200
+# OBSOLETE
+# OBSOLETE test_chars
+# OBSOLETE # test_code
+# OBSOLETE } else {
+# OBSOLETE warning "$test_name tests suppressed."
+# OBSOLETE }
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests various Chill values, expressions, and types.
-
-# This file was written by Wilfried Moser (moser@aut.alcatel.at)
-# Kurt Fuchs (fuchs_k@aut.alcatel.at)
-#
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "gch981"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- send_gdb "show language\n"
- gdb_expect {
- -re ".* source language is \"chill\".*$gdb_prompt $" {
- pass "set language to \"chill\""
- send_gdb "break xx_\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {
- send_gdb "run\n"
- gdb_expect -re ".*$gdb_prompt $" {}
- return 1
- }
- timeout {
- fail "can't set breakpoint (timeout)"
- return 0
- }
- }
- }
- -re ".*$gdb_prompt $" {
- fail "setting language to \"chill\""
- return 0
- }
- timeout {
- fail "can't show language (timeout)"
- return 0
- }
- }
-}
-
-# Testing printing of a specific value. Increment passcount for
-# success or issue fail message for failure. In both cases, return
-# a 1 to indicate that more tests can proceed. However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-#
-# Args are:
-#
-# First one is string to send_gdb to gdb
-# Second one is string to match gdb result to
-# Third one is an optional message to be printed
-
-proc test_print_accept { args } {
- global gdb_prompt
- global passcount
- global verbose
-
- if [llength $args]==3 then {
- set message [lindex $args 2]
- } else {
- set message [lindex $args 0]
- }
- set sendthis [lindex $args 0]
- set expectthis [lindex $args 1]
- set result [gdb_test $sendthis ".* = ${expectthis}" $message]
- if $result==0 {incr passcount}
- return $result
-}
-
-proc test_power {} {
- global passcount gdb_prompt
-
- verbose "Testing some POWERSET Stuff"
- set passcount 0
-
- test_print_accept "print v1_power1" {\[e1:e5\]}
- test_print_accept "print v2_power1" {\[\]}
- test_print_accept "print SIZE(v1_power1)" "1"
-
- gdb_test "set v1_power1 := \[b1\]" ""
-# if GDB has rejected the improper values, we have to gdb_expect the same!
- test_print_accept "print v1_power1" {\[e1:e5\]}
-
- gdb_test "set v1_power1 := \[a1,a2\]" ""
- test_print_accept "print v1_power1" {\[e1:e5\]}
- gdb_test "set v1_power1 := \[b1,b2,b3,e4\]" ""
- test_print_accept "print v1_power1" {\[e1:e5\]}
- gdb_test "set v1_power1 := \[e4:e5\]" ""
- test_print_accept "print v1_power1" {\[e4:e5\]}
- gdb_test "set v1_power1 := \[e1, e2:e3, e5\]" ""
- test_print_accept "print v1_power1" {\[e1:e3, e5\]}
- gdb_test "set v1_power1 := \[e1, e2:e4, e4:e5\]" ""
- test_print_accept "print v1_power1" {\[e1:e5\]}
- gdb_test "set v1_power1 := \[e1, e1:e3, e1:e2, e2:e3\]" ""
- test_print_accept "print v1_power1" {\[e1:e3\]}
-
- gdb_test "set v_power2 := \[e2\]" ""
- test_print_accept "print v_power2" {\[\]}
- gdb_test "set v_power2 := \[1,2,3\]" ""
- test_print_accept "print v_power2" {\[\]}
- gdb_test "set v_power2 := \[e2, b2, b1\]" ""
- test_print_accept "print v_power2" {\[\]}
-
-# Note, that this is a numbered SET, so a1:a3 contains all elements (exept a6)
- gdb_test "set v_power2 := \[a1:a3, a6:a4, a7:a9\]" ""
- test_print_accept "print v_power2" {\[a6:a3\]}
- gdb_test "set v_power2 := \[a1, a4:a6, a9\]" ""
- test_print_accept "print v_power2" {\[a1, a9\]}
- gdb_test "set v_power2 := \[a1:a2, a6, a9\]" ""
- test_print_accept "print v_power2" {\[a6:a2, a9\]}
- gdb_test "set v_power2 := \[a1, a4, a7:a8, a9:a3\]" ""
- test_print_accept "print v_power2" {\[a1, a4, a9:a8\]}
- gdb_test "set v_power2 := \[a1, a4:a8\]" ""
- test_print_accept "print v_power2" {\[a1, a4:a8\]}
- gdb_test "set v_power2 := \[a8,a3,a7,a9,a5,a6\]" ""
- test_print_accept "print v_power2" {\[a6, a5, a9, a7, a3, a8\]}
-
- gdb_test "set v_power3 := \[b1:b2,e1\]" ""
- test_print_accept "print v_power3" {\[b1:b2\]}
- gdb_test "set v_power3 := \[b1, b3, b6:b7\]" ""
- test_print_accept "print v_power3" {\[b1, b3, b6:b7\]}
- gdb_test "set v_power3 := \[b1, b3:b4, b7\]" ""
- test_print_accept "print v_power3" {\[b1, b3:b4, b7\]}
- gdb_test "set v_power3 := \[b1, b4:b6, b7\]" ""
- test_print_accept "print v_power3" {\[b1, b4:b7\]}
- gdb_test "set v_power3 := \[b1:b7\]" ""
- test_print_accept "print v_power3" {\[b1:b7\]}
- gdb_test "set v_power3 := \[b5:b7, b1\]" ""
- test_print_accept "print v_power3" {\[b1, b5:b7\]}
-
- gdb_test "set v_power4 := \[\"b\"\]" ""
- test_print_accept "print v_power4" {\['b':'x'\]}
- gdb_test "set v_power4 := \[5\]" ""
- test_print_accept "print v_power4" {\['b':'x'\]}
- gdb_test "set v_power4 := \['c':'f','g':'h','o':'t'\]" ""
- test_print_accept "print v_power4" {\['c':'h', 'o':'t'\]}
- gdb_test "set v_power4 := \['a','b','c','d','e','f'\]" ""
- test_print_accept "print v_power4" {\['a':'f'\]}
- gdb_test "set v_power4 := \['\^(0)':'\^(200)'\]" ""
- test_print_accept "print v_power4" {\['\^\(0\)':'\^\(200\)'\]}
-
- gdb_test "set v_power5 := \[a8\]" ""
- test_print_accept "print v_power5" {\[2:100\]}
- gdb_test "set v_power5 := \[4\]" ""
- test_print_accept "print v_power5" {\[4\]}
- gdb_test "set v_power5 := \[3:95,9:100,10:107,200:250\]" ""
- test_print_accept "print v_power5" {\[3:107, 200:250\]}
- gdb_test "set v_power5 := \[2, 100:120, 350:400\]" ""
- test_print_accept "print v_power5" {\[2, 100:120, 350:400\]}
- gdb_test "set v_power5 := \[2:64,65:127,128:256,256:399,400\]" ""
- test_print_accept "print v_power5" {\[2:400\]}
- gdb_test "set v_power5 := \[3:95, 99:100, 101:107, 200:250\]" ""
- test_print_accept "print v_power5" {\[3:95, 99:107, 200:250\]}
-
- gdb_test "set v_power6 := \[a8\]" ""
- test_print_accept "print v_power6" {\[\]}
- gdb_test "set v_power6 := \[4\]" ""
- test_print_accept "print v_power6" {\[4\]}
- gdb_test "set v_power6 := \[3:95, 99:100, 101:107, 200:250\]" ""
- test_print_accept "print v_power6" {\[3:95, 99:107, 200:250\]}
- gdb_test "set v_power6 := \[-111:0, 1:112, 11111:22222\]" ""
- test_print_accept "print v_power6" {\[-111:112, 11111:22222\]}
- gdb_test "set v_power6 := \[0, 200:4000, 6666:9999\]" ""
- test_print_accept "print v_power6" {\[0, 200:4000, 6666:9999\]}
-
-# gdb_test "set v_power7 := \[a8\]" ""
-# test_print_accept "print v_power7" {\[2:100\]}
-# gdb_test "set v_power7 := \[4\]" ""
-# test_print_accept "print v_power7" {\[4\]}
-# gdb_test "set v_power7 := \[3:95, 99:100, 101:107, 200:250\]" ""
-# test_print_accept "print v_power7" {\[3:95, 99:107, 200:250\]}
-# gdb_test "set v_power7 := \[0, 1000, 1000000, 10000000000\]" ""
-# test_print_accept "print v_power7" {\[0, 1000, 1000000, 1000000000\]}
-# gdb_test "set v_power7 := \[-20000:100000, 111111:2222222\]" ""
-# test_print_accept "print v_power7" {\[-20000:100000, 111111:2222222\]}
-# gdb_test "set v_power7 := \[\]" ""
-# test_print_accept "print v_power7" {\[3:95, 99:107, 200:250\]}
-# gdb_test "set v_power7 := \[2:-500, -501:1, 20:370, -888:-920, 1000:2000, 1800:2500\]\ " ""
-# test_print_accept "print v_power7" {\[-920:-888, -501:2, 20:370, 1000:2500\]}
-# test_print_accept "print SIZE(v_power7)" ""
-
-
- runto 58
- test_print_accept "print v_set1 IN v1_power1" "TRUE"
- test_print_accept "print v_set1 IN v2_power1" "FALSE"
-
-}
-
-
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-
-if [set_lang_chill] then {
- # test builtins as described in chapter 6.20.3 Z.200
-
- test_power
-} else {
- warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file tests various Chill values, expressions, and types.
+# OBSOLETE
+# OBSOLETE # This file was written by Wilfried Moser (moser@aut.alcatel.at)
+# OBSOLETE # Kurt Fuchs (fuchs_k@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "gch981"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE verbose "loading file '$binfile'"
+# OBSOLETE gdb_load $binfile
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE send_gdb "show language\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE pass "set language to \"chill\""
+# OBSOLETE send_gdb "break xx_\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE send_gdb "run\n"
+# OBSOLETE gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE return 1
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't set breakpoint (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE fail "setting language to \"chill\""
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't show language (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Testing printing of a specific value. Increment passcount for
+# OBSOLETE # success or issue fail message for failure. In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed. However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE #
+# OBSOLETE # Args are:
+# OBSOLETE #
+# OBSOLETE # First one is string to send_gdb to gdb
+# OBSOLETE # Second one is string to match gdb result to
+# OBSOLETE # Third one is an optional message to be printed
+# OBSOLETE
+# OBSOLETE proc test_print_accept { args } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global passcount
+# OBSOLETE global verbose
+# OBSOLETE
+# OBSOLETE if [llength $args]==3 then {
+# OBSOLETE set message [lindex $args 2]
+# OBSOLETE } else {
+# OBSOLETE set message [lindex $args 0]
+# OBSOLETE }
+# OBSOLETE set sendthis [lindex $args 0]
+# OBSOLETE set expectthis [lindex $args 1]
+# OBSOLETE set result [gdb_test $sendthis ".* = ${expectthis}" $message]
+# OBSOLETE if $result==0 {incr passcount}
+# OBSOLETE return $result
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_power {} {
+# OBSOLETE global passcount gdb_prompt
+# OBSOLETE
+# OBSOLETE verbose "Testing some POWERSET Stuff"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE test_print_accept "print v1_power1" {\[e1:e5\]}
+# OBSOLETE test_print_accept "print v2_power1" {\[\]}
+# OBSOLETE test_print_accept "print SIZE(v1_power1)" "1"
+# OBSOLETE
+# OBSOLETE gdb_test "set v1_power1 := \[b1\]" ""
+# OBSOLETE # if GDB has rejected the improper values, we have to gdb_expect the same!
+# OBSOLETE test_print_accept "print v1_power1" {\[e1:e5\]}
+# OBSOLETE
+# OBSOLETE gdb_test "set v1_power1 := \[a1,a2\]" ""
+# OBSOLETE test_print_accept "print v1_power1" {\[e1:e5\]}
+# OBSOLETE gdb_test "set v1_power1 := \[b1,b2,b3,e4\]" ""
+# OBSOLETE test_print_accept "print v1_power1" {\[e1:e5\]}
+# OBSOLETE gdb_test "set v1_power1 := \[e4:e5\]" ""
+# OBSOLETE test_print_accept "print v1_power1" {\[e4:e5\]}
+# OBSOLETE gdb_test "set v1_power1 := \[e1, e2:e3, e5\]" ""
+# OBSOLETE test_print_accept "print v1_power1" {\[e1:e3, e5\]}
+# OBSOLETE gdb_test "set v1_power1 := \[e1, e2:e4, e4:e5\]" ""
+# OBSOLETE test_print_accept "print v1_power1" {\[e1:e5\]}
+# OBSOLETE gdb_test "set v1_power1 := \[e1, e1:e3, e1:e2, e2:e3\]" ""
+# OBSOLETE test_print_accept "print v1_power1" {\[e1:e3\]}
+# OBSOLETE
+# OBSOLETE gdb_test "set v_power2 := \[e2\]" ""
+# OBSOLETE test_print_accept "print v_power2" {\[\]}
+# OBSOLETE gdb_test "set v_power2 := \[1,2,3\]" ""
+# OBSOLETE test_print_accept "print v_power2" {\[\]}
+# OBSOLETE gdb_test "set v_power2 := \[e2, b2, b1\]" ""
+# OBSOLETE test_print_accept "print v_power2" {\[\]}
+# OBSOLETE
+# OBSOLETE # Note, that this is a numbered SET, so a1:a3 contains all elements (exept a6)
+# OBSOLETE gdb_test "set v_power2 := \[a1:a3, a6:a4, a7:a9\]" ""
+# OBSOLETE test_print_accept "print v_power2" {\[a6:a3\]}
+# OBSOLETE gdb_test "set v_power2 := \[a1, a4:a6, a9\]" ""
+# OBSOLETE test_print_accept "print v_power2" {\[a1, a9\]}
+# OBSOLETE gdb_test "set v_power2 := \[a1:a2, a6, a9\]" ""
+# OBSOLETE test_print_accept "print v_power2" {\[a6:a2, a9\]}
+# OBSOLETE gdb_test "set v_power2 := \[a1, a4, a7:a8, a9:a3\]" ""
+# OBSOLETE test_print_accept "print v_power2" {\[a1, a4, a9:a8\]}
+# OBSOLETE gdb_test "set v_power2 := \[a1, a4:a8\]" ""
+# OBSOLETE test_print_accept "print v_power2" {\[a1, a4:a8\]}
+# OBSOLETE gdb_test "set v_power2 := \[a8,a3,a7,a9,a5,a6\]" ""
+# OBSOLETE test_print_accept "print v_power2" {\[a6, a5, a9, a7, a3, a8\]}
+# OBSOLETE
+# OBSOLETE gdb_test "set v_power3 := \[b1:b2,e1\]" ""
+# OBSOLETE test_print_accept "print v_power3" {\[b1:b2\]}
+# OBSOLETE gdb_test "set v_power3 := \[b1, b3, b6:b7\]" ""
+# OBSOLETE test_print_accept "print v_power3" {\[b1, b3, b6:b7\]}
+# OBSOLETE gdb_test "set v_power3 := \[b1, b3:b4, b7\]" ""
+# OBSOLETE test_print_accept "print v_power3" {\[b1, b3:b4, b7\]}
+# OBSOLETE gdb_test "set v_power3 := \[b1, b4:b6, b7\]" ""
+# OBSOLETE test_print_accept "print v_power3" {\[b1, b4:b7\]}
+# OBSOLETE gdb_test "set v_power3 := \[b1:b7\]" ""
+# OBSOLETE test_print_accept "print v_power3" {\[b1:b7\]}
+# OBSOLETE gdb_test "set v_power3 := \[b5:b7, b1\]" ""
+# OBSOLETE test_print_accept "print v_power3" {\[b1, b5:b7\]}
+# OBSOLETE
+# OBSOLETE gdb_test "set v_power4 := \[\"b\"\]" ""
+# OBSOLETE test_print_accept "print v_power4" {\['b':'x'\]}
+# OBSOLETE gdb_test "set v_power4 := \[5\]" ""
+# OBSOLETE test_print_accept "print v_power4" {\['b':'x'\]}
+# OBSOLETE gdb_test "set v_power4 := \['c':'f','g':'h','o':'t'\]" ""
+# OBSOLETE test_print_accept "print v_power4" {\['c':'h', 'o':'t'\]}
+# OBSOLETE gdb_test "set v_power4 := \['a','b','c','d','e','f'\]" ""
+# OBSOLETE test_print_accept "print v_power4" {\['a':'f'\]}
+# OBSOLETE gdb_test "set v_power4 := \['\^(0)':'\^(200)'\]" ""
+# OBSOLETE test_print_accept "print v_power4" {\['\^\(0\)':'\^\(200\)'\]}
+# OBSOLETE
+# OBSOLETE gdb_test "set v_power5 := \[a8\]" ""
+# OBSOLETE test_print_accept "print v_power5" {\[2:100\]}
+# OBSOLETE gdb_test "set v_power5 := \[4\]" ""
+# OBSOLETE test_print_accept "print v_power5" {\[4\]}
+# OBSOLETE gdb_test "set v_power5 := \[3:95,9:100,10:107,200:250\]" ""
+# OBSOLETE test_print_accept "print v_power5" {\[3:107, 200:250\]}
+# OBSOLETE gdb_test "set v_power5 := \[2, 100:120, 350:400\]" ""
+# OBSOLETE test_print_accept "print v_power5" {\[2, 100:120, 350:400\]}
+# OBSOLETE gdb_test "set v_power5 := \[2:64,65:127,128:256,256:399,400\]" ""
+# OBSOLETE test_print_accept "print v_power5" {\[2:400\]}
+# OBSOLETE gdb_test "set v_power5 := \[3:95, 99:100, 101:107, 200:250\]" ""
+# OBSOLETE test_print_accept "print v_power5" {\[3:95, 99:107, 200:250\]}
+# OBSOLETE
+# OBSOLETE gdb_test "set v_power6 := \[a8\]" ""
+# OBSOLETE test_print_accept "print v_power6" {\[\]}
+# OBSOLETE gdb_test "set v_power6 := \[4\]" ""
+# OBSOLETE test_print_accept "print v_power6" {\[4\]}
+# OBSOLETE gdb_test "set v_power6 := \[3:95, 99:100, 101:107, 200:250\]" ""
+# OBSOLETE test_print_accept "print v_power6" {\[3:95, 99:107, 200:250\]}
+# OBSOLETE gdb_test "set v_power6 := \[-111:0, 1:112, 11111:22222\]" ""
+# OBSOLETE test_print_accept "print v_power6" {\[-111:112, 11111:22222\]}
+# OBSOLETE gdb_test "set v_power6 := \[0, 200:4000, 6666:9999\]" ""
+# OBSOLETE test_print_accept "print v_power6" {\[0, 200:4000, 6666:9999\]}
+# OBSOLETE
+# OBSOLETE # gdb_test "set v_power7 := \[a8\]" ""
+# OBSOLETE # test_print_accept "print v_power7" {\[2:100\]}
+# OBSOLETE # gdb_test "set v_power7 := \[4\]" ""
+# OBSOLETE # test_print_accept "print v_power7" {\[4\]}
+# OBSOLETE # gdb_test "set v_power7 := \[3:95, 99:100, 101:107, 200:250\]" ""
+# OBSOLETE # test_print_accept "print v_power7" {\[3:95, 99:107, 200:250\]}
+# OBSOLETE # gdb_test "set v_power7 := \[0, 1000, 1000000, 10000000000\]" ""
+# OBSOLETE # test_print_accept "print v_power7" {\[0, 1000, 1000000, 1000000000\]}
+# OBSOLETE # gdb_test "set v_power7 := \[-20000:100000, 111111:2222222\]" ""
+# OBSOLETE # test_print_accept "print v_power7" {\[-20000:100000, 111111:2222222\]}
+# OBSOLETE # gdb_test "set v_power7 := \[\]" ""
+# OBSOLETE # test_print_accept "print v_power7" {\[3:95, 99:107, 200:250\]}
+# OBSOLETE # gdb_test "set v_power7 := \[2:-500, -501:1, 20:370, -888:-920, 1000:2000, 1800:2500\]\ " ""
+# OBSOLETE # test_print_accept "print v_power7" {\[-920:-888, -501:2, 20:370, 1000:2500\]}
+# OBSOLETE # test_print_accept "print SIZE(v_power7)" ""
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE runto 58
+# OBSOLETE test_print_accept "print v_set1 IN v1_power1" "TRUE"
+# OBSOLETE test_print_accept "print v_set1 IN v2_power1" "FALSE"
+# OBSOLETE
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE # test builtins as described in chapter 6.20.3 Z.200
+# OBSOLETE
+# OBSOLETE test_power
+# OBSOLETE } else {
+# OBSOLETE warning "$test_name tests suppressed."
+# OBSOLETE }
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-# Martin Pottendorfer (pottendo@aut.alcatel.at)
-#
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "misc"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
-
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- return [gdb_test "show language" ".* source language is \"chill\".*" \
- "set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
- runto dummyfunc
- # check upper/lower case
- gdb_test "ptype BOOL" " = (bool|BOOL)"
- gdb_test "ptype bool" " = (bool|BOOL)"
- gdb_test "print otto" " = 42"
- gdb_test "print OTTO" " = 42"
- gdb_test "print otTO" " = 42"
- gdb_test "print OTto" " = 42"
- gdb_test "print NULL" " = NULL" "print emptiness literal"
-
- # This tests PR 8496.
- gdb_test {printf "%d %d.", 3+4,2} "7 2." "printf with 2 arguments"
-
- # This tests GCH/924
- gdb_test {print (h'23)} { = 35} "print parantised integer literal"
-
- # Linux thinks this is at line 6, but is otherwise ok.
- setup_xfail "i*86-pc-linux*-gnu"
- gdb_test "info line" \
- {Line 7 of .*misc.ch.* at address H'[0-9a-fA-F]+.*}\
- "info about current line"
-
- # check array () type (expr)
- setup_xfail "m68*-*-hpux*"
- gdb_test "print array () ubyte (foo)" { = \[\(0:11\): 0\]}
-
- send_gdb "set var \$i := foo\n"
- gdb_expect -re ".*$gdb_prompt $"
- setup_xfail "m68*-*-hpux*"
- gdb_test "print/x array () byte (\$i)" { = \[\(0:11\): H'0\]}
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Fred Fish. (fnf@cygnus.com)
+# OBSOLETE # Martin Pottendorfer (pottendo@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "misc"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE verbose "loading file '$binfile'"
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE "set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE runto dummyfunc
+# OBSOLETE # check upper/lower case
+# OBSOLETE gdb_test "ptype BOOL" " = (bool|BOOL)"
+# OBSOLETE gdb_test "ptype bool" " = (bool|BOOL)"
+# OBSOLETE gdb_test "print otto" " = 42"
+# OBSOLETE gdb_test "print OTTO" " = 42"
+# OBSOLETE gdb_test "print otTO" " = 42"
+# OBSOLETE gdb_test "print OTto" " = 42"
+# OBSOLETE gdb_test "print NULL" " = NULL" "print emptiness literal"
+# OBSOLETE
+# OBSOLETE # This tests PR 8496.
+# OBSOLETE gdb_test {printf "%d %d.", 3+4,2} "7 2." "printf with 2 arguments"
+# OBSOLETE
+# OBSOLETE # This tests GCH/924
+# OBSOLETE gdb_test {print (h'23)} { = 35} "print parantised integer literal"
+# OBSOLETE
+# OBSOLETE # Linux thinks this is at line 6, but is otherwise ok.
+# OBSOLETE setup_xfail "i*86-pc-linux*-gnu"
+# OBSOLETE gdb_test "info line" \
+# OBSOLETE {Line 7 of .*misc.ch.* at address H'[0-9a-fA-F]+.*}\
+# OBSOLETE "info about current line"
+# OBSOLETE
+# OBSOLETE # check array () type (expr)
+# OBSOLETE setup_xfail "m68*-*-hpux*"
+# OBSOLETE gdb_test "print array () ubyte (foo)" { = \[\(0:11\): 0\]}
+# OBSOLETE
+# OBSOLETE send_gdb "set var \$i := foo\n"
+# OBSOLETE gdb_expect -re ".*$gdb_prompt $"
+# OBSOLETE setup_xfail "m68*-*-hpux*"
+# OBSOLETE gdb_test "print/x array () byte (\$i)" { = \[\(0:11\): H'0\]}
+# OBSOLETE }
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests various Chill values, expressions, and types.
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "powerset"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- send_gdb "show language\n"
- gdb_expect {
- -re ".* source language is \"chill\".*$gdb_prompt $" {
- pass "set language to \"chill\""
- send_gdb "break xx_\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {
- send_gdb "run\n"
- gdb_expect -re ".*$gdb_prompt $" {}
- return 1
- }
- timeout {
- fail "can't set breakpoint (timeout)"
- return 0
- }
- }
- }
- -re ".*$gdb_prompt $" {
- fail "setting language to \"chill\""
- return 0
- }
- timeout {
- fail "can't show language (timeout)"
- return 0
- }
- }
-}
-
-# Testing printing of a specific value. Increment passcount for
-# success or issue fail message for failure. In both cases, return
-# a 1 to indicate that more tests can proceed. However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-#
-# Args are:
-#
-# First one is string to send_gdb to gdb
-# Second one is string to match gdb result to
-# Third one is an optional message to be printed
-
-proc test_print_accept { args } {
- global gdb_prompt
- global passcount
- global verbose
-
- if [llength $args]==3 then {
- set message [lindex $args 2]
- } else {
- set message [lindex $args 0]
- }
- set sendthis [lindex $args 0]
- set expectthis [lindex $args 1]
- set result [gdb_test $sendthis ".* = ${expectthis}" $message]
- if $result==0 {incr passcount}
- return $result
-}
-
-proc test_card {} {
- global passcount
-
- verbose "testing builtin CARD"
- set passcount 0
-
- # discrete mode names
- test_print_accept "print card(v_ps1)" "4"
- test_print_accept "print card(v_ps2)" "15"
- test_print_accept "print card(v_ps3)" "4"
- test_print_accept "print card(v_ps4)" "11"
- test_print_accept "print card(v_ps5)" "1"
- test_print_accept "print card(v_ps51)" "0"
- test_print_accept "print card(v_ps6)" "101"
-
- # a failure
- setup_xfail "*-*-*"
- test_print_accept "print card(m_ps1)" "typename in invalid context"
-}
-
-proc test_min {} {
- global passcount
-
- verbose "testing builtin MIN"
- set passcount 0
-
- # discrete mode names
- test_print_accept "print min(v_ps1)" "1"
- test_print_accept "print min(v_ps2)" "-100"
- test_print_accept "print min(v_ps3)" "bb"
- test_print_accept "print min(v_ps4)" "','"
- test_print_accept "print min(v_ps5)" "FALSE"
- test_print_accept "print min(v_ps6)" "-50"
-
- # a failure
- setup_xfail "*-*-*"
- test_print_accept "print min(v_ps51)" "MIN for empty powerset"
- setup_xfail "*-*-*"
- test_print_accept "print min(m_ps1)" "typename in invalid context"
-}
-
-proc test_max {} {
- global passcount
-
- verbose "testing builtin MIN"
- set passcount 0
-
- # discrete mode names
- test_print_accept "print max(v_ps1)" "7"
- test_print_accept "print max(v_ps2)" "100"
- test_print_accept "print max(v_ps3)" "ii"
- test_print_accept "print max(v_ps4)" "'z'"
- test_print_accept "print max(v_ps5)" "FALSE"
- test_print_accept "print max(v_ps6)" "50"
-
- # test an IN
- test_print_accept "print 0 in v_ps6" "TRUE"
-
- # a failure
- setup_xfail "*-*-*"
- test_print_accept "print max(v_ps51)" "MAX for empty powerset"
-}
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if [set_lang_chill] then {
- # test builtins as described in chapter 6.20.3 Z.200
- test_card
- test_min
- test_max
-} else {
- warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file tests various Chill values, expressions, and types.
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "powerset"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE verbose "loading file '$binfile'"
+# OBSOLETE gdb_load $binfile
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE send_gdb "show language\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE pass "set language to \"chill\""
+# OBSOLETE send_gdb "break xx_\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE send_gdb "run\n"
+# OBSOLETE gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE return 1
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't set breakpoint (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE fail "setting language to \"chill\""
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't show language (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Testing printing of a specific value. Increment passcount for
+# OBSOLETE # success or issue fail message for failure. In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed. However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE #
+# OBSOLETE # Args are:
+# OBSOLETE #
+# OBSOLETE # First one is string to send_gdb to gdb
+# OBSOLETE # Second one is string to match gdb result to
+# OBSOLETE # Third one is an optional message to be printed
+# OBSOLETE
+# OBSOLETE proc test_print_accept { args } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global passcount
+# OBSOLETE global verbose
+# OBSOLETE
+# OBSOLETE if [llength $args]==3 then {
+# OBSOLETE set message [lindex $args 2]
+# OBSOLETE } else {
+# OBSOLETE set message [lindex $args 0]
+# OBSOLETE }
+# OBSOLETE set sendthis [lindex $args 0]
+# OBSOLETE set expectthis [lindex $args 1]
+# OBSOLETE set result [gdb_test $sendthis ".* = ${expectthis}" $message]
+# OBSOLETE if $result==0 {incr passcount}
+# OBSOLETE return $result
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_card {} {
+# OBSOLETE global passcount
+# OBSOLETE
+# OBSOLETE verbose "testing builtin CARD"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE # discrete mode names
+# OBSOLETE test_print_accept "print card(v_ps1)" "4"
+# OBSOLETE test_print_accept "print card(v_ps2)" "15"
+# OBSOLETE test_print_accept "print card(v_ps3)" "4"
+# OBSOLETE test_print_accept "print card(v_ps4)" "11"
+# OBSOLETE test_print_accept "print card(v_ps5)" "1"
+# OBSOLETE test_print_accept "print card(v_ps51)" "0"
+# OBSOLETE test_print_accept "print card(v_ps6)" "101"
+# OBSOLETE
+# OBSOLETE # a failure
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print card(m_ps1)" "typename in invalid context"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_min {} {
+# OBSOLETE global passcount
+# OBSOLETE
+# OBSOLETE verbose "testing builtin MIN"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE # discrete mode names
+# OBSOLETE test_print_accept "print min(v_ps1)" "1"
+# OBSOLETE test_print_accept "print min(v_ps2)" "-100"
+# OBSOLETE test_print_accept "print min(v_ps3)" "bb"
+# OBSOLETE test_print_accept "print min(v_ps4)" "','"
+# OBSOLETE test_print_accept "print min(v_ps5)" "FALSE"
+# OBSOLETE test_print_accept "print min(v_ps6)" "-50"
+# OBSOLETE
+# OBSOLETE # a failure
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print min(v_ps51)" "MIN for empty powerset"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print min(m_ps1)" "typename in invalid context"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_max {} {
+# OBSOLETE global passcount
+# OBSOLETE
+# OBSOLETE verbose "testing builtin MIN"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE # discrete mode names
+# OBSOLETE test_print_accept "print max(v_ps1)" "7"
+# OBSOLETE test_print_accept "print max(v_ps2)" "100"
+# OBSOLETE test_print_accept "print max(v_ps3)" "ii"
+# OBSOLETE test_print_accept "print max(v_ps4)" "'z'"
+# OBSOLETE test_print_accept "print max(v_ps5)" "FALSE"
+# OBSOLETE test_print_accept "print max(v_ps6)" "50"
+# OBSOLETE
+# OBSOLETE # test an IN
+# OBSOLETE test_print_accept "print 0 in v_ps6" "TRUE"
+# OBSOLETE
+# OBSOLETE # a failure
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print max(v_ps51)" "MAX for empty powerset"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE # test builtins as described in chapter 6.20.3 Z.200
+# OBSOLETE test_card
+# OBSOLETE test_min
+# OBSOLETE test_max
+# OBSOLETE } else {
+# OBSOLETE warning "$test_name tests suppressed."
+# OBSOLETE }
-# Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "pr-4975-grt"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
- perror "Couldn't compile ${srcfile2}"
- return -1
-}
-
-set testfile "pr-4975"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- # This is needed (at least on SunOS4) to make sure the
- # the symbol table is read.
- runto "x"
- # "You loose"? Why, thank you. (But I suspect "You lose" might have
- # been what was intended).
- gdb_test "finish" "You loose.*" "Runs and reads symbols OK"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile2 "pr-4975-grt"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile2}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set testfile "pr-4975"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE # This is needed (at least on SunOS4) to make sure the
+# OBSOLETE # the symbol table is read.
+# OBSOLETE runto "x"
+# OBSOLETE # "You loose"? Why, thank you. (But I suspect "You lose" might have
+# OBSOLETE # been what was intended).
+# OBSOLETE gdb_test "finish" "You loose.*" "Runs and reads symbols OK"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE # Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "pr-5016"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE runto dump
+# OBSOLETE # Linux thinks type is "_cint" (and so does sparc-sun-sunos4, alpha-dec-osf2.0)
+# OBSOLETE #setup_xfail "i*86-pc-linux*-gnu" "sparc-sun-sunos4*" "alpha-dec-osf2*"
+# OBSOLETE gdb_test "whatis i" "type = m_index" "whatis int-range"
+# OBSOLETE gdb_test_exact "ptype m_index" "type = RANGE (1:10)" "ptype m_index"
+# OBSOLETE gdb_test_exact "whatis a" "type = /*LOC*/ vector"
+# OBSOLETE gdb_test "ptype a" "type = /\\*LOC\\*/ ARRAY \\(1:10\\) (INT|int)"
+# OBSOLETE gdb_test "step" ""
+# OBSOLETE gdb_test_exact "whatis i" "type = long" "whatis loop counter i"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-5016"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- runto dump
- # Linux thinks type is "_cint" (and so does sparc-sun-sunos4, alpha-dec-osf2.0)
- #setup_xfail "i*86-pc-linux*-gnu" "sparc-sun-sunos4*" "alpha-dec-osf2*"
- gdb_test "whatis i" "type = m_index" "whatis int-range"
- gdb_test_exact "ptype m_index" "type = RANGE (1:10)" "ptype m_index"
- gdb_test_exact "whatis a" "type = /*LOC*/ vector"
- gdb_test "ptype a" "type = /\\*LOC\\*/ ARRAY \\(1:10\\) (INT|int)"
- gdb_test "step" ""
- gdb_test_exact "whatis i" "type = long" "whatis loop counter i"
-}
-
-do_tests
-# Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-5020"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- # This is needed (at least on SunOS4) to make sure the
- # the symbol table is read.
- gdb_test "break chillvars.ch:3" ""
- gdb_test "delete 1" ""
-
- gdb_test "set width 0" ""
- gdb_test "set print sevenbit-strings" ""
- gdb_test "set print address off" ""
-
- test_pr_5020
-}
-
-proc test_pr_5020 {} {
- global gdb_prompt
- runto dummy_pr_5020
- gdb_test_exact "print y" \
- {= [('a'): [.l: 10, .b: TRUE], ('b'): [.l: 111, .b: FALSE]]}
- gdb_test_exact "print boolarr" \
- {= [(FALSE): [.l: 10, .b: TRUE], (TRUE): [.l: 111, .b: FALSE]]}
- gdb_test_exact "print intarr" \
- {= [(10): [.l: 10, .b: TRUE], (11): [.l: 111, .b: FALSE]]}
- gdb_test_exact "print setarr" \
- {= [(aa): [.l: 10, .b: TRUE], (bb): [.l: 111, .b: FALSE]]}
- gdb_test "set print pretty" ""
- gdb_test_exact "print y" \
-{= [('a'): [\r
- .l: 10, \r
- .b: TRUE\r
- ], ('b'): [\r
- .l: 111, \r
- .b: FALSE\r
- ]]} "print y pretty"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "pr-5020"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE # This is needed (at least on SunOS4) to make sure the
+# OBSOLETE # the symbol table is read.
+# OBSOLETE gdb_test "break chillvars.ch:3" ""
+# OBSOLETE gdb_test "delete 1" ""
+# OBSOLETE
+# OBSOLETE gdb_test "set width 0" ""
+# OBSOLETE gdb_test "set print sevenbit-strings" ""
+# OBSOLETE gdb_test "set print address off" ""
+# OBSOLETE
+# OBSOLETE test_pr_5020
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_pr_5020 {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE runto dummy_pr_5020
+# OBSOLETE gdb_test_exact "print y" \
+# OBSOLETE {= [('a'): [.l: 10, .b: TRUE], ('b'): [.l: 111, .b: FALSE]]}
+# OBSOLETE gdb_test_exact "print boolarr" \
+# OBSOLETE {= [(FALSE): [.l: 10, .b: TRUE], (TRUE): [.l: 111, .b: FALSE]]}
+# OBSOLETE gdb_test_exact "print intarr" \
+# OBSOLETE {= [(10): [.l: 10, .b: TRUE], (11): [.l: 111, .b: FALSE]]}
+# OBSOLETE gdb_test_exact "print setarr" \
+# OBSOLETE {= [(aa): [.l: 10, .b: TRUE], (bb): [.l: 111, .b: FALSE]]}
+# OBSOLETE gdb_test "set print pretty" ""
+# OBSOLETE gdb_test_exact "print y" \
+# OBSOLETE {= [('a'): [\r
+# OBSOLETE .l: 10, \r
+# OBSOLETE .b: TRUE\r
+# OBSOLETE ], ('b'): [\r
+# OBSOLETE .l: 111, \r
+# OBSOLETE .b: FALSE\r
+# OBSOLETE ]]} "print y pretty"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-5022"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- # This is needed (at least on SunOS4) to make sure the
- # the symbol table is read.
- gdb_test "break gdbme.ch:3" ""
- gdb_test "delete 1" ""
-
- gdb_test "set width 0" ""
- gdb_test "set print sevenbit-strings" ""
-
- test_pr_5022
-}
-
-proc test_pr_5022 {} {
- global gdb_prompt
- runto dummy_pr_5022
- gdb_test "p p" " = NULL" "print NULL pointer"
- gdb_test "continue" ""
- gdb_test "p p" {= PTR\(H'[0-9a-fA-F]+\)} "print non-NULL pointer"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "pr-5022"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE # This is needed (at least on SunOS4) to make sure the
+# OBSOLETE # the symbol table is read.
+# OBSOLETE gdb_test "break gdbme.ch:3" ""
+# OBSOLETE gdb_test "delete 1" ""
+# OBSOLETE
+# OBSOLETE gdb_test "set width 0" ""
+# OBSOLETE gdb_test "set print sevenbit-strings" ""
+# OBSOLETE
+# OBSOLETE test_pr_5022
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc test_pr_5022 {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE runto dummy_pr_5022
+# OBSOLETE gdb_test "p p" " = NULL" "print NULL pointer"
+# OBSOLETE gdb_test "continue" ""
+# OBSOLETE gdb_test "p p" {= PTR\(H'[0-9a-fA-F]+\)} "print non-NULL pointer"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "pr-5646-grt"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
- perror "Couldn't compile ${srcfile2}"
- return -1
-}
-
-set testfile "pr-5646"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- runto p
- gdb_test "next" ""
- gdb_test_exact "print xx" {= [a:b]}
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile2 "pr-5646-grt"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile2}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set testfile "pr-5646"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE runto p
+# OBSOLETE gdb_test "next" ""
+# OBSOLETE gdb_test_exact "print xx" {= [a:b]}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-5984"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- send_gdb "set language chill\n" ;
-
- gdb_test "break pr-5984.ch:6" ""
- send_gdb "run\n"; gdb_expect -re "Breakpoint .*pr-5984.ch:6"
- gdb_expect -re "$gdb_prompt $"
- gdb_test "next" "Jason Dark.*" "next over Jason Dark"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1995 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "pr-5984"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE send_gdb "set language chill\n" ;
+# OBSOLETE
+# OBSOLETE gdb_test "break pr-5984.ch:6" ""
+# OBSOLETE send_gdb "run\n"; gdb_expect -re "Breakpoint .*pr-5984.ch:6"
+# OBSOLETE gdb_expect -re "$gdb_prompt $"
+# OBSOLETE gdb_test "next" "Jason Dark.*" "next over Jason Dark"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-6292"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- send_gdb "set language chill\n" ;
-
- gdb_test "break pr-6292.ch:15" ""
- send_gdb "run\n"; gdb_expect -re "Breakpoint .*pr-6292.ch:15.*$gdb_prompt $"
- gdb_test_exact "call klaus()" {here's klaus calling.}
- gdb_test {set fred(10, i)} {a was '10'; b was '12'.}
- gdb_test "print i" { = 13} "print i after call"
-}
-
-do_tests
+# OBSOLETE # Copyright 1995 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "pr-6292"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE send_gdb "set language chill\n" ;
+# OBSOLETE
+# OBSOLETE gdb_test "break pr-6292.ch:15" ""
+# OBSOLETE send_gdb "run\n"; gdb_expect -re "Breakpoint .*pr-6292.ch:15.*$gdb_prompt $"
+# OBSOLETE gdb_test_exact "call klaus()" {here's klaus calling.}
+# OBSOLETE gdb_test {set fred(10, i)} {a was '10'; b was '12'.}
+# OBSOLETE gdb_test "print i" { = 13} "print i after call"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "pr-6632-grt"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
- perror "Couldn't compile ${srcfile2}"
- return -1
-}
-
-set testfile "pr-6632"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} ${objfile2} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- runto p
- gdb_test "whatis x" {type = m_dummy_range}
- gdb_test_exact "ptype x" {type = m_dummy (dummy_6:dummy_22)}
- gdb_test "print x" { = dummy_10}
-}
-
-do_tests
+# OBSOLETE # Copyright 1995 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile2 "pr-6632-grt"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile2}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set testfile "pr-6632"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} ${objfile2} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE runto p
+# OBSOLETE gdb_test "whatis x" {type = m_dummy_range}
+# OBSOLETE gdb_test_exact "ptype x" {type = m_dummy (dummy_6:dummy_22)}
+# OBSOLETE gdb_test "print x" { = dummy_10}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-# Note we use pr-8136.ch for pr-8134.exp as well as pr-8136.exp.
-set testfile2 "func1"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
- perror "Couldn't compile ${srcfile2}"
- return -1
-}
-
-set testfile "pr-8134"
-set srcfile ${srcdir}/$subdir/pr-8136.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- runto p1
- gdb_test "print first" "= 1"
- gdb_test "print last" "= 10"
-}
-
-do_tests
+# OBSOLETE # Copyright 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE # Note we use pr-8136.ch for pr-8134.exp as well as pr-8136.exp.
+# OBSOLETE set testfile2 "func1"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile2}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set testfile "pr-8134"
+# OBSOLETE set srcfile ${srcdir}/$subdir/pr-8136.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE runto p1
+# OBSOLETE gdb_test "print first" "= 1"
+# OBSOLETE gdb_test "print last" "= 10"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "func1"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
- perror "Couldn't compile ${srcfile2}"
- return -1
-}
-
-set testfile "pr-8136"
-set srcfile ${srcdir}/$subdir/pr-8136.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- runto p1
- gdb_test "print ps" {= \[e3, e7:e9\]}
-}
-
-do_tests
+# OBSOLETE # Copyright 1995 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile2 "func1"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile2}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set testfile "pr-8136"
+# OBSOLETE set srcfile ${srcdir}/$subdir/pr-8136.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE runto p1
+# OBSOLETE gdb_test "print ps" {= \[e3, e7:e9\]}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_load $binfile
-
- gdb_test "set language chill" ""
- gdb_test "set var \$i:=xx" ""
- gdb_test "print \$i" {= \[.c: "", .b: B'00000000', .boo: FALSE\]}
-}
-
-if [skip_chill_tests] then { continue }
-
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set testfile "pr-8405"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-if ![file exists $binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+# OBSOLETE # Copyright 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE gdb_test "set var \$i:=xx" ""
+# OBSOLETE gdb_test "print \$i" {= \[.c: "", .b: B'00000000', .boo: FALSE\]}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE # Check to see if we have an executable to test. If not, then either we
+# OBSOLETE # haven't tried to compile one, or the compilation failed for some reason.
+# OBSOLETE # In either case, just notify the user and skip the tests in this file.
+# OBSOLETE
+# OBSOLETE set testfile "pr-8405"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if ![file exists $binfile] then {
+# OBSOLETE warning "$binfile does not exist; tests suppressed." 0
+# OBSOLETE } else {
+# OBSOLETE do_tests
+# OBSOLETE }
-# Copyright 1992, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-8742"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- runto dummy
-
- # Haven't investigated why these fail on mips-sgi-irix*
- setup_xfail "m68*-*-hpux*" "mips*-sgi-irix*"
- gdb_test {call x(p [1, 3, 5])} "1 3 5 " "pass int powerset tuple"
- setup_xfail "mips*-sgi-irix*"
- gdb_test {call y(s_ps [sc])} "sc " "pass set powerset tuple"
- setup_xfail "m68*-*-hpux*" "mips*-sgi-irix*"
- gdb_test {call x([1, 3, 5])} "1 3 5 " "pass modeless int powerset tuple"
- setup_xfail "mips*-sgi-irix*"
- gdb_test {call y([sc])} "sc " "pass modeless set powerset tuple"
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "pr-8742"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE runto dummy
+# OBSOLETE
+# OBSOLETE # Haven't investigated why these fail on mips-sgi-irix*
+# OBSOLETE setup_xfail "m68*-*-hpux*" "mips*-sgi-irix*"
+# OBSOLETE gdb_test {call x(p [1, 3, 5])} "1 3 5 " "pass int powerset tuple"
+# OBSOLETE setup_xfail "mips*-sgi-irix*"
+# OBSOLETE gdb_test {call y(s_ps [sc])} "sc " "pass set powerset tuple"
+# OBSOLETE setup_xfail "m68*-*-hpux*" "mips*-sgi-irix*"
+# OBSOLETE gdb_test {call x([1, 3, 5])} "1 3 5 " "pass modeless int powerset tuple"
+# OBSOLETE setup_xfail "mips*-sgi-irix*"
+# OBSOLETE gdb_test {call y([sc])} "sc " "pass modeless set powerset tuple"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "pr-8894-grt"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
- perror "Couldn't compile ${srcfile2}"
- return -1
-}
-
-set testfile "pr-8894"
-set srcfile ${srcdir}/$subdir/$testfile.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- gdb_test "print size(m_byte)" { = 2}
- gdb_test "print size(m_struct)" { = 6}
-}
-
-do_tests
+# OBSOLETE # Copyright 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile2 "pr-8894-grt"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile2}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set testfile "pr-8894"
+# OBSOLETE set srcfile ${srcdir}/$subdir/$testfile.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE gdb_test "print size(m_byte)" { = 2}
+# OBSOLETE gdb_test "print size(m_struct)" { = 6}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_load $binfile
-
- gdb_test "set language chill" ""
- runto pr-9095.ch:12
- gdb_test {p v_arr2(5)->.p(5)} "reference value used as function" \
- "bad call using pointer"
-}
-
-if [skip_chill_tests] then { continue }
-
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set testfile "pr-9095"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-if ![file exists $binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+# OBSOLETE # Copyright 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE runto pr-9095.ch:12
+# OBSOLETE gdb_test {p v_arr2(5)->.p(5)} "reference value used as function" \
+# OBSOLETE "bad call using pointer"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE # Check to see if we have an executable to test. If not, then either we
+# OBSOLETE # haven't tried to compile one, or the compilation failed for some reason.
+# OBSOLETE # In either case, just notify the user and skip the tests in this file.
+# OBSOLETE
+# OBSOLETE set testfile "pr-9095"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if ![file exists $binfile] then {
+# OBSOLETE warning "$binfile does not exist; tests suppressed." 0
+# OBSOLETE } else {
+# OBSOLETE do_tests
+# OBSOLETE }
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-# Martin Pottendorfer (pottendo@aut.alcatel.at)
-#
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "pr-9946"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
-
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- return [gdb_test "show language" ".* source language is \"chill\".*" \
- "set language to \"chill\""]
-}
-
-set prms_id 0
-set bug_id 0
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if ![set_lang_chill] then {
- runto x_
- gdb_test "next" ""
- # check comparison of SET's
- gdb_test {print xyz=moving} { = TRUE}
- gdb_test {print xyz/=moving} { = FALSE}
- gdb_test {print xyz<moving} { = FALSE}
- gdb_test {print xyz<=moving} { = TRUE}
- gdb_test {print xyz>moving} { = FALSE}
- gdb_test {print xyz>=moving} { = TRUE}
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Fred Fish. (fnf@cygnus.com)
+# OBSOLETE # Martin Pottendorfer (pottendo@aut.alcatel.at)
+# OBSOLETE #
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "pr-9946"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE verbose "loading file '$binfile'"
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE return [gdb_test "show language" ".* source language is \"chill\".*" \
+# OBSOLETE "set language to \"chill\""]
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE if ![set_lang_chill] then {
+# OBSOLETE runto x_
+# OBSOLETE gdb_test "next" ""
+# OBSOLETE # check comparison of SET's
+# OBSOLETE gdb_test {print xyz=moving} { = TRUE}
+# OBSOLETE gdb_test {print xyz/=moving} { = FALSE}
+# OBSOLETE gdb_test {print xyz<moving} { = FALSE}
+# OBSOLETE gdb_test {print xyz<=moving} { = TRUE}
+# OBSOLETE gdb_test {print xyz>moving} { = FALSE}
+# OBSOLETE gdb_test {print xyz>=moving} { = TRUE}
+# OBSOLETE }
-# Copyright 1994, 1995 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "result"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- gdb_test "set width 0" ""
- gdb_test "set print sevenbit-strings" ""
- gdb_test "set print address off" ""
-
- # simple function
- runto simple_func
- gdb_test "step 2" ""
- gdb_test "print j" "= 5"
- gdb_test "p RESULT" "= 10"
- gdb_test "continue" ""
- gdb_test "print i" "= 7"
- gdb_test "step 4" ""
- gdb_test "set RESULT := 50" ""
- gdb_test "finish" ""
- gdb_test "step" ""
- gdb_test "print i" "= 50"
-
- # returning a structure
- runto ret_struct
- gdb_test "step 2" ""
- gdb_test "p result" {\[.l: 33, .b: FALSE\]}
- gdb_test "set var result := \[383, TRUE\]" ""
- gdb_test "finish" ""
- gdb_test "p v_struct" {\[.l: 383, .b: TRUE\]}
-}
-
-do_tests
+# OBSOLETE # Copyright 1994, 1995 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "result"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE gdb_test "set width 0" ""
+# OBSOLETE gdb_test "set print sevenbit-strings" ""
+# OBSOLETE gdb_test "set print address off" ""
+# OBSOLETE
+# OBSOLETE # simple function
+# OBSOLETE runto simple_func
+# OBSOLETE gdb_test "step 2" ""
+# OBSOLETE gdb_test "print j" "= 5"
+# OBSOLETE gdb_test "p RESULT" "= 10"
+# OBSOLETE gdb_test "continue" ""
+# OBSOLETE gdb_test "print i" "= 7"
+# OBSOLETE gdb_test "step 4" ""
+# OBSOLETE gdb_test "set RESULT := 50" ""
+# OBSOLETE gdb_test "finish" ""
+# OBSOLETE gdb_test "step" ""
+# OBSOLETE gdb_test "print i" "= 50"
+# OBSOLETE
+# OBSOLETE # returning a structure
+# OBSOLETE runto ret_struct
+# OBSOLETE gdb_test "step 2" ""
+# OBSOLETE gdb_test "p result" {\[.l: 33, .b: FALSE\]}
+# OBSOLETE gdb_test "set var result := \[383, TRUE\]" ""
+# OBSOLETE gdb_test "finish" ""
+# OBSOLETE gdb_test "p v_struct" {\[.l: 383, .b: TRUE\]}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "string"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- # These tests based on Cygnus PR chill/5696.
- runto string.ch:22
- gdb_test "p s20" { = "Moser Wilfried"} "print simple vstring"
- gdb_test "p s20(1)" { = 'o'} "print vstring element"
- gdb_test "p s20(1:3)" { = "ose"} "print vstring slice (:)"
- gdb_test "p s20(2 up 3)" { = "ser"} "print vstring slice (up)"
- gdb_test "p s10" { = "1234567890"} "print simple string"
- gdb_test "p s10(1)" { = '2'} "print string element"
- gdb_test "p s10(1:3)" { = "234"} "print string slice (:)"
- gdb_test "p s10(2 up 3)" { = "345"} "print string slice (up)"
-
- gdb_test "p length(s10)" { = 10} "print string length"
- gdb_test "p length(s20)" { = 14} "print varying string length"
- gdb_test "p lower(s10)" { = 0} "print string lower"
- gdb_test "p upper(s10)" { = 9} "print string upper"
- gdb_test "p lower(s20)" { = 0} "print varying string lower"
- gdb_test "p upper(s20)" { = 19} "print varying string upper"
-
- # These tests are based on Cygnus PR chill/9078.
- gdb_test "print foo // bar" { = "Moser Wilfried"}
- gdb_test "print foo // bar1" { = "Moser abcde"}
- gdb_test "print foo1 // bar1" { = "12345abcde"}
-}
-
-do_tests
+# OBSOLETE # Copyright 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "string"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE # These tests based on Cygnus PR chill/5696.
+# OBSOLETE runto string.ch:22
+# OBSOLETE gdb_test "p s20" { = "Moser Wilfried"} "print simple vstring"
+# OBSOLETE gdb_test "p s20(1)" { = 'o'} "print vstring element"
+# OBSOLETE gdb_test "p s20(1:3)" { = "ose"} "print vstring slice (:)"
+# OBSOLETE gdb_test "p s20(2 up 3)" { = "ser"} "print vstring slice (up)"
+# OBSOLETE gdb_test "p s10" { = "1234567890"} "print simple string"
+# OBSOLETE gdb_test "p s10(1)" { = '2'} "print string element"
+# OBSOLETE gdb_test "p s10(1:3)" { = "234"} "print string slice (:)"
+# OBSOLETE gdb_test "p s10(2 up 3)" { = "345"} "print string slice (up)"
+# OBSOLETE
+# OBSOLETE gdb_test "p length(s10)" { = 10} "print string length"
+# OBSOLETE gdb_test "p length(s20)" { = 14} "print varying string length"
+# OBSOLETE gdb_test "p lower(s10)" { = 0} "print string lower"
+# OBSOLETE gdb_test "p upper(s10)" { = 9} "print string upper"
+# OBSOLETE gdb_test "p lower(s20)" { = 0} "print varying string lower"
+# OBSOLETE gdb_test "p upper(s20)" { = 19} "print varying string upper"
+# OBSOLETE
+# OBSOLETE # These tests are based on Cygnus PR chill/9078.
+# OBSOLETE gdb_test "print foo // bar" { = "Moser Wilfried"}
+# OBSOLETE gdb_test "print foo // bar1" { = "Moser abcde"}
+# OBSOLETE gdb_test "print foo1 // bar1" { = "12345abcde"}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file tests various Chill values, expressions, and types.
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "tests1"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- send_gdb "show language\n"
- gdb_expect {
- -re ".* source language is \"chill\".*$gdb_prompt $" {
- pass "set language to \"chill\""
- send_gdb "break dummyfunc\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {
- send_gdb "run\n"
- gdb_expect -re ".*$gdb_prompt $" {}
- return 1
- }
- timeout {
- fail "can't set breakpoint (timeout)"
- return 0
- }
- }
- }
- -re ".*$gdb_prompt $" {
- fail "setting language to \"chill\""
- return 0
- }
- timeout {
- fail "can't show language (timeout)"
- return 0
- }
- }
-}
-
-# Testing printing of a specific value. Increment passcount for
-# success or issue fail message for failure. In both cases, return
-# a 1 to indicate that more tests can proceed. However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-#
-# Args are:
-#
-# First one is string to send_gdb to gdb
-# Second one is string to match gdb result to
-# Third one is an optional message to be printed
-
-proc test_print_accept { args } {
- global gdb_prompt
- global passcount
- global verbose
-
- if [llength $args]==3 then {
- set message [lindex $args 2]
- } else {
- set message [lindex $args 0]
- }
- set sendthis [lindex $args 0]
- set expectthis [lindex $args 1]
- set result [gdb_test $sendthis ".* = ${expectthis}" $message]
- if $result==0 {incr passcount}
- return $result
-}
-
-# Testing printing of a specific value. Increment passcount for
-# success or issue fail message for failure. In both cases, return
-# a 1 to indicate that more tests can proceed. However a timeout
-# is a serious error, generates a special fail message, and causes
-# a 0 to be returned to indicate that more tests are likely to fail
-# as well.
-
-# various tests if modes are treated correctly
-# using ptype
-proc test_modes {} {
- global passcount
-
- verbose "testing chill modes"
- set passcount 0
-
- # discrete modes
- test_print_accept "ptype BYTE" "byte"
- test_print_accept "ptype UBYTE" "ubyte"
- test_print_accept "ptype INT" "int"
- test_print_accept "ptype UINT" "uint"
- test_print_accept "ptype LONG" "long"
- test_print_accept "ptype ULONG" "ulong"
- test_print_accept "ptype BOOL" "bool"
- test_print_accept "ptype CHAR" "char"
-
- test_print_accept "ptype set1" "SET \[(\]aaa, bbb, ccc\[)\]" \
- "print unnumbered set mode"
- test_print_accept "ptype nset1" "SET \[(\]na = 1, nb = 34, nc = 20\[)\]" \
- "print numbered set mode"
-
- # mp:
- # display maybe in hex values ?
- #
- test_print_accept "ptype r11" "ubyte \\(0:255\\)" \
- "print ubyte range mode"
- test_print_accept "ptype r12" "uint \\(0:65535\\)" \
- "print uint range mode"
-# test_print_accept "ptype r13" "ulong \\(0:4294967295\\)" \
-# "print ulong range mode"
- test_print_accept "ptype r14" "byte \\(-128:127\\)" \
- "print byte range mode"
- test_print_accept "ptype r15" "int \\(-32768:32767\\)" \
- "print int range mode"
- test_print_accept "ptype r16" "long \\(-2147483648:2147483647\\)" \
- "print long range mode"
-
- test_print_accept "ptype r2" "set1 \\(bbb:ccc\\)" \
- "print unnumbered set range mode"
- test_print_accept "ptype r3" "nset1 \\(na:na\\)" \
- "print numbered set range mode"
- # really this order ?
- # I'm not sure what should happen for the next two tests.
- setup_xfail "*-*-*"
- test_print_accept "ptype r4" "nset1 \\(nb = 34:nc = 20\\)" \
- "print numbered set range mode"
- setup_xfail "*-*-*"
- test_print_accept "ptype r5" "nset1 \\(na = 1, nb = 34, nc = 20\\)" \
- "print numbered set range mode"
-
- # powerset modes
- test_print_accept "ptype pm1" \
- "POWERSET SET \[(\]p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\[)\]" \
- "print powerset mode 1"
- test_print_accept "ptype pm2" "POWERSET byte \\(1:8\\)" \
- "print powerset mode 2"
- test_print_accept "ptype pm3" "POWERSET int \\(-32768:32767\\)" \
- "print powerset mode 3"
- test_print_accept "ptype pm4" "POWERSET long \\(-32768:32768\\)" \
- "print powerset mode 4"
- test_print_accept "ptype pm5" \
- "POWERSET long \\(-2147483648:2147483647\\)" \
- "print powerset mode 5"
-
- # reference modes
- test_print_accept "ptype ref1" "REF pm1" \
- "print reference to powerset mode"
- test_print_accept "ptype ref2" "REF byte" \
- "print reference to byte"
- test_print_accept "ptype ref3" "PTR" \
- "print free reference type"
-
- # procedure modes
- # FIXME: we have to talk about this ...
- test_print_accept "ptype prm1" \
- "REF PROC \[(\]\[)\]" \
- "print procedure mode 1"
- setup_xfail "*-*-*"
- test_print_accept "ptype prm2" \
- "REF PROC \[(\]bool in, int out long inout\[)\] RETURNS \[(\]char\[)\]" \
- "print procedure mode 2"
- setup_xfail "*-*-*"
- test_print_accept "ptype prm3" \
- "REF PROC \[(\]pm1, ref loc\[)\] RETURNS \[(\]ref3\[)\]" \
- "print procedure mode 3"
- setup_xfail "*-*-*"
- test_print_accept "ptype prm4" \
- "\[(\] \[)\] EXCEPTIONS \[(\]ex1, ex2, ex3\[)\]" \
- "print procedure mode 4"
- setup_xfail "*-*-*"
- test_print_accept "ptype prm5" \
- "REF PROC \[(\]r11, r16 inout, r5 out\[)\] RETURNS \[(\]r2\[)\] EXCEPTIONS \[(\]ex1\[)\]" \
- "print procedure mode 5"
-
- # synchronization modes
- # FIXME: since gdb doesn't process events & buffers so far, this has be
- # filled later...
- xfail "synchronization mode handling"
-
- # timing modes
- test_print_accept "ptype DURATION" "duration"
- test_print_accept "ptype TIME" "time"
-
- # string modes
- # some tests are done in chillvars.exp
- test_print_accept "ptype strm1" "CHARS \\(5\\)" "print char string mode"
- test_print_accept "ptype strm2" "CHARS \[(\]7\[)\] VARYING" \
- "print varying char string mode"
- test_print_accept "ptype bstr1" "BOOLS \\(20\\)" "print bit string mode"
-
- test_print_accept "ptype B'000'" "BOOLS \\(3\\)" "bit string literal"
- test_print_accept "ptype B'11110000'" "BOOLS \\(8\\)" "bit string literal"
- # FIXME: adjust error message
- gdb_test "ptype B'00110211'" {.*Too-large digit.*[.]} \
- "reject invalid bitstring"
-
- # array modes
- # some tests are done in chillvars.exp
- test_print_accept "ptype arr1m" "ARRAY \\(1:100\\) set1" \
- "print array mode 1"
- test_print_accept "ptype arr2m" "ARRAY \\(1:100\\) ARRAY \\(1:100\\) set1"\
- "print array mode 2"
- test_print_accept "ptype arr3m" "ARRAY \\(0:255\\) ARRAY \\(0:65535\\) ARRAY \\(-128:127\\) set1" \
- "print array mode 3"
- setup_xfail "*-*-*"
- test_print_accept "ptype arr4m" "ARRAY \\(b:c\\) ARRAY \\(na = 1:na = 1\\) ARRAY \\(nc:nb\\) ARRAY \\(na = 1:nc = 20\\) POWERSET SET \[(\]p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\[)\]" \
- "print array mode 4"
-
- # structure modes
- # some checks are in chillvars.exp
- # setup_xfail "*-*-*"
- test_print_accept "ptype stru1m" "STRUCT \\(.*a long,.*b long,.*CASE OF.*:.*ch1 CHARS \\(20\\).*:.*ch2 CHARS \\(10\\).*ELSE.*ch3 CHARS \\(1\\).*ESAC.*\\)" \
- "print structure mode 1"
- #setup_xfail "*-*-*"
- test_print_accept "ptype stru2m" "STRUCT \\(.*f set1,.*CASE OF.*:.*ch1 CHARS \\(20\\).*:.*ch2 CHARS \\(10\\) VARYING.*ELSE.*ch3 CHARS \\(0\\) VARYING.*ESAC.*\\)" \
- "print structure mode 2"
- #setup_xfail "*-*-*"
- test_print_accept "ptype stru3m" "STRUCT \\(.*f r3,.*CASE OF.*:.*ch1 CHARS \\(20\\).*ESAC.*\\)" \
- "print structure mode 3"
- # setup_xfail "*-*-*"
- test_print_accept "ptype stru4m" "STRUCT \\(.*i long,.*CASE OF.*:.*i1 int,.*i11 int,.*b1 bool,.*c1 char.*:.*i2 long,.*i22 long,.*bs2 BOOLS \\(10\\).*:.*s3 STRUCT \\(.*i3 int,.*CASE OF.*:.*foo long.*ELSE.*bar char.*ESAC.*\\).*ELSE.*x stru2m.*ESAC,.*y stru3m.*\\)" \
- "print structure mode 4"
-
-
- if $passcount then {
- pass "$passcount correct modes printed"
- }
-}
-
-# various tests if locations are treated correctly
-# read access using ptype, print, whatis
-proc test_locations {} {
- global passcount
-
- set passcount 0
- verbose "testing read access to locations"
- # various location tests can be found in chillvars.exp
-
- # set locations
- test_print_accept "ptype s1l" "SET \\(aaa, bbb, ccc\\)" \
- "print mode of set location"
- test_print_accept "whatis s1l" "set1" \
- "print modename of set location"
- test_print_accept "print s1l" "ccc" "print set location"
- test_print_accept "ptype s2l" "SET \\(na = 1, nb = 34, nc = 20\\)" \
- "print mode of numbered set location"
- test_print_accept "whatis s2l" "nset1" \
- "print mode name of numbered set location"
- test_print_accept "print s2l" "nb" "print numberes set location"
-
- # range modes
- test_print_accept "ptype rl1" "ubyte \\(0:255\\)" \
- "print mode of range location"
- test_print_accept "whatis rl1" "r11" \
- "print mode name of range location"
- test_print_accept "print rl1" "3" \
- "print range location"
-
- test_print_accept "ptype rl2" "ubyte \\(0:255\\)" \
- "print mode of range location"
- test_print_accept "whatis rl2" "r11" \
- "print mode name of range location"
- test_print_accept "print rl2" "0" \
- "print range location"
-
- test_print_accept "ptype rl3" "ubyte \\(0:255\\)" \
- "print mode of range location"
- test_print_accept "whatis rl3" "r11" \
- "print mode name of range location"
- test_print_accept "print rl3" "255" \
- "print range location"
-
- test_print_accept "ptype rl5" "uint \\(0:65535\\)" \
- "print mode of range location"
- test_print_accept "whatis rl5" "r12" \
- "print mode name of range location"
- test_print_accept "print rl5" "65530" \
- "print range location"
-
- test_print_accept "ptype rl6" "uint \\(0:65535\\)" \
- "print mode of range location"
- test_print_accept "whatis rl6" "r12" \
- "print mode name of range location"
- test_print_accept "print rl6" "0" \
- "print range location"
-
- test_print_accept "ptype rl7" "uint \\(0:65535\\)" \
- "print mode of range location"
- test_print_accept "whatis rl7" "r12" \
- "print mode name of range location"
- test_print_accept "print rl7" "65535" \
- "print range location"
-
-# test_print_accept "ptype rl9" "ulong \\(0:4294967295\\)" \
-# "print mode of range location"
-# test_print_accept "whatis rl9" "r13" \
-# "print mode name of range location"
-# test_print_accept "print rl9" "128" \
-# "print range location"
-
-# test_print_accept "ptype rl10" "ulong \\(0:4294967295\\)" \
-# "print mode of range location"
-# test_print_accept "whatis rl10" "r13" \
-# "print mode name of range location"
-# test_print_accept "print rl10" "0" \
-# "print range location"
-
-# test_print_accept "ptype rl11" "ulong \\(0:4294967295\\)" \
-# "print mode of range location"
-# test_print_accept "whatis rl11" "r13" \
-# "print mode name of range location"
-# test_print_accept "print rl11" "4294967295" \
-# "print range location"
-
- test_print_accept "ptype rl13" "byte \\(-128:127\\)" \
- "print mode of range location"
- test_print_accept "whatis rl13" "r14" \
- "print mode name of range location"
- test_print_accept "print rl13" "-121" \
- "print range location"
-
- test_print_accept "ptype rl14" "byte \\(-128:127\\)" \
- "print mode of range location"
- test_print_accept "whatis rl14" "r14" \
- "print mode name of range location"
- test_print_accept "print rl14" "-128" \
- "print range location"
-
- test_print_accept "ptype rl15" "byte \\(-128:127\\)" \
- "print mode of range location"
- test_print_accept "whatis rl15" "r14" \
- "print mode name of range location"
- test_print_accept "print rl15" "127" \
- "print range location"
-
- test_print_accept "ptype rl17" "int \\(-32768:32767\\)" \
- "print mode of range location"
- test_print_accept "whatis rl17" "r15" \
- "print mode name of range location"
- test_print_accept "print rl17" "-32720" \
- "print range location"
-
- test_print_accept "ptype rl18" "int \\(-32768:32767\\)" \
- "print mode of range location"
- test_print_accept "whatis rl18" "r15" \
- "print mode name of range location"
- test_print_accept "print rl18" "-32768" \
- "print range location"
-
- test_print_accept "ptype rl19" "int \\(-32768:32767\\)" \
- "print mode of range location"
- test_print_accept "whatis rl19" "r15" \
- "print mode name of range location"
- test_print_accept "print rl19" "32767" \
- "print range location"
-
- test_print_accept "ptype rl21" "long \\(-2147483648:2147483647\\)" \
- "print mode of range location"
- test_print_accept "whatis rl21" "r16" \
- "print mode name of range location"
- test_print_accept "print rl21" "2147483643" \
- "print range location"
-
- test_print_accept "ptype rl22" "long \\(-2147483648:2147483647\\)" \
- "print mode of range location"
- test_print_accept "whatis rl22" "r16" \
- "print mode name of range location"
- test_print_accept "print rl22" "-2147483648" \
- "print range location"
-
- test_print_accept "ptype rl23" "long \\(-2147483648:2147483647\\)" \
- "print mode of range location"
- test_print_accept "whatis rl23" "r16" \
- "print mode name of range location"
- test_print_accept "print rl23" "2147483647" \
- "print range location"
-
- # powerset locations
- test_print_accept "ptype pl1" \
- "POWERSET SET \\(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\\)" \
- "print mode of powerset location 1"
- test_print_accept "whatis pl1" "pm1" \
- "print mode mode name of powerset location"
- test_print_accept "print pl1" \
- "\[\[\]p1:p10\[\]\]" \
- "print powerset location 1"
- test_print_accept "print pl2" {\[\]} \
- "print powerset location 2"
- test_print_accept "print pl3" "\[\[\]p1, p10\[\]\]" \
- "print powerset location 3"
- test_print_accept "print pl4" {\[p1:p2, p4:p6, p8:p10\]} \
- "print powerset location 4"
- test_print_accept "print pl5" {\[p1:p4, p6, p8:p10\]} \
- "print powerset location 5"
- test_print_accept "print pl6" {\[p1, p3:p8, p10\]} \
- "print powerset location 6"
-
- test_print_accept "ptype pl7" \
- "POWERSET byte \\(1:8\\)" \
- "print mode of byte powerset location"
- test_print_accept "whatis pl7" "pm2" \
- "print modename of byte powerset location"
- test_print_accept "print pl7" {\[1:8\]} \
- "print powerset location 7"
-
- test_print_accept "ptype pl8" \
- "POWERSET int \\(-32768:32767\\)" \
- "print mode of int powerset location"
- test_print_accept "whatis pl8" "pm3" \
- "print modename of int powerset location"
- test_print_accept "print pl8" {\[-32768:32767\]} \
- "print powerset location 8"
-
-# test_print_accept "ptype pl9" \
-# "POWERSET long \\(-2147483648:2147483647\\)" \
-# "print mode of long powerset location"
-# test_print_accept "whatis pl9" "pm5" \
-# "print modename of long powerset location"
-# test_print_accept "print pl9" {\[-2147483648:2147483647\]} \
-# "print powerset location 9"
-
- # reference modes
- test_print_accept "ptype ref3l" "PTR" "print mode of reference location"
- # setup_xfail "*-*-*"
- test_print_accept "whatis ref3l" "ref3" \
- "print modename of reference location"
- # setup_xfail "*-*-*"
- test_print_accept "print ref3l" "ref3\\(H'.*\\)" \
- "print reference location"
- test_print_accept "ptype ref4l" "PTR" "print mode of reference location"
- # setup_xfail "*-*-*"
- test_print_accept "whatis ref4l" "ref4" \
- "print modename of reference location"
- # setup_xfail "*-*-*"
- test_print_accept "print ref4l" "ref4\\(H'.*\\)" \
- "print reference location"
- test_print_accept "ptype ref5l" "PTR" "print mode of reference location"
- test_print_accept "whatis ref5l" "PTR" \
- "print modename of reference location"
- test_print_accept "print ref5l" "PTR\\(H'.*\\)" \
- "print reference location"
-
- # dereference a little bit..
- test_print_accept "print ref6l->syn_int" "42" \
- "dereference reference to synmode location"
- test_print_accept "print ref7l->int" "-42" \
- "dereference reference to predefined mode location"
- test_print_accept "print ref8l->pm1" \
- "\[\[\]p1:p10\[\]\]" \
- "dereference reference to newmode location"
-
- # synchronization mode locations
- # FIXME: synchronization modes are not supported so far...
- xfail "no synchronization mode location support, not implemented yet"
-
- # timing mode locations
- # FIXME: callbacks to abstime, inttime not implemented
- xfail "timing modes not implemented properly yet"
-
- # char string locations
- # some tests are don in chillvars.exp
- test_print_accept "ptype strl1" \
- "CHARS \\(7\\) VARYING" \
- "print varying string location"
- test_print_accept "whatis strl1" "strm2" \
- "print string locationa mode name"
- test_print_accept "print strl1" \
- {\"hansi\^\(0\)\"} \
- "print string location"
- # string elements
- test_print_accept "print strl1(0)" "\'h\'" \
- "print string element 1"
- test_print_accept "print strl1(5)" {'\^[(]0[)]'} \
- "print string element 2"
- test_print_accept "print strl1(3)" "\'s\'" \
- "print string element 3"
- test_print_accept "ptype strl1(0)" "char" \
- "print mode of string element"
- # slices
- test_print_accept "print strl1(3:4)" "\"si\"" \
- "print string slice 1"
- test_print_accept "print strl1(0:5)" \
- {\"hansi\^\(0\)\"} \
- "print string slice 2"
- test_print_accept "print strl1(0:0)" "\"h\"" \
- "print string slice 3"
- test_print_accept "print strl1(0 up 6)" \
- {\"hansi\^\(0\)\"} \
- "print string slice 4"
- # FIXME: adjust error message, when implented
- gdb_test "print strl1(6 up 1)" \
- ".*slice.*out of range.*" \
- "print invalid string slice length"
- gdb_test "print strl1(-1 up 5)" \
- ".*slice.*out of range.*" \
- "print invalid string slice length"
- gdb_test "print strl1(-1:5)" \
- ".*slice.*out of range.*" \
- "print invalid string slice"
- gdb_test "print strl1(-1:7)" \
- ".*slice.*out of range.*" \
- "print invalid string slice"
- gdb_test "print strl1(0 up -1)" \
- ".*slice.*out of range.*" \
- "print invalid string slice length"
- gdb_test "print strl1(0 up 0)" {""}
-
- # bitstring locations
- test_print_accept "ptype bstr1" \
- "BOOLS \\(20\\)" \
- "print mode of bitstring location"
- test_print_accept "whatis bstrl1" "bstr1" \
- "print mode name of bitstring location"
- test_print_accept "print bstrl1" \
- "B'10101010101010101010'" \
- "print bitstring location"
-
- test_print_accept "ptype bstrl1(0)" "bool|BOOL" \
- "print mode of bitstring element"
- test_print_accept "print bstrl1(0)" "TRUE" \
- "print bitstring element 1"
- test_print_accept "print bstrl1(19)" "FALSE" \
- "print bitstring element 2"
- test_print_accept "print bstrl1(10)" "TRUE" \
- "print bitstring element 3"
-
- test_print_accept "print bstrl1(0:19)" \
- "B'10101010101010101010'" \
- "print bitstring location slice 1"
- test_print_accept "print bstrl1(0:0)" \
- "B'1'" \
- "print bitstring location slice 2"
- test_print_accept "print bstrl1(3:9)" \
- "B'0101010'" \
- "print bitstring location slice 3"
- test_print_accept "print bstrl1(0 up 20)" \
- "B'10101010101010101010'" \
- "print bitstring location slice 4"
- test_print_accept "print bstrl1(19 up 1)" \
- "B'0'" \
- "print bitstring location slice 5"
- gdb_test "print bstrl1(20 up 1)" \
- ".*slice out of range.*" \
- "print invalid bitstring slice (20 up 1)"
- gdb_test "print bstrl1(-4:5)" \
- ".*slice out of range.*" \
- "print invalid bitstring slice (-4:5)"
- gdb_test "print bstrl1(-1:up 1)" \
- ".*invalid expression syntax.*" \
- "print invalid bitstring slice (-1:ip 1)"
- gdb_test "print bstrl1(-1:20)" \
- ".*slice out of range.*" \
- "print invalid bitstring slice (-1:20)"
- gdb_test "print bstrl1(0 up -1)" \
- ".*slice out of range.*" \
- "print invalid bitstring slice (0 up -1)"
- test_print_accept "print bstrl1(4 up 0)" "B''"
-
- # array mode locations
- gdb_test_exact "ptype arrl1" \
- "ARRAY (1:100) set1" \
- "print mode of array location"
- gdb_test "whatis arrl1" "arr1m" \
- "print mode name of array location"
- gdb_test_exact "print arrl1" {[(1:100): aaa]} \
- "print array location"
- test_print_accept "ptype arrl1(1)" \
- "SET \\(aaa, bbb, ccc\\)" \
- "print mode of array element"
- gdb_test_exact "print arrl3" \
- {[(1:5): [(1:3): [(1:2): -2147483648]]]} \
- "print array location 2"
- gdb_test_exact "print arrl3(1)" \
- {[(1:3): [(1:2): -2147483648]]} \
- "print array location 3"
- gdb_test_exact "ptype arrl3(1)" \
- {ARRAY (1:3) ARRAY (1:2) long} \
- "print mode of array element"
- test_print_accept "print arrl3(5)" \
- {\[\(1:3\): \[\(1:2\): -2147483648\]\]} \
- "print array location 4"
- test_print_accept "print arrl3(1,1)" \
- {\[\(1:2\): -2147483648\]} \
- "print array location 5"
- test_print_accept "ptype arrl3(1,1)" \
- {ARRAY \(1:2\) long} \
- "print mode of array element"
- test_print_accept "print arrl3(5,3)" \
- {\[\(1:2\): -2147483648\]} \
- "print array location 6"
- test_print_accept "print arrl3(1,1,1)" \
- "-2147483648" \
- "print array location 7"
- test_print_accept "print arrl3(5,3,2)" \
- "-2147483648" \
- "print array location 8"
- test_print_accept "print arrl3(1)(3)(2)" \
- "-2147483648" \
- "print array location 9"
-
- # reject the following range fails
- # FIXME: adjust error messages
- gdb_test "print arrl3(-1)" \
- ".*out of range.*" \
- "check invalid array indices 1"
- gdb_test "print arrl3(6)" \
- ".*out of range.*" \
- "check invalid array indices 2"
- gdb_test "print arrl3(0,0)" \
- ".*out of range.*" \
- "check invalid array indices 3"
- gdb_test "print arrl3(1,0)" \
- ".*out of range.*" \
- "check invalid array indices 4"
- gdb_test "print arrl3(1,4)" \
- ".*out of range.*" \
- "check invalid array indices 5"
- gdb_test "print arrl3(6,4)" \
- ".*out of range.*" \
- "check invalid array indices 6"
- gdb_test "print arrl3(1,1,0)" \
- ".*out of range.*" \
- "check invalid array indices 7"
- gdb_test "print arrl3(6,4,0)" \
- ".*out of range.*" \
- "check invalid array indices 8"
- gdb_test "print arrl3(1,1,3)" \
- ".*out of range.*" \
- "check invalid array indices 9"
-
- gdb_test "print arrl3(0)(0)" \
- ".* array or string index out of range.*" \
- "check invalid array indices 10"
- gdb_test "print arrl3(1)(0)" \
- ".* array or string index out of range.*" \
- "check invalid array indices 11"
- gdb_test "print arrl3(1)(4)" \
- ".* array or string index out of range.*" \
- "check invalid array indices 12"
- gdb_test "print arrl3(6)(4)" \
- ".* array or string index out of range.*" \
- "check invalid array indices 13"
- gdb_test "print arrl3(1)(1)(0)" \
- ".* array or string index out of range.*" \
- "check invalid array indices 14"
- gdb_test "print arrl3(6)(4)(0)" \
- ".* array or string index out of range.*" \
- "check invalid array indices 15"
- gdb_test "print arrl3(1)(1)(3)" \
- ".* array or string index out of range.*" \
- "check invalid array indices 16"
-
- # slices
- test_print_accept "print arrl4(1:3)" \
- {\[\(1:2\): \[\(1:3\): \[\(1:2\): -2147483648\]\], \(3\): \[\(1:3\): \[\(1:2\): 100\]\]\]} \
- "print array slice 1"
- test_print_accept "ptype arrl4(1:3)" \
- {ARRAY \(1:3\) ARRAY \(1:3\) ARRAY \(1:2\) long} \
- "print mode of array slice"
-# The next one is bogus:
-# test_print_accept "print arrl4(5, 2:3, 1)" \
-# # FIXME: maybe the '(1): ' in the inner tupel should be omitted ? \
-# {\[(2): \[\(1\): 100\], \(3\):\[\(1\): 100\]\]} \
-# "print array slice 2"
- test_print_accept "print arrl4(1 up 4)" \
- {\[\(1:2\): \[\(1:3\): \[\(1:2\): -2147483648\]\], \(3\): \[\(1:3\): \[\(1:2\): 100\]\], \(4\): \[\(1:3\): \[\(1:2\): -2147483648\]\]\]} \
- "print array slice 3"
-# The next two are bogus:
-# test_print_accept "print arrl4(3, 2 up 1)" \
-# {\[\(2:3\): \[\(1:2\): 100\]\]} \
-# "print array slice 4"
-# test_print_accept "print arrl4(1:2, 1 up 1, 2)" \
-# {\[\(1\): \[\(1\): \[\(2\): -2147483648\], \(2\): \[\(2\): -2147483648\]\], \(2\): \[\(1\): \[\(2\): -2147483648\], \(2\): \[\(2\): -2147483648\]\]\]} \
-# "print array slice 4"
- # reject invalid slices
- # FIXME: adjust error messages
- gdb_test "print arrl4(5:6)" \
- ".*slice out of range.*" \
- "check invalid range 1"
- gdb_test "print arrl4(0:1)" \
- ".*slice out of range.*" \
- "check invalid range 2"
- gdb_test "print arrl4(0:6)" \
- ".*slice out of range.*" \
- "check invalid range 3"
- gdb_test "print arrl4(3:2)" \
- ".*slice out of range.*" \
- "check invalid range 4"
- gdb_test "print arrl4(1,3:4)" \
- ".*syntax error.*" \
- "check invalid range 5"
- gdb_test "print arrl4(1,0:1)" \
- ".*syntax error.*" \
- "check invalid range 6"
- gdb_test "print arrl4(1,0:4)" \
- ".*syntax error.*" \
- "check invalid range 7"
- gdb_test "print arrl4(1,3:2)" \
- ".*syntax error.*" \
- "check invalid range 8"
- gdb_test "print arrl4(5 up 2)" \
- ".*slice out of range.*" \
- "check invalid range 9"
- gdb_test "print arrl4(-1 up 1)" \
- ".*slice out of range.*" \
- "check invalid range 10"
- gdb_test "print arrl4(-1 up 7)" \
- ".*slice out of range.*" \
- "check invalid range 11"
- gdb_test "print arrl4(1 up 0)" \
- ".*slice out of range.*" \
- "check invalid range 12"
- gdb_test "print arrl4(1,3 up 1)" \
- ".*syntax error.*" \
- "check invalid range 13"
- gdb_test "print arrl4(1,-1 up 1)" \
- ".*syntax error.*" \
- "check invalid range 14"
- gdb_test "print arrl4(1,-1 up 5)" \
- ".*syntax error.*" \
- "check invalid range 15"
- gdb_test "print arrl4(1,2 up 0)" \
- ".*syntax error.*" \
- "check invalid range 16"
-
- # structure modes
- # some tests are in chillvars.exp
- # FIXME: no tag processing implemented do maybe adjust these tests
- setup_xfail "*-*-*"
- test_print_accept "ptype stru1m" \
- "STRUCT \\(.*a long,.*b long,.*CASE b OF.*\\(42\\):.*ch1 CHARS\\(20\\),.*\\(52\\):.*ch2 CHARS\\(10\\).*ELSE.*ch3 CHARS\\(1\\).*ESAC.*\\)" \
- "print mode of structure location 1"
- test_print_accept "whatis strul1" "stru1m" \
- "print mode name of structure location 1"
- setup_xfail "*-*-*"
- test_print_accept "print strul1" \
- {\[\.a: -2147483648, \.b: 42, \.\(b\): \{\(42\) = \[\.ch1: \"12345678900987654321\"\], \(52\) = \[\.ch2: \"1234567890\"\], (else) = \[\.ch3: \"1\"\]\}\]} \
- "print structure location 1"
- test_print_accept "print strul1.a" \
- "-2147483648" \
- "print field of structure location 1"
- test_print_accept "print strul1.b" "42" \
- "print field of structure location 1"
- test_print_accept "print strul1.ch1" \
- "\"12345678900987654321\"" \
- "print field of structure location 1"
- # setup_xfail "*-*-*"
- test_print_accept "print strul1.ch2" \
- "\"1234567890\"" \
- "print field of structure location 1"
- # setup_xfail "*-*-*"
- test_print_accept "print strul1.ch3" \
- "\"1\"" \
- "print field of structure location 1"
-
- if $passcount then {
- pass "$passcount correct locations printed"
- }
-}
-
-# This is chill/9434
-
-proc test_9434 {} {
- global passcount
-
- verbose "testing pr-9434"
-
- test_print_accept "ptype m_xyzmode" "STRUCT \\(.*next REF m_xyzmode,.*i long.*\\)"
-}
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if [set_lang_chill] then {
- test_modes
- test_locations
- test_9434
-} else {
- warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file tests various Chill values, expressions, and types.
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "tests1"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE verbose "loading file '$binfile'"
+# OBSOLETE gdb_load $binfile
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE send_gdb "show language\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE pass "set language to \"chill\""
+# OBSOLETE send_gdb "break dummyfunc\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE send_gdb "run\n"
+# OBSOLETE gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE return 1
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't set breakpoint (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE fail "setting language to \"chill\""
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't show language (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Testing printing of a specific value. Increment passcount for
+# OBSOLETE # success or issue fail message for failure. In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed. However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE #
+# OBSOLETE # Args are:
+# OBSOLETE #
+# OBSOLETE # First one is string to send_gdb to gdb
+# OBSOLETE # Second one is string to match gdb result to
+# OBSOLETE # Third one is an optional message to be printed
+# OBSOLETE
+# OBSOLETE proc test_print_accept { args } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global passcount
+# OBSOLETE global verbose
+# OBSOLETE
+# OBSOLETE if [llength $args]==3 then {
+# OBSOLETE set message [lindex $args 2]
+# OBSOLETE } else {
+# OBSOLETE set message [lindex $args 0]
+# OBSOLETE }
+# OBSOLETE set sendthis [lindex $args 0]
+# OBSOLETE set expectthis [lindex $args 1]
+# OBSOLETE set result [gdb_test $sendthis ".* = ${expectthis}" $message]
+# OBSOLETE if $result==0 {incr passcount}
+# OBSOLETE return $result
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Testing printing of a specific value. Increment passcount for
+# OBSOLETE # success or issue fail message for failure. In both cases, return
+# OBSOLETE # a 1 to indicate that more tests can proceed. However a timeout
+# OBSOLETE # is a serious error, generates a special fail message, and causes
+# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
+# OBSOLETE # as well.
+# OBSOLETE
+# OBSOLETE # various tests if modes are treated correctly
+# OBSOLETE # using ptype
+# OBSOLETE proc test_modes {} {
+# OBSOLETE global passcount
+# OBSOLETE
+# OBSOLETE verbose "testing chill modes"
+# OBSOLETE set passcount 0
+# OBSOLETE
+# OBSOLETE # discrete modes
+# OBSOLETE test_print_accept "ptype BYTE" "byte"
+# OBSOLETE test_print_accept "ptype UBYTE" "ubyte"
+# OBSOLETE test_print_accept "ptype INT" "int"
+# OBSOLETE test_print_accept "ptype UINT" "uint"
+# OBSOLETE test_print_accept "ptype LONG" "long"
+# OBSOLETE test_print_accept "ptype ULONG" "ulong"
+# OBSOLETE test_print_accept "ptype BOOL" "bool"
+# OBSOLETE test_print_accept "ptype CHAR" "char"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype set1" "SET \[(\]aaa, bbb, ccc\[)\]" \
+# OBSOLETE "print unnumbered set mode"
+# OBSOLETE test_print_accept "ptype nset1" "SET \[(\]na = 1, nb = 34, nc = 20\[)\]" \
+# OBSOLETE "print numbered set mode"
+# OBSOLETE
+# OBSOLETE # mp:
+# OBSOLETE # display maybe in hex values ?
+# OBSOLETE #
+# OBSOLETE test_print_accept "ptype r11" "ubyte \\(0:255\\)" \
+# OBSOLETE "print ubyte range mode"
+# OBSOLETE test_print_accept "ptype r12" "uint \\(0:65535\\)" \
+# OBSOLETE "print uint range mode"
+# OBSOLETE # test_print_accept "ptype r13" "ulong \\(0:4294967295\\)" \
+# OBSOLETE # "print ulong range mode"
+# OBSOLETE test_print_accept "ptype r14" "byte \\(-128:127\\)" \
+# OBSOLETE "print byte range mode"
+# OBSOLETE test_print_accept "ptype r15" "int \\(-32768:32767\\)" \
+# OBSOLETE "print int range mode"
+# OBSOLETE test_print_accept "ptype r16" "long \\(-2147483648:2147483647\\)" \
+# OBSOLETE "print long range mode"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype r2" "set1 \\(bbb:ccc\\)" \
+# OBSOLETE "print unnumbered set range mode"
+# OBSOLETE test_print_accept "ptype r3" "nset1 \\(na:na\\)" \
+# OBSOLETE "print numbered set range mode"
+# OBSOLETE # really this order ?
+# OBSOLETE # I'm not sure what should happen for the next two tests.
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype r4" "nset1 \\(nb = 34:nc = 20\\)" \
+# OBSOLETE "print numbered set range mode"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype r5" "nset1 \\(na = 1, nb = 34, nc = 20\\)" \
+# OBSOLETE "print numbered set range mode"
+# OBSOLETE
+# OBSOLETE # powerset modes
+# OBSOLETE test_print_accept "ptype pm1" \
+# OBSOLETE "POWERSET SET \[(\]p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\[)\]" \
+# OBSOLETE "print powerset mode 1"
+# OBSOLETE test_print_accept "ptype pm2" "POWERSET byte \\(1:8\\)" \
+# OBSOLETE "print powerset mode 2"
+# OBSOLETE test_print_accept "ptype pm3" "POWERSET int \\(-32768:32767\\)" \
+# OBSOLETE "print powerset mode 3"
+# OBSOLETE test_print_accept "ptype pm4" "POWERSET long \\(-32768:32768\\)" \
+# OBSOLETE "print powerset mode 4"
+# OBSOLETE test_print_accept "ptype pm5" \
+# OBSOLETE "POWERSET long \\(-2147483648:2147483647\\)" \
+# OBSOLETE "print powerset mode 5"
+# OBSOLETE
+# OBSOLETE # reference modes
+# OBSOLETE test_print_accept "ptype ref1" "REF pm1" \
+# OBSOLETE "print reference to powerset mode"
+# OBSOLETE test_print_accept "ptype ref2" "REF byte" \
+# OBSOLETE "print reference to byte"
+# OBSOLETE test_print_accept "ptype ref3" "PTR" \
+# OBSOLETE "print free reference type"
+# OBSOLETE
+# OBSOLETE # procedure modes
+# OBSOLETE # FIXME: we have to talk about this ...
+# OBSOLETE test_print_accept "ptype prm1" \
+# OBSOLETE "REF PROC \[(\]\[)\]" \
+# OBSOLETE "print procedure mode 1"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype prm2" \
+# OBSOLETE "REF PROC \[(\]bool in, int out long inout\[)\] RETURNS \[(\]char\[)\]" \
+# OBSOLETE "print procedure mode 2"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype prm3" \
+# OBSOLETE "REF PROC \[(\]pm1, ref loc\[)\] RETURNS \[(\]ref3\[)\]" \
+# OBSOLETE "print procedure mode 3"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype prm4" \
+# OBSOLETE "\[(\] \[)\] EXCEPTIONS \[(\]ex1, ex2, ex3\[)\]" \
+# OBSOLETE "print procedure mode 4"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype prm5" \
+# OBSOLETE "REF PROC \[(\]r11, r16 inout, r5 out\[)\] RETURNS \[(\]r2\[)\] EXCEPTIONS \[(\]ex1\[)\]" \
+# OBSOLETE "print procedure mode 5"
+# OBSOLETE
+# OBSOLETE # synchronization modes
+# OBSOLETE # FIXME: since gdb doesn't process events & buffers so far, this has be
+# OBSOLETE # filled later...
+# OBSOLETE xfail "synchronization mode handling"
+# OBSOLETE
+# OBSOLETE # timing modes
+# OBSOLETE test_print_accept "ptype DURATION" "duration"
+# OBSOLETE test_print_accept "ptype TIME" "time"
+# OBSOLETE
+# OBSOLETE # string modes
+# OBSOLETE # some tests are done in chillvars.exp
+# OBSOLETE test_print_accept "ptype strm1" "CHARS \\(5\\)" "print char string mode"
+# OBSOLETE test_print_accept "ptype strm2" "CHARS \[(\]7\[)\] VARYING" \
+# OBSOLETE "print varying char string mode"
+# OBSOLETE test_print_accept "ptype bstr1" "BOOLS \\(20\\)" "print bit string mode"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype B'000'" "BOOLS \\(3\\)" "bit string literal"
+# OBSOLETE test_print_accept "ptype B'11110000'" "BOOLS \\(8\\)" "bit string literal"
+# OBSOLETE # FIXME: adjust error message
+# OBSOLETE gdb_test "ptype B'00110211'" {.*Too-large digit.*[.]} \
+# OBSOLETE "reject invalid bitstring"
+# OBSOLETE
+# OBSOLETE # array modes
+# OBSOLETE # some tests are done in chillvars.exp
+# OBSOLETE test_print_accept "ptype arr1m" "ARRAY \\(1:100\\) set1" \
+# OBSOLETE "print array mode 1"
+# OBSOLETE test_print_accept "ptype arr2m" "ARRAY \\(1:100\\) ARRAY \\(1:100\\) set1"\
+# OBSOLETE "print array mode 2"
+# OBSOLETE test_print_accept "ptype arr3m" "ARRAY \\(0:255\\) ARRAY \\(0:65535\\) ARRAY \\(-128:127\\) set1" \
+# OBSOLETE "print array mode 3"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype arr4m" "ARRAY \\(b:c\\) ARRAY \\(na = 1:na = 1\\) ARRAY \\(nc:nb\\) ARRAY \\(na = 1:nc = 20\\) POWERSET SET \[(\]p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\[)\]" \
+# OBSOLETE "print array mode 4"
+# OBSOLETE
+# OBSOLETE # structure modes
+# OBSOLETE # some checks are in chillvars.exp
+# OBSOLETE # setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype stru1m" "STRUCT \\(.*a long,.*b long,.*CASE OF.*:.*ch1 CHARS \\(20\\).*:.*ch2 CHARS \\(10\\).*ELSE.*ch3 CHARS \\(1\\).*ESAC.*\\)" \
+# OBSOLETE "print structure mode 1"
+# OBSOLETE #setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype stru2m" "STRUCT \\(.*f set1,.*CASE OF.*:.*ch1 CHARS \\(20\\).*:.*ch2 CHARS \\(10\\) VARYING.*ELSE.*ch3 CHARS \\(0\\) VARYING.*ESAC.*\\)" \
+# OBSOLETE "print structure mode 2"
+# OBSOLETE #setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype stru3m" "STRUCT \\(.*f r3,.*CASE OF.*:.*ch1 CHARS \\(20\\).*ESAC.*\\)" \
+# OBSOLETE "print structure mode 3"
+# OBSOLETE # setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype stru4m" "STRUCT \\(.*i long,.*CASE OF.*:.*i1 int,.*i11 int,.*b1 bool,.*c1 char.*:.*i2 long,.*i22 long,.*bs2 BOOLS \\(10\\).*:.*s3 STRUCT \\(.*i3 int,.*CASE OF.*:.*foo long.*ELSE.*bar char.*ESAC.*\\).*ELSE.*x stru2m.*ESAC,.*y stru3m.*\\)" \
+# OBSOLETE "print structure mode 4"
+# OBSOLETE
+# OBSOLETE
+# OBSOLETE if $passcount then {
+# OBSOLETE pass "$passcount correct modes printed"
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # various tests if locations are treated correctly
+# OBSOLETE # read access using ptype, print, whatis
+# OBSOLETE proc test_locations {} {
+# OBSOLETE global passcount
+# OBSOLETE
+# OBSOLETE set passcount 0
+# OBSOLETE verbose "testing read access to locations"
+# OBSOLETE # various location tests can be found in chillvars.exp
+# OBSOLETE
+# OBSOLETE # set locations
+# OBSOLETE test_print_accept "ptype s1l" "SET \\(aaa, bbb, ccc\\)" \
+# OBSOLETE "print mode of set location"
+# OBSOLETE test_print_accept "whatis s1l" "set1" \
+# OBSOLETE "print modename of set location"
+# OBSOLETE test_print_accept "print s1l" "ccc" "print set location"
+# OBSOLETE test_print_accept "ptype s2l" "SET \\(na = 1, nb = 34, nc = 20\\)" \
+# OBSOLETE "print mode of numbered set location"
+# OBSOLETE test_print_accept "whatis s2l" "nset1" \
+# OBSOLETE "print mode name of numbered set location"
+# OBSOLETE test_print_accept "print s2l" "nb" "print numberes set location"
+# OBSOLETE
+# OBSOLETE # range modes
+# OBSOLETE test_print_accept "ptype rl1" "ubyte \\(0:255\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl1" "r11" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl1" "3" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl2" "ubyte \\(0:255\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl2" "r11" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl2" "0" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl3" "ubyte \\(0:255\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl3" "r11" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl3" "255" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl5" "uint \\(0:65535\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl5" "r12" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl5" "65530" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl6" "uint \\(0:65535\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl6" "r12" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl6" "0" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl7" "uint \\(0:65535\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl7" "r12" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl7" "65535" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE # test_print_accept "ptype rl9" "ulong \\(0:4294967295\\)" \
+# OBSOLETE # "print mode of range location"
+# OBSOLETE # test_print_accept "whatis rl9" "r13" \
+# OBSOLETE # "print mode name of range location"
+# OBSOLETE # test_print_accept "print rl9" "128" \
+# OBSOLETE # "print range location"
+# OBSOLETE
+# OBSOLETE # test_print_accept "ptype rl10" "ulong \\(0:4294967295\\)" \
+# OBSOLETE # "print mode of range location"
+# OBSOLETE # test_print_accept "whatis rl10" "r13" \
+# OBSOLETE # "print mode name of range location"
+# OBSOLETE # test_print_accept "print rl10" "0" \
+# OBSOLETE # "print range location"
+# OBSOLETE
+# OBSOLETE # test_print_accept "ptype rl11" "ulong \\(0:4294967295\\)" \
+# OBSOLETE # "print mode of range location"
+# OBSOLETE # test_print_accept "whatis rl11" "r13" \
+# OBSOLETE # "print mode name of range location"
+# OBSOLETE # test_print_accept "print rl11" "4294967295" \
+# OBSOLETE # "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl13" "byte \\(-128:127\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl13" "r14" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl13" "-121" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl14" "byte \\(-128:127\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl14" "r14" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl14" "-128" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl15" "byte \\(-128:127\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl15" "r14" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl15" "127" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl17" "int \\(-32768:32767\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl17" "r15" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl17" "-32720" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl18" "int \\(-32768:32767\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl18" "r15" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl18" "-32768" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl19" "int \\(-32768:32767\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl19" "r15" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl19" "32767" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl21" "long \\(-2147483648:2147483647\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl21" "r16" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl21" "2147483643" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl22" "long \\(-2147483648:2147483647\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl22" "r16" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl22" "-2147483648" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype rl23" "long \\(-2147483648:2147483647\\)" \
+# OBSOLETE "print mode of range location"
+# OBSOLETE test_print_accept "whatis rl23" "r16" \
+# OBSOLETE "print mode name of range location"
+# OBSOLETE test_print_accept "print rl23" "2147483647" \
+# OBSOLETE "print range location"
+# OBSOLETE
+# OBSOLETE # powerset locations
+# OBSOLETE test_print_accept "ptype pl1" \
+# OBSOLETE "POWERSET SET \\(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10\\)" \
+# OBSOLETE "print mode of powerset location 1"
+# OBSOLETE test_print_accept "whatis pl1" "pm1" \
+# OBSOLETE "print mode mode name of powerset location"
+# OBSOLETE test_print_accept "print pl1" \
+# OBSOLETE "\[\[\]p1:p10\[\]\]" \
+# OBSOLETE "print powerset location 1"
+# OBSOLETE test_print_accept "print pl2" {\[\]} \
+# OBSOLETE "print powerset location 2"
+# OBSOLETE test_print_accept "print pl3" "\[\[\]p1, p10\[\]\]" \
+# OBSOLETE "print powerset location 3"
+# OBSOLETE test_print_accept "print pl4" {\[p1:p2, p4:p6, p8:p10\]} \
+# OBSOLETE "print powerset location 4"
+# OBSOLETE test_print_accept "print pl5" {\[p1:p4, p6, p8:p10\]} \
+# OBSOLETE "print powerset location 5"
+# OBSOLETE test_print_accept "print pl6" {\[p1, p3:p8, p10\]} \
+# OBSOLETE "print powerset location 6"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype pl7" \
+# OBSOLETE "POWERSET byte \\(1:8\\)" \
+# OBSOLETE "print mode of byte powerset location"
+# OBSOLETE test_print_accept "whatis pl7" "pm2" \
+# OBSOLETE "print modename of byte powerset location"
+# OBSOLETE test_print_accept "print pl7" {\[1:8\]} \
+# OBSOLETE "print powerset location 7"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype pl8" \
+# OBSOLETE "POWERSET int \\(-32768:32767\\)" \
+# OBSOLETE "print mode of int powerset location"
+# OBSOLETE test_print_accept "whatis pl8" "pm3" \
+# OBSOLETE "print modename of int powerset location"
+# OBSOLETE test_print_accept "print pl8" {\[-32768:32767\]} \
+# OBSOLETE "print powerset location 8"
+# OBSOLETE
+# OBSOLETE # test_print_accept "ptype pl9" \
+# OBSOLETE # "POWERSET long \\(-2147483648:2147483647\\)" \
+# OBSOLETE # "print mode of long powerset location"
+# OBSOLETE # test_print_accept "whatis pl9" "pm5" \
+# OBSOLETE # "print modename of long powerset location"
+# OBSOLETE # test_print_accept "print pl9" {\[-2147483648:2147483647\]} \
+# OBSOLETE # "print powerset location 9"
+# OBSOLETE
+# OBSOLETE # reference modes
+# OBSOLETE test_print_accept "ptype ref3l" "PTR" "print mode of reference location"
+# OBSOLETE # setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "whatis ref3l" "ref3" \
+# OBSOLETE "print modename of reference location"
+# OBSOLETE # setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print ref3l" "ref3\\(H'.*\\)" \
+# OBSOLETE "print reference location"
+# OBSOLETE test_print_accept "ptype ref4l" "PTR" "print mode of reference location"
+# OBSOLETE # setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "whatis ref4l" "ref4" \
+# OBSOLETE "print modename of reference location"
+# OBSOLETE # setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print ref4l" "ref4\\(H'.*\\)" \
+# OBSOLETE "print reference location"
+# OBSOLETE test_print_accept "ptype ref5l" "PTR" "print mode of reference location"
+# OBSOLETE test_print_accept "whatis ref5l" "PTR" \
+# OBSOLETE "print modename of reference location"
+# OBSOLETE test_print_accept "print ref5l" "PTR\\(H'.*\\)" \
+# OBSOLETE "print reference location"
+# OBSOLETE
+# OBSOLETE # dereference a little bit..
+# OBSOLETE test_print_accept "print ref6l->syn_int" "42" \
+# OBSOLETE "dereference reference to synmode location"
+# OBSOLETE test_print_accept "print ref7l->int" "-42" \
+# OBSOLETE "dereference reference to predefined mode location"
+# OBSOLETE test_print_accept "print ref8l->pm1" \
+# OBSOLETE "\[\[\]p1:p10\[\]\]" \
+# OBSOLETE "dereference reference to newmode location"
+# OBSOLETE
+# OBSOLETE # synchronization mode locations
+# OBSOLETE # FIXME: synchronization modes are not supported so far...
+# OBSOLETE xfail "no synchronization mode location support, not implemented yet"
+# OBSOLETE
+# OBSOLETE # timing mode locations
+# OBSOLETE # FIXME: callbacks to abstime, inttime not implemented
+# OBSOLETE xfail "timing modes not implemented properly yet"
+# OBSOLETE
+# OBSOLETE # char string locations
+# OBSOLETE # some tests are don in chillvars.exp
+# OBSOLETE test_print_accept "ptype strl1" \
+# OBSOLETE "CHARS \\(7\\) VARYING" \
+# OBSOLETE "print varying string location"
+# OBSOLETE test_print_accept "whatis strl1" "strm2" \
+# OBSOLETE "print string locationa mode name"
+# OBSOLETE test_print_accept "print strl1" \
+# OBSOLETE {\"hansi\^\(0\)\"} \
+# OBSOLETE "print string location"
+# OBSOLETE # string elements
+# OBSOLETE test_print_accept "print strl1(0)" "\'h\'" \
+# OBSOLETE "print string element 1"
+# OBSOLETE test_print_accept "print strl1(5)" {'\^[(]0[)]'} \
+# OBSOLETE "print string element 2"
+# OBSOLETE test_print_accept "print strl1(3)" "\'s\'" \
+# OBSOLETE "print string element 3"
+# OBSOLETE test_print_accept "ptype strl1(0)" "char" \
+# OBSOLETE "print mode of string element"
+# OBSOLETE # slices
+# OBSOLETE test_print_accept "print strl1(3:4)" "\"si\"" \
+# OBSOLETE "print string slice 1"
+# OBSOLETE test_print_accept "print strl1(0:5)" \
+# OBSOLETE {\"hansi\^\(0\)\"} \
+# OBSOLETE "print string slice 2"
+# OBSOLETE test_print_accept "print strl1(0:0)" "\"h\"" \
+# OBSOLETE "print string slice 3"
+# OBSOLETE test_print_accept "print strl1(0 up 6)" \
+# OBSOLETE {\"hansi\^\(0\)\"} \
+# OBSOLETE "print string slice 4"
+# OBSOLETE # FIXME: adjust error message, when implented
+# OBSOLETE gdb_test "print strl1(6 up 1)" \
+# OBSOLETE ".*slice.*out of range.*" \
+# OBSOLETE "print invalid string slice length"
+# OBSOLETE gdb_test "print strl1(-1 up 5)" \
+# OBSOLETE ".*slice.*out of range.*" \
+# OBSOLETE "print invalid string slice length"
+# OBSOLETE gdb_test "print strl1(-1:5)" \
+# OBSOLETE ".*slice.*out of range.*" \
+# OBSOLETE "print invalid string slice"
+# OBSOLETE gdb_test "print strl1(-1:7)" \
+# OBSOLETE ".*slice.*out of range.*" \
+# OBSOLETE "print invalid string slice"
+# OBSOLETE gdb_test "print strl1(0 up -1)" \
+# OBSOLETE ".*slice.*out of range.*" \
+# OBSOLETE "print invalid string slice length"
+# OBSOLETE gdb_test "print strl1(0 up 0)" {""}
+# OBSOLETE
+# OBSOLETE # bitstring locations
+# OBSOLETE test_print_accept "ptype bstr1" \
+# OBSOLETE "BOOLS \\(20\\)" \
+# OBSOLETE "print mode of bitstring location"
+# OBSOLETE test_print_accept "whatis bstrl1" "bstr1" \
+# OBSOLETE "print mode name of bitstring location"
+# OBSOLETE test_print_accept "print bstrl1" \
+# OBSOLETE "B'10101010101010101010'" \
+# OBSOLETE "print bitstring location"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype bstrl1(0)" "bool|BOOL" \
+# OBSOLETE "print mode of bitstring element"
+# OBSOLETE test_print_accept "print bstrl1(0)" "TRUE" \
+# OBSOLETE "print bitstring element 1"
+# OBSOLETE test_print_accept "print bstrl1(19)" "FALSE" \
+# OBSOLETE "print bitstring element 2"
+# OBSOLETE test_print_accept "print bstrl1(10)" "TRUE" \
+# OBSOLETE "print bitstring element 3"
+# OBSOLETE
+# OBSOLETE test_print_accept "print bstrl1(0:19)" \
+# OBSOLETE "B'10101010101010101010'" \
+# OBSOLETE "print bitstring location slice 1"
+# OBSOLETE test_print_accept "print bstrl1(0:0)" \
+# OBSOLETE "B'1'" \
+# OBSOLETE "print bitstring location slice 2"
+# OBSOLETE test_print_accept "print bstrl1(3:9)" \
+# OBSOLETE "B'0101010'" \
+# OBSOLETE "print bitstring location slice 3"
+# OBSOLETE test_print_accept "print bstrl1(0 up 20)" \
+# OBSOLETE "B'10101010101010101010'" \
+# OBSOLETE "print bitstring location slice 4"
+# OBSOLETE test_print_accept "print bstrl1(19 up 1)" \
+# OBSOLETE "B'0'" \
+# OBSOLETE "print bitstring location slice 5"
+# OBSOLETE gdb_test "print bstrl1(20 up 1)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "print invalid bitstring slice (20 up 1)"
+# OBSOLETE gdb_test "print bstrl1(-4:5)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "print invalid bitstring slice (-4:5)"
+# OBSOLETE gdb_test "print bstrl1(-1:up 1)" \
+# OBSOLETE ".*invalid expression syntax.*" \
+# OBSOLETE "print invalid bitstring slice (-1:ip 1)"
+# OBSOLETE gdb_test "print bstrl1(-1:20)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "print invalid bitstring slice (-1:20)"
+# OBSOLETE gdb_test "print bstrl1(0 up -1)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "print invalid bitstring slice (0 up -1)"
+# OBSOLETE test_print_accept "print bstrl1(4 up 0)" "B''"
+# OBSOLETE
+# OBSOLETE # array mode locations
+# OBSOLETE gdb_test_exact "ptype arrl1" \
+# OBSOLETE "ARRAY (1:100) set1" \
+# OBSOLETE "print mode of array location"
+# OBSOLETE gdb_test "whatis arrl1" "arr1m" \
+# OBSOLETE "print mode name of array location"
+# OBSOLETE gdb_test_exact "print arrl1" {[(1:100): aaa]} \
+# OBSOLETE "print array location"
+# OBSOLETE test_print_accept "ptype arrl1(1)" \
+# OBSOLETE "SET \\(aaa, bbb, ccc\\)" \
+# OBSOLETE "print mode of array element"
+# OBSOLETE gdb_test_exact "print arrl3" \
+# OBSOLETE {[(1:5): [(1:3): [(1:2): -2147483648]]]} \
+# OBSOLETE "print array location 2"
+# OBSOLETE gdb_test_exact "print arrl3(1)" \
+# OBSOLETE {[(1:3): [(1:2): -2147483648]]} \
+# OBSOLETE "print array location 3"
+# OBSOLETE gdb_test_exact "ptype arrl3(1)" \
+# OBSOLETE {ARRAY (1:3) ARRAY (1:2) long} \
+# OBSOLETE "print mode of array element"
+# OBSOLETE test_print_accept "print arrl3(5)" \
+# OBSOLETE {\[\(1:3\): \[\(1:2\): -2147483648\]\]} \
+# OBSOLETE "print array location 4"
+# OBSOLETE test_print_accept "print arrl3(1,1)" \
+# OBSOLETE {\[\(1:2\): -2147483648\]} \
+# OBSOLETE "print array location 5"
+# OBSOLETE test_print_accept "ptype arrl3(1,1)" \
+# OBSOLETE {ARRAY \(1:2\) long} \
+# OBSOLETE "print mode of array element"
+# OBSOLETE test_print_accept "print arrl3(5,3)" \
+# OBSOLETE {\[\(1:2\): -2147483648\]} \
+# OBSOLETE "print array location 6"
+# OBSOLETE test_print_accept "print arrl3(1,1,1)" \
+# OBSOLETE "-2147483648" \
+# OBSOLETE "print array location 7"
+# OBSOLETE test_print_accept "print arrl3(5,3,2)" \
+# OBSOLETE "-2147483648" \
+# OBSOLETE "print array location 8"
+# OBSOLETE test_print_accept "print arrl3(1)(3)(2)" \
+# OBSOLETE "-2147483648" \
+# OBSOLETE "print array location 9"
+# OBSOLETE
+# OBSOLETE # reject the following range fails
+# OBSOLETE # FIXME: adjust error messages
+# OBSOLETE gdb_test "print arrl3(-1)" \
+# OBSOLETE ".*out of range.*" \
+# OBSOLETE "check invalid array indices 1"
+# OBSOLETE gdb_test "print arrl3(6)" \
+# OBSOLETE ".*out of range.*" \
+# OBSOLETE "check invalid array indices 2"
+# OBSOLETE gdb_test "print arrl3(0,0)" \
+# OBSOLETE ".*out of range.*" \
+# OBSOLETE "check invalid array indices 3"
+# OBSOLETE gdb_test "print arrl3(1,0)" \
+# OBSOLETE ".*out of range.*" \
+# OBSOLETE "check invalid array indices 4"
+# OBSOLETE gdb_test "print arrl3(1,4)" \
+# OBSOLETE ".*out of range.*" \
+# OBSOLETE "check invalid array indices 5"
+# OBSOLETE gdb_test "print arrl3(6,4)" \
+# OBSOLETE ".*out of range.*" \
+# OBSOLETE "check invalid array indices 6"
+# OBSOLETE gdb_test "print arrl3(1,1,0)" \
+# OBSOLETE ".*out of range.*" \
+# OBSOLETE "check invalid array indices 7"
+# OBSOLETE gdb_test "print arrl3(6,4,0)" \
+# OBSOLETE ".*out of range.*" \
+# OBSOLETE "check invalid array indices 8"
+# OBSOLETE gdb_test "print arrl3(1,1,3)" \
+# OBSOLETE ".*out of range.*" \
+# OBSOLETE "check invalid array indices 9"
+# OBSOLETE
+# OBSOLETE gdb_test "print arrl3(0)(0)" \
+# OBSOLETE ".* array or string index out of range.*" \
+# OBSOLETE "check invalid array indices 10"
+# OBSOLETE gdb_test "print arrl3(1)(0)" \
+# OBSOLETE ".* array or string index out of range.*" \
+# OBSOLETE "check invalid array indices 11"
+# OBSOLETE gdb_test "print arrl3(1)(4)" \
+# OBSOLETE ".* array or string index out of range.*" \
+# OBSOLETE "check invalid array indices 12"
+# OBSOLETE gdb_test "print arrl3(6)(4)" \
+# OBSOLETE ".* array or string index out of range.*" \
+# OBSOLETE "check invalid array indices 13"
+# OBSOLETE gdb_test "print arrl3(1)(1)(0)" \
+# OBSOLETE ".* array or string index out of range.*" \
+# OBSOLETE "check invalid array indices 14"
+# OBSOLETE gdb_test "print arrl3(6)(4)(0)" \
+# OBSOLETE ".* array or string index out of range.*" \
+# OBSOLETE "check invalid array indices 15"
+# OBSOLETE gdb_test "print arrl3(1)(1)(3)" \
+# OBSOLETE ".* array or string index out of range.*" \
+# OBSOLETE "check invalid array indices 16"
+# OBSOLETE
+# OBSOLETE # slices
+# OBSOLETE test_print_accept "print arrl4(1:3)" \
+# OBSOLETE {\[\(1:2\): \[\(1:3\): \[\(1:2\): -2147483648\]\], \(3\): \[\(1:3\): \[\(1:2\): 100\]\]\]} \
+# OBSOLETE "print array slice 1"
+# OBSOLETE test_print_accept "ptype arrl4(1:3)" \
+# OBSOLETE {ARRAY \(1:3\) ARRAY \(1:3\) ARRAY \(1:2\) long} \
+# OBSOLETE "print mode of array slice"
+# OBSOLETE # The next one is bogus:
+# OBSOLETE # test_print_accept "print arrl4(5, 2:3, 1)" \
+# OBSOLETE # # FIXME: maybe the '(1): ' in the inner tupel should be omitted ? \
+# OBSOLETE # {\[(2): \[\(1\): 100\], \(3\):\[\(1\): 100\]\]} \
+# OBSOLETE # "print array slice 2"
+# OBSOLETE test_print_accept "print arrl4(1 up 4)" \
+# OBSOLETE {\[\(1:2\): \[\(1:3\): \[\(1:2\): -2147483648\]\], \(3\): \[\(1:3\): \[\(1:2\): 100\]\], \(4\): \[\(1:3\): \[\(1:2\): -2147483648\]\]\]} \
+# OBSOLETE "print array slice 3"
+# OBSOLETE # The next two are bogus:
+# OBSOLETE # test_print_accept "print arrl4(3, 2 up 1)" \
+# OBSOLETE # {\[\(2:3\): \[\(1:2\): 100\]\]} \
+# OBSOLETE # "print array slice 4"
+# OBSOLETE # test_print_accept "print arrl4(1:2, 1 up 1, 2)" \
+# OBSOLETE # {\[\(1\): \[\(1\): \[\(2\): -2147483648\], \(2\): \[\(2\): -2147483648\]\], \(2\): \[\(1\): \[\(2\): -2147483648\], \(2\): \[\(2\): -2147483648\]\]\]} \
+# OBSOLETE # "print array slice 4"
+# OBSOLETE # reject invalid slices
+# OBSOLETE # FIXME: adjust error messages
+# OBSOLETE gdb_test "print arrl4(5:6)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "check invalid range 1"
+# OBSOLETE gdb_test "print arrl4(0:1)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "check invalid range 2"
+# OBSOLETE gdb_test "print arrl4(0:6)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "check invalid range 3"
+# OBSOLETE gdb_test "print arrl4(3:2)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "check invalid range 4"
+# OBSOLETE gdb_test "print arrl4(1,3:4)" \
+# OBSOLETE ".*syntax error.*" \
+# OBSOLETE "check invalid range 5"
+# OBSOLETE gdb_test "print arrl4(1,0:1)" \
+# OBSOLETE ".*syntax error.*" \
+# OBSOLETE "check invalid range 6"
+# OBSOLETE gdb_test "print arrl4(1,0:4)" \
+# OBSOLETE ".*syntax error.*" \
+# OBSOLETE "check invalid range 7"
+# OBSOLETE gdb_test "print arrl4(1,3:2)" \
+# OBSOLETE ".*syntax error.*" \
+# OBSOLETE "check invalid range 8"
+# OBSOLETE gdb_test "print arrl4(5 up 2)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "check invalid range 9"
+# OBSOLETE gdb_test "print arrl4(-1 up 1)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "check invalid range 10"
+# OBSOLETE gdb_test "print arrl4(-1 up 7)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "check invalid range 11"
+# OBSOLETE gdb_test "print arrl4(1 up 0)" \
+# OBSOLETE ".*slice out of range.*" \
+# OBSOLETE "check invalid range 12"
+# OBSOLETE gdb_test "print arrl4(1,3 up 1)" \
+# OBSOLETE ".*syntax error.*" \
+# OBSOLETE "check invalid range 13"
+# OBSOLETE gdb_test "print arrl4(1,-1 up 1)" \
+# OBSOLETE ".*syntax error.*" \
+# OBSOLETE "check invalid range 14"
+# OBSOLETE gdb_test "print arrl4(1,-1 up 5)" \
+# OBSOLETE ".*syntax error.*" \
+# OBSOLETE "check invalid range 15"
+# OBSOLETE gdb_test "print arrl4(1,2 up 0)" \
+# OBSOLETE ".*syntax error.*" \
+# OBSOLETE "check invalid range 16"
+# OBSOLETE
+# OBSOLETE # structure modes
+# OBSOLETE # some tests are in chillvars.exp
+# OBSOLETE # FIXME: no tag processing implemented do maybe adjust these tests
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "ptype stru1m" \
+# OBSOLETE "STRUCT \\(.*a long,.*b long,.*CASE b OF.*\\(42\\):.*ch1 CHARS\\(20\\),.*\\(52\\):.*ch2 CHARS\\(10\\).*ELSE.*ch3 CHARS\\(1\\).*ESAC.*\\)" \
+# OBSOLETE "print mode of structure location 1"
+# OBSOLETE test_print_accept "whatis strul1" "stru1m" \
+# OBSOLETE "print mode name of structure location 1"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print strul1" \
+# OBSOLETE {\[\.a: -2147483648, \.b: 42, \.\(b\): \{\(42\) = \[\.ch1: \"12345678900987654321\"\], \(52\) = \[\.ch2: \"1234567890\"\], (else) = \[\.ch3: \"1\"\]\}\]} \
+# OBSOLETE "print structure location 1"
+# OBSOLETE test_print_accept "print strul1.a" \
+# OBSOLETE "-2147483648" \
+# OBSOLETE "print field of structure location 1"
+# OBSOLETE test_print_accept "print strul1.b" "42" \
+# OBSOLETE "print field of structure location 1"
+# OBSOLETE test_print_accept "print strul1.ch1" \
+# OBSOLETE "\"12345678900987654321\"" \
+# OBSOLETE "print field of structure location 1"
+# OBSOLETE # setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print strul1.ch2" \
+# OBSOLETE "\"1234567890\"" \
+# OBSOLETE "print field of structure location 1"
+# OBSOLETE # setup_xfail "*-*-*"
+# OBSOLETE test_print_accept "print strul1.ch3" \
+# OBSOLETE "\"1\"" \
+# OBSOLETE "print field of structure location 1"
+# OBSOLETE
+# OBSOLETE if $passcount then {
+# OBSOLETE pass "$passcount correct locations printed"
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # This is chill/9434
+# OBSOLETE
+# OBSOLETE proc test_9434 {} {
+# OBSOLETE global passcount
+# OBSOLETE
+# OBSOLETE verbose "testing pr-9434"
+# OBSOLETE
+# OBSOLETE test_print_accept "ptype m_xyzmode" "STRUCT \\(.*next REF m_xyzmode,.*i long.*\\)"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE test_modes
+# OBSOLETE test_locations
+# OBSOLETE test_9434
+# OBSOLETE } else {
+# OBSOLETE warning "$test_name tests suppressed."
+# OBSOLETE }
-# Copyright 1992, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set prms_id 0
-set bug_id 0
-
-# Set the current language to chill. This counts as a test. If it
-# fails, then we skip the other tests.
-
-set testfile "tests2"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-global infinity
-if [istarget "i*86-*-sysv4*"] then {
- set infinity "inf"
-} else {
- set infinity "Infinity"
-}
-
-proc set_lang_chill {} {
- global gdb_prompt
- global binfile objdir subdir
-
- if ![file exists $objdir/$subdir/$binfile] then {
- return 0
- }
- verbose "loading file '$objdir/$subdir/$binfile'"
- gdb_load $objdir/$subdir/$binfile
-
- send_gdb "set language chill\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language chill (timeout)" ; return 0 }
- }
-
- send_gdb "show language\n"
- gdb_expect {
- -re ".* source language is \"chill\".*$gdb_prompt $" {
- pass "set language to \"chill\""
- send_gdb "break dummyfunc\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {
- send_gdb "run\n"
- gdb_expect -re ".*$gdb_prompt $" {}
- return 1
- }
- timeout {
- fail "can't set breakpoint (timeout)"
- return 0
- }
- }
- }
- -re ".*$gdb_prompt $" {
- fail "setting language to \"chill\""
- return 0
- }
- timeout {
- fail "can't show language (timeout)"
- return 0
- }
- }
-}
-
-# checks if structure was accessed correctly
-proc test_write { args } {
- global gdb_prompt
-
- if [llength $args]==5 then {
- set message [lindex $args 4]
- set extended [lindex $args 3]
- set matchval [lindex $args 2]
- } elseif [llength $args]==4 then {
- set message [lindex $args 3]
- set matchval [lindex $args 2]
- set extended ""
- } elseif [llength $args]==3 then {
- set message [lindex $args 2]
- set extended ""
- } else {
- warning "test ($args) write called with wrong number of arguments"
- return
- }
-
- set location [lindex $args 0]
- set value [lindex $args 1]
- if ![info exists matchval] then {
- set matchval $value
- }
- verbose "loc: $location, val: $value, msg: $message, ext: $extended, match: $matchval"
-
- verbose "setting var $value..."
- send_gdb "set var $location.m$extended := $value\n"
- gdb_expect -re ".*$gdb_prompt $" {}
- gdb_test "print $location" \
- ".*= \[\[\]\\.p1: 2863311530, \\.m: $matchval, \\.p2: 1431655765\[\]\]"\
- "$message"
-}
-
-# test write access from gdb (setvar x:=y) from gdb
-proc write_access { } {
- global infinity
-
- verbose "testing write access to locations"
-
- # discrete modes
- test_write b1 127 "byte write 1"
- test_write b1 -128 "byte write 2"
- test_write b1 0 "byte write 3"
- test_write ub1 255 "ubyte write 1"
- test_write ub1 0 "ubyte write 2"
- test_write ub1 42 "ubyte write 3"
- test_write i1 32767 "int write 1"
- test_write i1 -32768 "int write 2"
- test_write i1 0 "int write 3"
- test_write ui1 65535 "uint write 1"
- test_write ui1 0 "uint write 2"
- test_write ui1 123 "uint write 3"
- test_write l1 2147483647 "long write 1"
- test_write l1 -2147483648 "long write 2"
- test_write l1 0 "long write 3"
- test_write ul1 4294967295 "ulong write 1"
- test_write ul1 0 "ulong write 2"
- test_write ul1 1000000 "ulong write 3"
- test_write bo1 FALSE "bool write 1"
- test_write bo1 TRUE "bool write 2"
- test_write c1 \"1234\" "char write 1"
- test_write c2 \"1234567\" "char write 2"
- test_write c3 \"654321\" "char write 3"
- test_write c4 C'65' 'e' "char write 4"
- test_write bi1 B'10100101' "bitstring write 1"
- test_write bi2 B'0101001010' "bitstring write 2"
- test_write se1 a "set write 1"
- test_write se1 h "set write 2"
- # The following two use numbered sets with too-large values.
- setup_xfail "*-*-*"
- test_write nse1 nb "numbered set write 1"
- setup_xfail "*-*-*"
- test_write nse1 nc "numbered set write 2"
- test_write r1 127 "range write 1"
- test_write r2 32767 "range write 2"
- test_write r3 2147483647 "range write 3"
-
- # powerset modes
- test_write p1 {[pa:ph]} {\[pa:ph\]} "powerset write 1"
- test_write p1 {[pa, pc:pf, ph]} {\[pa, pc:pf, ph\]} "powerset write 2"
- test_write p1 {[pa, pc, pe, pg]} {\[pa, pc, pe, pg\]} "powerset write 3"
- test_write p1 {[]} {\[\]} "powerset write 4"
- test_write p2 {[1:32]} {\[1:32\]} "powerset write 5"
- test_write p2 {[1, 3:30, 32]} {\[1, 3:30, 32\]} "powerset write 6"
- test_write p2 {[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]} {\[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31\]} \
- "powerset write 7"
- test_write p2 {[]} {\[\]} "powerset write 8"
-
-# Fixme: this should be rejected by gnuchill
-# test_write p3 {[-2147483648:2147483647]} {\[-2147483648:2147483647\]} \
-# "powerset write 9"
-# test_write p3 {[-2147483648, -1000000:1000000, 2147483647]} \
-# {\[-2147483648, -1000000:1000000, 2147483647\]} \
-# "powerset write 10"
-# test_write p3 {[-99, -97, -95, 1001, 1003, 1005]} \
-# {\[-99, -97, -95, 1001, 1003, 1005\]} "powerset write 11"
-# test_write p3 {[]} {\[\]} "powerset write 12"
-
- # reference modes
- test_write ref1 ->ref1 {H'[0-9a-fA-F]+} "reference write 1"
- test_write ref2 ->b1 {H'[0-9a-fA-F]+} "reference write 2"
- test_write ref1 NULL "reference write 3"
- test_write ref2 NULL "reference write 4"
-
- # procedure modes
- test_write pr1 NULL "procefure write 1"
- # FIXME: remove when NULL is understood
- test_write pr1 0 NULL "procefure write 2"
- test_write pr1 dummyfunc {H'[0-9a-fA-F]+ <dummyfunc>} "procedure write 3"
-
- # timing modes, FIXME when callbacks to timefunctions are implemented
- #test_write ti1 abstime(1970, 3, 12, 10, 43, 0) {} "time write 1"
- #test_write ti2 <set somehow a duration>
- xfail "timing modes not implemented yet"
-
- # real modes
- # This ones
- test_write re1 42.03 {42.0[0-9]*} "real write 1"
- test_write re1 0 "real write 2"
- test_write re1 "1e+38" {1e\+38|1\.0[0-9]*e\+38|9\.9[0-9]*e\+37} \
- "real write 3"
- setup_xfail "i*86-pc-linux-gnu" "m68*-*-hpux*"
- test_write re1 "1e+39" $infinity "real write 4"
- test_write re2 42.03 {42.0[0-9]*} "real write 5"
- test_write re2 0 "real write 6"
- test_write re2 "1e+308" {1e\+308} "real write 7"
- setup_xfail "i*86-pc-linux-gnu" "m68*-*-hpux*"
- test_write re2 "1e+309" $infinity "real write 8"
- # array modes
- test_write arrl1 {[(1:3): [(1:2): -128]]} {\[\(1:3\): \[\(1:2\): -128\]\]}\
- "array write 1"
- test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
- "array write 2"
- test_write arrl1 {[(1): [(1:2): 127], (2): [(1:2): -128], (3): [(1:2): 127]]} {\[\(1\): \[\(1:2\): 127\], \(2\): \[\(1:2\): -128\], \(3\): \[\(1:2\): 127\]\]}\
- "array write 3"
- test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
- "array write 4"
- setup_xfail "*-*-*"
- # Bogus test case - type mismatch?
- test_write arrl1 {[(1): 127, (2): -128]} "array write 5"
- test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
- "array write 6"
-
- # structure modes
- test_write strul1 {[.a: -32768, .b: 32767, .ch: "ZZZZ"]} \
- {\[\.a: -32768, \.b: 32767, \.ch: \"ZZZZ\"\]} \
- "structure write 1"
- test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
- {\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
- "structure write 2"
- test_write strul1 -32768 {\[\.a: -32768, \.b: 0, \.ch: \"0000\"\]} \
- {.a} "structure write 3"
- test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
- {\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
- "structure write 4"
- test_write strul1 -32768 {\[\.a: 0, \.b: -32768, \.ch: \"0000\"\]} \
- {.b} "structure write 5"
- test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
- {\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
- "structure write 6"
- test_write strul1 \"HUGO\" {\[\.a: 0, \.b: 0, \.ch: \"HUGO\"\]} \
- {.ch} "structure write 7"
-}
-
-# Start with a fresh gdb.
-
-set binfile "tests2.exe"
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-gdb_test "set print sevenbit-strings" ".*"
-
-if [set_lang_chill] then {
- write_access
-} else {
- warning "$test_name tests suppressed."
-}
+# OBSOLETE # Copyright 1992, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Set the current language to chill. This counts as a test. If it
+# OBSOLETE # fails, then we skip the other tests.
+# OBSOLETE
+# OBSOLETE set testfile "tests2"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE global infinity
+# OBSOLETE if [istarget "i*86-*-sysv4*"] then {
+# OBSOLETE set infinity "inf"
+# OBSOLETE } else {
+# OBSOLETE set infinity "Infinity"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc set_lang_chill {} {
+# OBSOLETE global gdb_prompt
+# OBSOLETE global binfile objdir subdir
+# OBSOLETE
+# OBSOLETE if ![file exists $objdir/$subdir/$binfile] then {
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE verbose "loading file '$objdir/$subdir/$binfile'"
+# OBSOLETE gdb_load $objdir/$subdir/$binfile
+# OBSOLETE
+# OBSOLETE send_gdb "set language chill\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {}
+# OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE send_gdb "show language\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".* source language is \"chill\".*$gdb_prompt $" {
+# OBSOLETE pass "set language to \"chill\""
+# OBSOLETE send_gdb "break dummyfunc\n"
+# OBSOLETE gdb_expect {
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE send_gdb "run\n"
+# OBSOLETE gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE return 1
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't set breakpoint (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE -re ".*$gdb_prompt $" {
+# OBSOLETE fail "setting language to \"chill\""
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE timeout {
+# OBSOLETE fail "can't show language (timeout)"
+# OBSOLETE return 0
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # checks if structure was accessed correctly
+# OBSOLETE proc test_write { args } {
+# OBSOLETE global gdb_prompt
+# OBSOLETE
+# OBSOLETE if [llength $args]==5 then {
+# OBSOLETE set message [lindex $args 4]
+# OBSOLETE set extended [lindex $args 3]
+# OBSOLETE set matchval [lindex $args 2]
+# OBSOLETE } elseif [llength $args]==4 then {
+# OBSOLETE set message [lindex $args 3]
+# OBSOLETE set matchval [lindex $args 2]
+# OBSOLETE set extended ""
+# OBSOLETE } elseif [llength $args]==3 then {
+# OBSOLETE set message [lindex $args 2]
+# OBSOLETE set extended ""
+# OBSOLETE } else {
+# OBSOLETE warning "test ($args) write called with wrong number of arguments"
+# OBSOLETE return
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set location [lindex $args 0]
+# OBSOLETE set value [lindex $args 1]
+# OBSOLETE if ![info exists matchval] then {
+# OBSOLETE set matchval $value
+# OBSOLETE }
+# OBSOLETE verbose "loc: $location, val: $value, msg: $message, ext: $extended, match: $matchval"
+# OBSOLETE
+# OBSOLETE verbose "setting var $value..."
+# OBSOLETE send_gdb "set var $location.m$extended := $value\n"
+# OBSOLETE gdb_expect -re ".*$gdb_prompt $" {}
+# OBSOLETE gdb_test "print $location" \
+# OBSOLETE ".*= \[\[\]\\.p1: 2863311530, \\.m: $matchval, \\.p2: 1431655765\[\]\]"\
+# OBSOLETE "$message"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # test write access from gdb (setvar x:=y) from gdb
+# OBSOLETE proc write_access { } {
+# OBSOLETE global infinity
+# OBSOLETE
+# OBSOLETE verbose "testing write access to locations"
+# OBSOLETE
+# OBSOLETE # discrete modes
+# OBSOLETE test_write b1 127 "byte write 1"
+# OBSOLETE test_write b1 -128 "byte write 2"
+# OBSOLETE test_write b1 0 "byte write 3"
+# OBSOLETE test_write ub1 255 "ubyte write 1"
+# OBSOLETE test_write ub1 0 "ubyte write 2"
+# OBSOLETE test_write ub1 42 "ubyte write 3"
+# OBSOLETE test_write i1 32767 "int write 1"
+# OBSOLETE test_write i1 -32768 "int write 2"
+# OBSOLETE test_write i1 0 "int write 3"
+# OBSOLETE test_write ui1 65535 "uint write 1"
+# OBSOLETE test_write ui1 0 "uint write 2"
+# OBSOLETE test_write ui1 123 "uint write 3"
+# OBSOLETE test_write l1 2147483647 "long write 1"
+# OBSOLETE test_write l1 -2147483648 "long write 2"
+# OBSOLETE test_write l1 0 "long write 3"
+# OBSOLETE test_write ul1 4294967295 "ulong write 1"
+# OBSOLETE test_write ul1 0 "ulong write 2"
+# OBSOLETE test_write ul1 1000000 "ulong write 3"
+# OBSOLETE test_write bo1 FALSE "bool write 1"
+# OBSOLETE test_write bo1 TRUE "bool write 2"
+# OBSOLETE test_write c1 \"1234\" "char write 1"
+# OBSOLETE test_write c2 \"1234567\" "char write 2"
+# OBSOLETE test_write c3 \"654321\" "char write 3"
+# OBSOLETE test_write c4 C'65' 'e' "char write 4"
+# OBSOLETE test_write bi1 B'10100101' "bitstring write 1"
+# OBSOLETE test_write bi2 B'0101001010' "bitstring write 2"
+# OBSOLETE test_write se1 a "set write 1"
+# OBSOLETE test_write se1 h "set write 2"
+# OBSOLETE # The following two use numbered sets with too-large values.
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_write nse1 nb "numbered set write 1"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE test_write nse1 nc "numbered set write 2"
+# OBSOLETE test_write r1 127 "range write 1"
+# OBSOLETE test_write r2 32767 "range write 2"
+# OBSOLETE test_write r3 2147483647 "range write 3"
+# OBSOLETE
+# OBSOLETE # powerset modes
+# OBSOLETE test_write p1 {[pa:ph]} {\[pa:ph\]} "powerset write 1"
+# OBSOLETE test_write p1 {[pa, pc:pf, ph]} {\[pa, pc:pf, ph\]} "powerset write 2"
+# OBSOLETE test_write p1 {[pa, pc, pe, pg]} {\[pa, pc, pe, pg\]} "powerset write 3"
+# OBSOLETE test_write p1 {[]} {\[\]} "powerset write 4"
+# OBSOLETE test_write p2 {[1:32]} {\[1:32\]} "powerset write 5"
+# OBSOLETE test_write p2 {[1, 3:30, 32]} {\[1, 3:30, 32\]} "powerset write 6"
+# OBSOLETE test_write p2 {[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]} {\[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31\]} \
+# OBSOLETE "powerset write 7"
+# OBSOLETE test_write p2 {[]} {\[\]} "powerset write 8"
+# OBSOLETE
+# OBSOLETE # Fixme: this should be rejected by gnuchill
+# OBSOLETE # test_write p3 {[-2147483648:2147483647]} {\[-2147483648:2147483647\]} \
+# OBSOLETE # "powerset write 9"
+# OBSOLETE # test_write p3 {[-2147483648, -1000000:1000000, 2147483647]} \
+# OBSOLETE # {\[-2147483648, -1000000:1000000, 2147483647\]} \
+# OBSOLETE # "powerset write 10"
+# OBSOLETE # test_write p3 {[-99, -97, -95, 1001, 1003, 1005]} \
+# OBSOLETE # {\[-99, -97, -95, 1001, 1003, 1005\]} "powerset write 11"
+# OBSOLETE # test_write p3 {[]} {\[\]} "powerset write 12"
+# OBSOLETE
+# OBSOLETE # reference modes
+# OBSOLETE test_write ref1 ->ref1 {H'[0-9a-fA-F]+} "reference write 1"
+# OBSOLETE test_write ref2 ->b1 {H'[0-9a-fA-F]+} "reference write 2"
+# OBSOLETE test_write ref1 NULL "reference write 3"
+# OBSOLETE test_write ref2 NULL "reference write 4"
+# OBSOLETE
+# OBSOLETE # procedure modes
+# OBSOLETE test_write pr1 NULL "procefure write 1"
+# OBSOLETE # FIXME: remove when NULL is understood
+# OBSOLETE test_write pr1 0 NULL "procefure write 2"
+# OBSOLETE test_write pr1 dummyfunc {H'[0-9a-fA-F]+ <dummyfunc>} "procedure write 3"
+# OBSOLETE
+# OBSOLETE # timing modes, FIXME when callbacks to timefunctions are implemented
+# OBSOLETE #test_write ti1 abstime(1970, 3, 12, 10, 43, 0) {} "time write 1"
+# OBSOLETE #test_write ti2 <set somehow a duration>
+# OBSOLETE xfail "timing modes not implemented yet"
+# OBSOLETE
+# OBSOLETE # real modes
+# OBSOLETE # This ones
+# OBSOLETE test_write re1 42.03 {42.0[0-9]*} "real write 1"
+# OBSOLETE test_write re1 0 "real write 2"
+# OBSOLETE test_write re1 "1e+38" {1e\+38|1\.0[0-9]*e\+38|9\.9[0-9]*e\+37} \
+# OBSOLETE "real write 3"
+# OBSOLETE setup_xfail "i*86-pc-linux-gnu" "m68*-*-hpux*"
+# OBSOLETE test_write re1 "1e+39" $infinity "real write 4"
+# OBSOLETE test_write re2 42.03 {42.0[0-9]*} "real write 5"
+# OBSOLETE test_write re2 0 "real write 6"
+# OBSOLETE test_write re2 "1e+308" {1e\+308} "real write 7"
+# OBSOLETE setup_xfail "i*86-pc-linux-gnu" "m68*-*-hpux*"
+# OBSOLETE test_write re2 "1e+309" $infinity "real write 8"
+# OBSOLETE # array modes
+# OBSOLETE test_write arrl1 {[(1:3): [(1:2): -128]]} {\[\(1:3\): \[\(1:2\): -128\]\]}\
+# OBSOLETE "array write 1"
+# OBSOLETE test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
+# OBSOLETE "array write 2"
+# OBSOLETE test_write arrl1 {[(1): [(1:2): 127], (2): [(1:2): -128], (3): [(1:2): 127]]} {\[\(1\): \[\(1:2\): 127\], \(2\): \[\(1:2\): -128\], \(3\): \[\(1:2\): 127\]\]}\
+# OBSOLETE "array write 3"
+# OBSOLETE test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
+# OBSOLETE "array write 4"
+# OBSOLETE setup_xfail "*-*-*"
+# OBSOLETE # Bogus test case - type mismatch?
+# OBSOLETE test_write arrl1 {[(1): 127, (2): -128]} "array write 5"
+# OBSOLETE test_write arrl1 {[(1:3): [(1:2): 0]]} {\[\(1:3\): \[\(1:2\): 0\]\]}\
+# OBSOLETE "array write 6"
+# OBSOLETE
+# OBSOLETE # structure modes
+# OBSOLETE test_write strul1 {[.a: -32768, .b: 32767, .ch: "ZZZZ"]} \
+# OBSOLETE {\[\.a: -32768, \.b: 32767, \.ch: \"ZZZZ\"\]} \
+# OBSOLETE "structure write 1"
+# OBSOLETE test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
+# OBSOLETE {\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
+# OBSOLETE "structure write 2"
+# OBSOLETE test_write strul1 -32768 {\[\.a: -32768, \.b: 0, \.ch: \"0000\"\]} \
+# OBSOLETE {.a} "structure write 3"
+# OBSOLETE test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
+# OBSOLETE {\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
+# OBSOLETE "structure write 4"
+# OBSOLETE test_write strul1 -32768 {\[\.a: 0, \.b: -32768, \.ch: \"0000\"\]} \
+# OBSOLETE {.b} "structure write 5"
+# OBSOLETE test_write strul1 {[.a: 0, .b: 0, .ch: "0000"]} \
+# OBSOLETE {\[\.a: 0, \.b: 0, \.ch: \"0000\"\]} \
+# OBSOLETE "structure write 6"
+# OBSOLETE test_write strul1 \"HUGO\" {\[\.a: 0, \.b: 0, \.ch: \"HUGO\"\]} \
+# OBSOLETE {.ch} "structure write 7"
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE set binfile "tests2.exe"
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE
+# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
+# OBSOLETE
+# OBSOLETE if [set_lang_chill] then {
+# OBSOLETE write_access
+# OBSOLETE } else {
+# OBSOLETE warning "$test_name tests suppressed."
+# OBSOLETE }
-# Copyright 1995, 1996 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile "tuples"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- runto tuples.ch:40
-
- gdb_test_exact "print v_arri" {= [(1): -1, (2): -2, (3): -3, (4): -4, (5): -5]}
- gdb_test_exact "set v_arri := \[ 33, 44, 55, 66, 77 \]" {}
- gdb_test_exact "print v_arri" {= [(1): 33, (2): 44, (3): 55, (4): 66, (5): 77]} "after assignment 1 to v_arri"
- gdb_test_exact "set v_arri := \[-33, -44, -55, -66, -77\]" {}
- gdb_test_exact "print v_arri" {= [(1): -33, (2): -44, (3): -55, (4): -66, (5): -77]} {after assignment 2 to v_arri}
-
- gdb_test_exact "print v_arrui" {= [(1): 1, (2): 2, (3): 3, (4): 4, (5): 5]}
- gdb_test_exact "set v_arrui := \[ 11, 11, 11, 11, 11 \]" {}
- gdb_test_exact "print v_arrui" {= [(1:5): 11]} "after assignment to v_arrui"
-
- gdb_test_exact "print v_arrb" {= [(1): -3, (2): -4, (3): -5, (4): -6, (5): -7]}
-
- gdb_test_exact "set v_arrb := \[ -9, -8, -7, -6, -5 \]" {}
- gdb_test_exact "print v_arrb" {= [(1): -9, (2): -8, (3): -7, (4): -6, (5): -5]} "after assignment to v_arrb"
-
- gdb_test_exact "print v_arrub" {= [(1): 3, (2): 4, (3): 5, (4): 6, (5): 7]}
- gdb_test_exact "set v_arrub := \[ 77, 77, 77, 77, 77 \]" {}
- gdb_test_exact "print v_arrub" {= [(1:5): 77]} "v_arrub after assignment"
-
- gdb_test_exact "print j" {= 4}
- gdb_test_exact "print j := 3+4" {= 7}
- gdb_test_exact "print j := r1(3)" {= 3}
-
- gdb_test_exact "print v_arrc" {= [(1): '1', (2): '2', (3): '3', (4): '4', (5): '5']}
- gdb_test_exact "set v_arrc := \[ 'a', 'b', 'c', 'd', 'e' \]" {}
- gdb_test_exact "print v_arrc" {= [(1): 'a', (2): 'b', (3): 'c', (4): 'd', (5): 'e']} "v_arrc after assignment"
-
- gdb_test_exact "print v_ps" {= [1, 3, 5]}
- gdb_test_exact "set v_ps := \[ 2, 4 \]" {}
- gdb_test_exact "print v_ps" {= [2, 4]} {v_ps after assignment}
- gdb_test_exact "print v_ps := \[\]" {= []} {assign [] to v_ps}
-
- gdb_test_exact "print m_arri\[1, 2, 3, 4, 5\]" {= [(1): 1, (2): 2, (3): 3, (4): 4, (5): 5]}
- gdb_test_exact "print m_arrub\[45, 46, 47, 48, 49\]" {= [(1): 45, (2): 46, (3): 47, (4): 48, (5): 49]}
-
- gdb_test_exact "print v_cv" {= "foo"}
- gdb_test_exact "set v_cv := \"foo-bar\"" {}
- gdb_test_exact "print v_cv" {= "foo-bar"} "v_cv after assignment"
- gdb_test_exact "set v_cv(3) := ' '" {}
- gdb_test_exact "print v_cv" {= "foo bar"} "v_cv after element assignment"
-
- gdb_test_exact "print v_arrbool" {= [(1): TRUE, (2): FALSE, (3): TRUE, (4): FALSE, (5): TRUE]}
- gdb_test_exact "set v_arrbool := \[ false, false, false, false, false \]" {}
- gdb_test_exact "print v_arrbool" {= [(1:5): FALSE]} "v_arrbool after assignment 1"
- gdb_test_exact "set v_arrbool := \[true, true, true, true, true\]" {}
- gdb_test_exact "print v_arrbool" {= [(1:5): TRUE]} "v_arrbool after assignment 2"
- gdb_test_exact "set v_arrbool(3) := false" {}
- gdb_test_exact "print v_arrbool" {= [(1:2): TRUE, (3): FALSE, (4:5): TRUE]} "v_arrbool after element assignment"
-
- gdb_test_exact "set v_arrbool(1 up 2) := \[ false, true \]" {}
- gdb_test_exact "print v_arrbool" {= [(1): FALSE, (2): TRUE, (3): FALSE, (4:5): TRUE]} "v_arrbool after slice assignment 1"
- gdb_test_exact "set v_arrbool(3 : 5) := \[ true, true, false \]" {}
- gdb_test_exact "print v_arrbool" {= [(1): FALSE, (2:4): TRUE, (5): FALSE]} "v_arrbool after slice assignment 2"
-
- gdb_test_exact "set vstr := \[ .a: 2+3, .b: 12, .ch1: 'x' \]" {}
- gdb_test_exact "print vstr.a" {= 5} "vstr.a after assignment"
- gdb_test_exact "print vstr.ch1" {= 'x'} "vstr.ch1 after assignment"
-
-# These tests are from Cygnus PR chill/5024:
- gdb_test "break printdow" ""
- gdb_test "continue" ""
- gdb_test_exact "set var w:= dow\[monday\]" {}
- gdb_test "print w" " = \\\[monday\\\]" \
- "print bitstring after assignment"
- gdb_test_exact "set var w:=\[\]" {}
- gdb_test "print w" " = \\\[\\\]" \
- "print bitstring after assignment of \[\]"
-
-# These tests are from Cygnus PR chill/8643:
- runto tuples.ch:40
- gdb_test_exact "set var vs1 := \[ \"foo\", 41, \[ b \] \]" {}
- gdb_test_exact "print vs1" { = [.str: "foo", .i: 41, .ps: [b]]} \
- "print vs1 after tuple assign 1"
- setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
- gdb_test_exact "set var vs1 := \[ \"bar\", 42, m_ps\[ a \] \]" {}
- setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
- gdb_test_exact "print vs1" { = [.str: "bar", .i: 42, .ps: [a]]} \
- "print vs1 after tuple assign 2"
-
- gdb_test_exact "set var \$i := m_s1\[\"foo\", 42, \[a \]\]" {}
- gdb_test_exact {print $i} { = [.str: "foo", .i: 42, .ps: [a]]} \
- "print \$i after tuple assign 1"
- setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
- gdb_test_exact "set var \$i := m_s1\[\"foo\", 44, m_ps\[a \]\]" {}
- setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
- gdb_test_exact {print $i} { = [.str: "foo", .i: 44, .ps: [a]]} \
- "print \$i after tuple assign 2"
-
- gdb_test_exact "set var vs2 := \[ 10, \[ \"foo\" , 42, \[ b \] \] \]" {}
- gdb_test_exact "print vs2" \
- { = [.i: 10, .s: [.str: "foo", .i: 42, .ps: [b]]]} \
- "print vs2 after tuple assign 1"
- setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
- gdb_test_exact "set var vs2 := \[ 10+3, m_s1\[ \"foo\" , 42, m_ps\[ b \] \] \]" {}
- setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
- gdb_test_exact "print vs2" \
- { = [.i: 13, .s: [.str: "foo", .i: 42, .ps: [b]]]} \
- "print vs2 after tuple assign 2"
-
- gdb_test_exact "set var vs3 := \[ 33, \[ -1, -2, -3 \] \]" {}
- gdb_test_exact "print vs3" {[.i: 33, .a: [(1): -1, (2): -2, (3): -3]]} \
- "print vs3 after tuple assign"
- gdb_test_exact "set var \$k := m_s3\[ 33, m_arr\[ 4, 3, 2 \] \]" {}
- gdb_test_exact {print $k} { = [.i: 33, .a: [(1): 4, (2): 3, (3): 2]]} \
- "print \$k after tuple assign"
-
-}
-
-do_tests
+# OBSOLETE # Copyright 1995, 1996 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile "tuples"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE runto tuples.ch:40
+# OBSOLETE
+# OBSOLETE gdb_test_exact "print v_arri" {= [(1): -1, (2): -2, (3): -3, (4): -4, (5): -5]}
+# OBSOLETE gdb_test_exact "set v_arri := \[ 33, 44, 55, 66, 77 \]" {}
+# OBSOLETE gdb_test_exact "print v_arri" {= [(1): 33, (2): 44, (3): 55, (4): 66, (5): 77]} "after assignment 1 to v_arri"
+# OBSOLETE gdb_test_exact "set v_arri := \[-33, -44, -55, -66, -77\]" {}
+# OBSOLETE gdb_test_exact "print v_arri" {= [(1): -33, (2): -44, (3): -55, (4): -66, (5): -77]} {after assignment 2 to v_arri}
+# OBSOLETE
+# OBSOLETE gdb_test_exact "print v_arrui" {= [(1): 1, (2): 2, (3): 3, (4): 4, (5): 5]}
+# OBSOLETE gdb_test_exact "set v_arrui := \[ 11, 11, 11, 11, 11 \]" {}
+# OBSOLETE gdb_test_exact "print v_arrui" {= [(1:5): 11]} "after assignment to v_arrui"
+# OBSOLETE
+# OBSOLETE gdb_test_exact "print v_arrb" {= [(1): -3, (2): -4, (3): -5, (4): -6, (5): -7]}
+# OBSOLETE
+# OBSOLETE gdb_test_exact "set v_arrb := \[ -9, -8, -7, -6, -5 \]" {}
+# OBSOLETE gdb_test_exact "print v_arrb" {= [(1): -9, (2): -8, (3): -7, (4): -6, (5): -5]} "after assignment to v_arrb"
+# OBSOLETE
+# OBSOLETE gdb_test_exact "print v_arrub" {= [(1): 3, (2): 4, (3): 5, (4): 6, (5): 7]}
+# OBSOLETE gdb_test_exact "set v_arrub := \[ 77, 77, 77, 77, 77 \]" {}
+# OBSOLETE gdb_test_exact "print v_arrub" {= [(1:5): 77]} "v_arrub after assignment"
+# OBSOLETE
+# OBSOLETE gdb_test_exact "print j" {= 4}
+# OBSOLETE gdb_test_exact "print j := 3+4" {= 7}
+# OBSOLETE gdb_test_exact "print j := r1(3)" {= 3}
+# OBSOLETE
+# OBSOLETE gdb_test_exact "print v_arrc" {= [(1): '1', (2): '2', (3): '3', (4): '4', (5): '5']}
+# OBSOLETE gdb_test_exact "set v_arrc := \[ 'a', 'b', 'c', 'd', 'e' \]" {}
+# OBSOLETE gdb_test_exact "print v_arrc" {= [(1): 'a', (2): 'b', (3): 'c', (4): 'd', (5): 'e']} "v_arrc after assignment"
+# OBSOLETE
+# OBSOLETE gdb_test_exact "print v_ps" {= [1, 3, 5]}
+# OBSOLETE gdb_test_exact "set v_ps := \[ 2, 4 \]" {}
+# OBSOLETE gdb_test_exact "print v_ps" {= [2, 4]} {v_ps after assignment}
+# OBSOLETE gdb_test_exact "print v_ps := \[\]" {= []} {assign [] to v_ps}
+# OBSOLETE
+# OBSOLETE gdb_test_exact "print m_arri\[1, 2, 3, 4, 5\]" {= [(1): 1, (2): 2, (3): 3, (4): 4, (5): 5]}
+# OBSOLETE gdb_test_exact "print m_arrub\[45, 46, 47, 48, 49\]" {= [(1): 45, (2): 46, (3): 47, (4): 48, (5): 49]}
+# OBSOLETE
+# OBSOLETE gdb_test_exact "print v_cv" {= "foo"}
+# OBSOLETE gdb_test_exact "set v_cv := \"foo-bar\"" {}
+# OBSOLETE gdb_test_exact "print v_cv" {= "foo-bar"} "v_cv after assignment"
+# OBSOLETE gdb_test_exact "set v_cv(3) := ' '" {}
+# OBSOLETE gdb_test_exact "print v_cv" {= "foo bar"} "v_cv after element assignment"
+# OBSOLETE
+# OBSOLETE gdb_test_exact "print v_arrbool" {= [(1): TRUE, (2): FALSE, (3): TRUE, (4): FALSE, (5): TRUE]}
+# OBSOLETE gdb_test_exact "set v_arrbool := \[ false, false, false, false, false \]" {}
+# OBSOLETE gdb_test_exact "print v_arrbool" {= [(1:5): FALSE]} "v_arrbool after assignment 1"
+# OBSOLETE gdb_test_exact "set v_arrbool := \[true, true, true, true, true\]" {}
+# OBSOLETE gdb_test_exact "print v_arrbool" {= [(1:5): TRUE]} "v_arrbool after assignment 2"
+# OBSOLETE gdb_test_exact "set v_arrbool(3) := false" {}
+# OBSOLETE gdb_test_exact "print v_arrbool" {= [(1:2): TRUE, (3): FALSE, (4:5): TRUE]} "v_arrbool after element assignment"
+# OBSOLETE
+# OBSOLETE gdb_test_exact "set v_arrbool(1 up 2) := \[ false, true \]" {}
+# OBSOLETE gdb_test_exact "print v_arrbool" {= [(1): FALSE, (2): TRUE, (3): FALSE, (4:5): TRUE]} "v_arrbool after slice assignment 1"
+# OBSOLETE gdb_test_exact "set v_arrbool(3 : 5) := \[ true, true, false \]" {}
+# OBSOLETE gdb_test_exact "print v_arrbool" {= [(1): FALSE, (2:4): TRUE, (5): FALSE]} "v_arrbool after slice assignment 2"
+# OBSOLETE
+# OBSOLETE gdb_test_exact "set vstr := \[ .a: 2+3, .b: 12, .ch1: 'x' \]" {}
+# OBSOLETE gdb_test_exact "print vstr.a" {= 5} "vstr.a after assignment"
+# OBSOLETE gdb_test_exact "print vstr.ch1" {= 'x'} "vstr.ch1 after assignment"
+# OBSOLETE
+# OBSOLETE # These tests are from Cygnus PR chill/5024:
+# OBSOLETE gdb_test "break printdow" ""
+# OBSOLETE gdb_test "continue" ""
+# OBSOLETE gdb_test_exact "set var w:= dow\[monday\]" {}
+# OBSOLETE gdb_test "print w" " = \\\[monday\\\]" \
+# OBSOLETE "print bitstring after assignment"
+# OBSOLETE gdb_test_exact "set var w:=\[\]" {}
+# OBSOLETE gdb_test "print w" " = \\\[\\\]" \
+# OBSOLETE "print bitstring after assignment of \[\]"
+# OBSOLETE
+# OBSOLETE # These tests are from Cygnus PR chill/8643:
+# OBSOLETE runto tuples.ch:40
+# OBSOLETE gdb_test_exact "set var vs1 := \[ \"foo\", 41, \[ b \] \]" {}
+# OBSOLETE gdb_test_exact "print vs1" { = [.str: "foo", .i: 41, .ps: [b]]} \
+# OBSOLETE "print vs1 after tuple assign 1"
+# OBSOLETE setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE gdb_test_exact "set var vs1 := \[ \"bar\", 42, m_ps\[ a \] \]" {}
+# OBSOLETE setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE gdb_test_exact "print vs1" { = [.str: "bar", .i: 42, .ps: [a]]} \
+# OBSOLETE "print vs1 after tuple assign 2"
+# OBSOLETE
+# OBSOLETE gdb_test_exact "set var \$i := m_s1\[\"foo\", 42, \[a \]\]" {}
+# OBSOLETE gdb_test_exact {print $i} { = [.str: "foo", .i: 42, .ps: [a]]} \
+# OBSOLETE "print \$i after tuple assign 1"
+# OBSOLETE setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE gdb_test_exact "set var \$i := m_s1\[\"foo\", 44, m_ps\[a \]\]" {}
+# OBSOLETE setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE gdb_test_exact {print $i} { = [.str: "foo", .i: 44, .ps: [a]]} \
+# OBSOLETE "print \$i after tuple assign 2"
+# OBSOLETE
+# OBSOLETE gdb_test_exact "set var vs2 := \[ 10, \[ \"foo\" , 42, \[ b \] \] \]" {}
+# OBSOLETE gdb_test_exact "print vs2" \
+# OBSOLETE { = [.i: 10, .s: [.str: "foo", .i: 42, .ps: [b]]]} \
+# OBSOLETE "print vs2 after tuple assign 1"
+# OBSOLETE setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE gdb_test_exact "set var vs2 := \[ 10+3, m_s1\[ \"foo\" , 42, m_ps\[ b \] \] \]" {}
+# OBSOLETE setup_xfail "i*86-pc-linux*-gnu" "sparc-*-solaris*" "sparc-*-sunos*"
+# OBSOLETE gdb_test_exact "print vs2" \
+# OBSOLETE { = [.i: 13, .s: [.str: "foo", .i: 42, .ps: [b]]]} \
+# OBSOLETE "print vs2 after tuple assign 2"
+# OBSOLETE
+# OBSOLETE gdb_test_exact "set var vs3 := \[ 33, \[ -1, -2, -3 \] \]" {}
+# OBSOLETE gdb_test_exact "print vs3" {[.i: 33, .a: [(1): -1, (2): -2, (3): -3]]} \
+# OBSOLETE "print vs3 after tuple assign"
+# OBSOLETE gdb_test_exact "set var \$k := m_s3\[ 33, m_arr\[ 4, 3, 2 \] \]" {}
+# OBSOLETE gdb_test_exact {print $k} { = [.i: 33, .a: [(1): 4, (2): 3, (3): 2]]} \
+# OBSOLETE "print \$k after tuple assign"
+# OBSOLETE
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
-# Copyright 1992, 1994, 1997, 1999 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Per Bothner. (bothner@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if [skip_chill_tests] then { continue }
-
-set testfile2 "xstruct-grt"
-set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
-set objfile2 ${objdir}/$subdir/${testfile2}.o
-if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
- perror "Couldn't compile ${srcfile2}"
- return -1
-}
-
-set testfile "xstruct"
-set srcfile ${srcdir}/$subdir/${testfile}.ch
-set binfile ${objdir}/${subdir}/${testfile}.exe
-if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
- perror "Couldn't compile ${srcfile}"
- return -1
-}
-
-proc do_tests {} {
- global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language chill" ""
-
- gdb_test "set var \$i := m_x\[\]" ""
- gdb_test "print \$i" { = \[.i: 0, .ar: \[\(5:6\): \[.f1: 0, .f2: NULL, .f3: \[\(2:3\): 0\]\]\]\]}
-
- gdb_test "set var \$j := m_y\[\]" ""
- gdb_test "print \$j" { = \[.i: 0, .ar: \[\(7:8\): \[\(9:10\): \[.f1: 0, .f2: NULL, .f3: \[\(2:3\): 0\]\]\]\]\]}
-}
-
-do_tests
+# OBSOLETE # Copyright 1992, 1994, 1997, 1999 Free Software Foundation, Inc.
+# OBSOLETE
+# OBSOLETE # This program is free software; you can redistribute it and/or modify
+# OBSOLETE # it under the terms of the GNU General Public License as published by
+# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
+# OBSOLETE # (at your option) any later version.
+# OBSOLETE #
+# OBSOLETE # This program is distributed in the hope that it will be useful,
+# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
+# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# OBSOLETE # GNU General Public License for more details.
+# OBSOLETE #
+# OBSOLETE # You should have received a copy of the GNU General Public License
+# OBSOLETE # along with this program; if not, write to the Free Software
+# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# OBSOLETE
+# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
+# OBSOLETE # bug-gdb@prep.ai.mit.edu
+# OBSOLETE
+# OBSOLETE # This file was written by Per Bothner. (bothner@cygnus.com)
+# OBSOLETE
+# OBSOLETE if $tracelevel then {
+# OBSOLETE strace $tracelevel
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE if [skip_chill_tests] then { continue }
+# OBSOLETE
+# OBSOLETE set testfile2 "xstruct-grt"
+# OBSOLETE set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+# OBSOLETE set objfile2 ${objdir}/$subdir/${testfile2}.o
+# OBSOLETE if { [compile "${srcfile2} -g -c -o ${objfile2}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile2}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE set testfile "xstruct"
+# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
+# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
+# OBSOLETE if { [compile "${srcfile} -g ${objfile2} -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+# OBSOLETE perror "Couldn't compile ${srcfile}"
+# OBSOLETE return -1
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE proc do_tests {} {
+# OBSOLETE global prms_id bug_id subdir objdir srcdir binfile gdb_prompt
+# OBSOLETE
+# OBSOLETE set prms_id 0
+# OBSOLETE set bug_id 0
+# OBSOLETE
+# OBSOLETE # Start with a fresh gdb.
+# OBSOLETE
+# OBSOLETE gdb_exit
+# OBSOLETE gdb_start
+# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
+# OBSOLETE gdb_load $binfile
+# OBSOLETE
+# OBSOLETE gdb_test "set language chill" ""
+# OBSOLETE
+# OBSOLETE gdb_test "set var \$i := m_x\[\]" ""
+# OBSOLETE gdb_test "print \$i" { = \[.i: 0, .ar: \[\(5:6\): \[.f1: 0, .f2: NULL, .f3: \[\(2:3\): 0\]\]\]\]}
+# OBSOLETE
+# OBSOLETE gdb_test "set var \$j := m_y\[\]" ""
+# OBSOLETE gdb_test "print \$j" { = \[.i: 0, .ar: \[\(7:8\): \[\(9:10\): \[.f1: 0, .f2: NULL, .f3: \[\(2:3\): 0\]\]\]\]\]}
+# OBSOLETE }
+# OBSOLETE
+# OBSOLETE do_tests
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
-# This file was adapted from Chill tests by Stan Shebs (shebs@cygnus.com).
+# This file was adapted from (OBSOLETE) Chill tests by Stan Shebs (shebs@cygnus.com).
if $tracelevel then {
strace $tracelevel
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
-# This file was adapted from Chill tests by Stan Shebs (shebs@cygnus.com).
+# This file was adapted from (OBSOLETE) Chill tests by Stan Shebs (shebs@cygnus.com).
if $tracelevel then {
strace $tracelevel
load_lib libgloss.exp
global GDB
-global CHILL_LIB
-global CHILL_RT0
-
-if ![info exists CHILL_LIB] {
- set CHILL_LIB [findfile $base_dir/../../gcc/ch/runtime/libchill.a "$base_dir/../../gcc/ch/runtime/libchill.a" [transform -lchill]]
-}
-verbose "using CHILL_LIB = $CHILL_LIB" 2
-if ![info exists CHILL_RT0] {
- set CHILL_RT0 [findfile $base_dir/../../gcc/ch/runtime/chillrt0.o "$base_dir/../../gcc/ch/runtime/chillrt0.o" ""]
-}
-verbose "using CHILL_RT0 = $CHILL_RT0" 2
+# OBSOLETE global CHILL_LIB
+# OBSOLETE global CHILL_RT0
+
+# OBSOLETE if ![info exists CHILL_LIB] {
+# OBSOLETE set CHILL_LIB [findfile $base_dir/../../gcc/ch/runtime/libchill.a "$base_dir/../../gcc/ch/runtime/libchill.a" [transform -lchill]]
+# OBSOLETE }
+# OBSOLETE verbose "using CHILL_LIB = $CHILL_LIB" 2
+# OBSOLETE if ![info exists CHILL_RT0] {
+# OBSOLETE set CHILL_RT0 [findfile $base_dir/../../gcc/ch/runtime/chillrt0.o "$base_dir/../../gcc/ch/runtime/chillrt0.o" ""]
+# OBSOLETE }
+# OBSOLETE verbose "using CHILL_RT0 = $CHILL_RT0" 2
if [info exists TOOL_EXECUTABLE] {
set GDB $TOOL_EXECUTABLE;
return 0
}
-# * For crosses, the CHILL runtime doesn't build because it can't find
-# setjmp.h, stdio.h, etc.
-# * For AIX (as of 16 Mar 95), (a) there is no language code for
-# CHILL in output_epilog in gcc/config/rs6000/rs6000.c, (b) collect2
-# does not get along with AIX's too-clever linker.
-# * On Irix5, there is a bug whereby set of bool, etc., don't get
-# TYPE_LOW_BOUND for the bool right because force_to_range_type doesn't
-# work with stub types.
-# Lots of things seem to fail on the PA, and since it's not a supported
-# chill target at the moment, don't run the chill tests.
-
-proc skip_chill_tests {} {
- if ![info exists do_chill_tests] {
- return 1;
- }
- eval set skip_chill [expr ![isnative] || [istarget "*-*-aix*"] || [istarget "*-*-irix5*"] || [istarget "*-*-irix6*"] || [istarget "alpha-*-osf*"] || [istarget "hppa*-*-*"]]
- verbose "Skip chill tests is $skip_chill"
- return $skip_chill
-}
+# OBSOLETE # * For crosses, the CHILL runtime doesn't build because it
+# OBSOLETE # can't find setjmp.h, stdio.h, etc.
+# OBSOLETE # * For AIX (as of 16 Mar 95), (a) there is no language code for
+# OBSOLETE # CHILL in output_epilog in gcc/config/rs6000/rs6000.c, (b) collect2
+# OBSOLETE # does not get along with AIX's too-clever linker.
+# OBSOLETE # * On Irix5, there is a bug whereby set of bool, etc., don't get
+# OBSOLETE # TYPE_LOW_BOUND for the bool right because force_to_range_type doesn't
+# OBSOLETE # work with stub types.
+# OBSOLETE # Lots of things seem to fail on the PA, and since it's not a supported
+# OBSOLETE # chill target at the moment, don't run the chill tests.
+
+# OBSOLETE proc skip_chill_tests {} {
+# OBSOLETE if ![info exists do_chill_tests] {
+# OBSOLETE return 1;
+# OBSOLETE }
+# OBSOLETE eval set skip_chill [expr ![isnative] || [istarget "*-*-aix*"] || [istarget "*-*-irix5*"] || [istarget "*-*-irix6*"] || [istarget "alpha-*-osf*"] || [istarget "hppa*-*-*"]]
+# OBSOLETE verbose "Skip chill tests is $skip_chill"
+# OBSOLETE return $skip_chill
+# OBSOLETE }
# Skip all the tests in the file if you are not on an hppa running
# hpux target.
global signed_keyword_not_used
global gcc_compiled
- if {![istarget "hppa*-*-hpux*"]} {
+ if {![istarget "hppa*-*-hpux*"] && ![istarget "mips*-*-irix*"]} {
if { [llength $args] > 0 } {
if {$args == "c++"} {
if { [gdb_compile "${srcdir}/lib/compiler.cc" "${binfile}.ci" preprocess {}] != "" } {
set ok 1
if { $suppress_flag } {
set ok 0
+ unresolved "${test}"
}
while { ${index} < [llength ${list}] } {
set pattern [lindex ${list} ${index}]
if { ${ok} } {
gdb_expect {
-re "${pattern}${sentinel}" {
- pass "${test}, pattern ${index} + sentinel"
+ # pass "${test}, pattern ${index} + sentinel"
}
-re "${sentinel}" {
- fail "${test}, pattern ${index} + sentinel"
+ fail "${test} (pattern ${index} + sentinel)"
set ok 0
}
timeout {
- fail "${test}, pattern ${index} + sentinel (timeout)"
+ fail "${test} (pattern ${index} + sentinel) (timeout)"
set ok 0
}
}
} else {
- unresolved "${test}, pattern ${index} + sentinel"
+ # unresolved "${test}, pattern ${index} + sentinel"
}
} else {
if { ${ok} } {
gdb_expect {
-re "${pattern}" {
- pass "${test}, pattern ${index}"
+ # pass "${test}, pattern ${index}"
}
-re "${sentinel}" {
- fail "${test}, pattern ${index}"
+ fail "${test} (pattern ${index})"
set ok 0
}
timeout {
- fail "${test}, pattern ${index} (timeout)"
+ fail "${test} (pattern ${index}) (timeout)"
set ok 0
}
}
} else {
- unresolved "${test}, pattern ${index}"
+ # unresolved "${test}, pattern ${index}"
}
}
}
if { ${ok} } {
+ pass "${test}"
return 0
} else {
return 1
#include "gdbcmd.h"
#include "regcache.h"
#include "gdb.h"
+#include "gdb_string.h"
#include <ctype.h>
#include <sys/types.h>
static int history_size;
static char *history_filename;
+/* This is like readline(), but it has some gdb-specific behavior.
+ gdb can use readline in both the synchronous and async modes during
+ a single gdb invocation. At the ordinary top-level prompt we might
+ be using the async readline. That means we can't use
+ rl_pre_input_hook, since it doesn't work properly in async mode.
+ However, for a secondary prompt (" >", such as occurs during a
+ `define'), gdb just calls readline() directly, running it in
+ synchronous mode. So for operate-and-get-next to work in this
+ situation, we have to switch the hooks around. That is what
+ gdb_readline_wrapper is for. */
+char *
+gdb_readline_wrapper (char *prompt)
+{
+ /* Set the hook that works in this case. */
+ if (event_loop_p && after_char_processing_hook)
+ {
+ rl_pre_input_hook = (Function *) after_char_processing_hook;
+ after_char_processing_hook = NULL;
+ }
+
+ return readline (prompt);
+}
+
\f
#ifdef STOP_SIGNAL
static void
}
else if (command_editing_p && instream == stdin && ISATTY (instream))
{
- rl = readline (local_prompt);
+ rl = gdb_readline_wrapper (local_prompt);
}
else
{
line = (*readline_hook) (prompt);
else if (instream == stdin && ISATTY (instream))
{
- line = readline (prompt);
+ line = gdb_readline_wrapper (prompt);
if (line && *line) /* add it to command history */
add_history (line);
}
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "obstack.h"
+#include "gdb_obstack.h"
#include "bfd.h" /* Binary File Description */
#include "symtab.h"
#include "gdbtypes.h"
type_print (type, "", stream, 0);
break;
#endif
-#ifdef _LANG_chill
- case language_chill:
- fprintf_filtered (stream, "SYNMODE ");
- if (!TYPE_NAME (SYMBOL_TYPE (new)) ||
- !STREQ (TYPE_NAME (SYMBOL_TYPE (new)), SYMBOL_NAME (new)))
- fprintf_filtered (stream, "%s = ", SYMBOL_SOURCE_NAME (new));
- else
- fprintf_filtered (stream, "<builtin> = ");
- type_print (type, "", stream, 0);
- break;
+#ifdef _LANG_chill /* OBSOLETE */
+ /* OBSOLETE case language_chill: */
+ /* OBSOLETE fprintf_filtered (stream, "SYNMODE "); */
+ /* OBSOLETE if (!TYPE_NAME (SYMBOL_TYPE (new)) || */
+ /* OBSOLETE !STREQ (TYPE_NAME (SYMBOL_TYPE (new)), SYMBOL_NAME (new))) */
+ /* OBSOLETE fprintf_filtered (stream, "%s = ", SYMBOL_SOURCE_NAME (new)); */
+ /* OBSOLETE else */
+ /* OBSOLETE fprintf_filtered (stream, "<builtin> = "); */
+ /* OBSOLETE type_print (type, "", stream, 0); */
+ /* OBSOLETE break; */
#endif
default:
error ("Language not supported.");
return NULL;
return stdio_file_new (f, 1);
}
+
+/* ``struct ui_file'' implementation that maps onto two ui-file objects. */
+
+static ui_file_write_ftype tee_file_write;
+static ui_file_fputs_ftype tee_file_fputs;
+static ui_file_isatty_ftype tee_file_isatty;
+static ui_file_delete_ftype tee_file_delete;
+static ui_file_flush_ftype tee_file_flush;
+
+static int tee_file_magic;
+
+struct tee_file
+ {
+ int *magic;
+ struct ui_file *one, *two;
+ int close_one, close_two;
+ };
+
+struct ui_file *
+tee_file_new (struct ui_file *one, int close_one,
+ struct ui_file *two, int close_two)
+{
+ struct ui_file *ui_file = ui_file_new ();
+ struct tee_file *tee = xmalloc (sizeof (struct tee_file));
+ tee->magic = &tee_file_magic;
+ tee->one = one;
+ tee->two = two;
+ tee->close_one = close_one;
+ tee->close_two = close_two;
+ set_ui_file_data (ui_file, tee, tee_file_delete);
+ set_ui_file_flush (ui_file, tee_file_flush);
+ set_ui_file_write (ui_file, tee_file_write);
+ set_ui_file_fputs (ui_file, tee_file_fputs);
+ set_ui_file_isatty (ui_file, tee_file_isatty);
+ return ui_file;
+}
+
+static void
+tee_file_delete (struct ui_file *file)
+{
+ struct tee_file *tee = ui_file_data (file);
+ if (tee->magic != &tee_file_magic)
+ internal_error (__FILE__, __LINE__,
+ "tee_file_delete: bad magic number");
+ if (tee->close_one)
+ ui_file_delete (tee->one);
+ if (tee->close_two)
+ ui_file_delete (tee->two);
+
+ xfree (tee);
+}
+
+static void
+tee_file_flush (struct ui_file *file)
+{
+ struct tee_file *tee = ui_file_data (file);
+ if (tee->magic != &tee_file_magic)
+ internal_error (__FILE__, __LINE__,
+ "tee_file_flush: bad magic number");
+ tee->one->to_flush (tee->one);
+ tee->two->to_flush (tee->two);
+}
+
+static void
+tee_file_write (struct ui_file *file, const char *buf, long length_buf)
+{
+ struct tee_file *tee = ui_file_data (file);
+ if (tee->magic != &tee_file_magic)
+ internal_error (__FILE__, __LINE__,
+ "tee_file_write: bad magic number");
+ ui_file_write (tee->one, buf, length_buf);
+ ui_file_write (tee->two, buf, length_buf);
+}
+
+static void
+tee_file_fputs (const char *linebuffer, struct ui_file *file)
+{
+ struct tee_file *tee = ui_file_data (file);
+ if (tee->magic != &tee_file_magic)
+ internal_error (__FILE__, __LINE__,
+ "tee_file_fputs: bad magic number");
+ tee->one->to_fputs (linebuffer, tee->one);
+ tee->two->to_fputs (linebuffer, tee->two);
+}
+
+static int
+tee_file_isatty (struct ui_file *file)
+{
+ struct tee_file *tee = ui_file_data (file);
+ if (tee->magic != &tee_file_magic)
+ internal_error (__FILE__, __LINE__,
+ "tee_file_isatty: bad magic number");
+ return (0);
+}
/* Open NAME returning an STDIO based UI_FILE. */
extern struct ui_file *gdb_fopen (char *name, char *mode);
+/* Create a file which writes to both ONE and TWO. CLOSE_ONE
+ and CLOSE_TWO indicate whether the original files should be
+ closed when the new file is closed. */
+struct ui_file *tee_file_new (struct ui_file *one,
+ int close_one,
+ struct ui_file *two,
+ int close_two);
#endif
based on TARGET_ADDR_BIT. */
/* print_address_numeric (address, 1, local_stream); */
if (TARGET_ADDR_BIT <= 32)
- strcpy (addstr, local_hex_string_custom ((unsigned long) address, "08l"));
+ strcpy (addstr, local_hex_string_custom (address, "08l"));
else
- strcpy (addstr, local_hex_string_custom ((unsigned long) address, "016l"));
+ strcpy (addstr, local_hex_string_custom (address, "016l"));
ui_out_field_string (uiout, fldname, addstr);
}
/* Call readline, not gdb_readline, because GO32 readline handles control-C
whereas control-C to gdb_readline will cause the user to get dumped
out to DOS. */
- ignore = readline (cont_prompt);
+ ignore = gdb_readline_wrapper (cont_prompt);
if (annotation_level > 1)
printf_unfiltered ("\n\032\032post-prompt-for-continue\n");
case language_java:
demangled = cplus_demangle (name, arg_mode | DMGL_JAVA);
break;
- case language_chill:
- demangled = chill_demangle (name);
- break;
+#if 0
+ /* OBSOLETE case language_chill: */
+ /* OBSOLETE demangled = chill_demangle (name); */
+ /* OBSOLETE break; */
+#endif
default:
demangled = NULL;
break;
CORE_ADDR
host_pointer_to_address (void *ptr)
{
- if (sizeof (ptr) != TYPE_LENGTH (builtin_type_void_data_ptr))
- internal_error (__FILE__, __LINE__,
- "core_addr_to_void_ptr: bad cast");
+ gdb_assert (sizeof (ptr) == TYPE_LENGTH (builtin_type_void_data_ptr));
return POINTER_TO_ADDRESS (builtin_type_void_data_ptr, &ptr);
}
address_to_host_pointer (CORE_ADDR addr)
{
void *ptr;
- if (sizeof (ptr) != TYPE_LENGTH (builtin_type_void_data_ptr))
- internal_error (__FILE__, __LINE__,
- "core_addr_to_void_ptr: bad cast");
+
+ gdb_assert (sizeof (ptr) == TYPE_LENGTH (builtin_type_void_data_ptr));
ADDRESS_TO_POINTER (builtin_type_void_data_ptr, &ptr, addr);
return ptr;
}
#include "defs.h"
#include "frame.h"
#include "inferior.h"
-#include "obstack.h"
#include "target.h"
#include "value.h"
#include "bfd.h"
set_gdbarch_init_extra_frame_info (gdbarch, v850_init_extra_frame_info);
set_gdbarch_frame_init_saved_regs (gdbarch, v850_frame_init_saved_regs);
set_gdbarch_frame_chain (gdbarch, v850_frame_chain);
- set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
+ set_gdbarch_get_saved_register (gdbarch, generic_unwind_get_saved_register);
set_gdbarch_saved_pc_after_call (gdbarch, v850_saved_pc_after_call);
set_gdbarch_frame_saved_pc (gdbarch, v850_frame_saved_pc);
set_gdbarch_skip_prologue (gdbarch, v850_skip_prologue);
/* Integral operations here. */
/* FIXME: Also mixed integral/booleans, with result an integer. */
/* FIXME: This implements ANSI C rules (also correct for C++).
- What about FORTRAN and chill? */
+ What about FORTRAN and (OBSOLETE) chill ? */
{
unsigned int promoted_len1 = TYPE_LENGTH (type1);
unsigned int promoted_len2 = TYPE_LENGTH (type2);
case BINOP_MOD:
/* Knuth 1.2.4, integer only. Note that unlike the C '%' op,
v1 mod 0 has a defined value, v1. */
- /* Chill specifies that v2 must be > 0, so check for that. */
- if (current_language->la_language == language_chill
- && value_as_long (arg2) <= 0)
- {
- error ("Second operand of MOD must be greater than zero.");
- }
+ /* OBSOLETE Chill specifies that v2 must be > 0, so check for that. */
+ /* OBSOLETE if (current_language->la_language == language_chill */
+ /* OBSOLETE && value_as_long (arg2) <= 0) */
+ /* OBSOLETE { */
+ /* OBSOLETE error ("Second operand of MOD must be greater than zero."); */
+ /* OBSOLETE } */
if (v2 == 0)
{
v = v1;
case BINOP_MOD:
/* Knuth 1.2.4, integer only. Note that unlike the C '%' op,
X mod 0 has a defined value, X. */
- /* Chill specifies that v2 must be > 0, so check for that. */
- if (current_language->la_language == language_chill
- && v2 <= 0)
- {
- error ("Second operand of MOD must be greater than zero.");
- }
+ /* OBSOLETE Chill specifies that v2 must be > 0, so check for that. */
+ /* OBSOLETE if (current_language->la_language == language_chill */
+ /* OBSOLETE && v2 <= 0) */
+ /* OBSOLETE { */
+ /* OBSOLETE error ("Second operand of MOD must be greater than zero."); */
+ /* OBSOLETE } */
if (v2 == 0)
{
v = v1;
return value_from_double (result_type, -value_as_double (arg1));
else if (TYPE_CODE (type) == TYPE_CODE_INT || TYPE_CODE (type) == TYPE_CODE_BOOL)
{
- /* Perform integral promotion for ANSI C/C++.
- FIXME: What about FORTRAN and chill ? */
+ /* Perform integral promotion for ANSI C/C++. FIXME: What about
+ FORTRAN and (OBSOLETE) chill ? */
if (TYPE_LENGTH (type) < TYPE_LENGTH (builtin_type_int))
result_type = builtin_type_int;
VALUE_POINTED_TO_OFFSET (arg2) = 0; /* pai: chk_val */
return arg2;
}
- else if (chill_varying_type (type))
- {
- struct type *range1, *range2, *eltype1, *eltype2;
- struct value *val;
- int count1, count2;
- LONGEST low_bound, high_bound;
- char *valaddr, *valaddr_data;
- /* For lint warning about eltype2 possibly uninitialized: */
- eltype2 = NULL;
- if (code2 == TYPE_CODE_BITSTRING)
- error ("not implemented: converting bitstring to varying type");
- if ((code2 != TYPE_CODE_ARRAY && code2 != TYPE_CODE_STRING)
- || (eltype1 = check_typedef (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 1))),
- eltype2 = check_typedef (TYPE_TARGET_TYPE (type2)),
- (TYPE_LENGTH (eltype1) != TYPE_LENGTH (eltype2)
- /* || TYPE_CODE (eltype1) != TYPE_CODE (eltype2) */ )))
- error ("Invalid conversion to varying type");
- range1 = TYPE_FIELD_TYPE (TYPE_FIELD_TYPE (type, 1), 0);
- range2 = TYPE_FIELD_TYPE (type2, 0);
- if (get_discrete_bounds (range1, &low_bound, &high_bound) < 0)
- count1 = -1;
- else
- count1 = high_bound - low_bound + 1;
- if (get_discrete_bounds (range2, &low_bound, &high_bound) < 0)
- count1 = -1, count2 = 0; /* To force error before */
- else
- count2 = high_bound - low_bound + 1;
- if (count2 > count1)
- error ("target varying type is too small");
- val = allocate_value (type);
- valaddr = VALUE_CONTENTS_RAW (val);
- valaddr_data = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8;
- /* Set val's __var_length field to count2. */
- store_signed_integer (valaddr, TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)),
- count2);
- /* Set the __var_data field to count2 elements copied from arg2. */
- memcpy (valaddr_data, VALUE_CONTENTS (arg2),
- count2 * TYPE_LENGTH (eltype2));
- /* Zero the rest of the __var_data field of val. */
- memset (valaddr_data + count2 * TYPE_LENGTH (eltype2), '\0',
- (count1 - count2) * TYPE_LENGTH (eltype2));
- return val;
- }
+ /* OBSOLETE else if (chill_varying_type (type)) */
+ /* OBSOLETE { */
+ /* OBSOLETE struct type *range1, *range2, *eltype1, *eltype2; */
+ /* OBSOLETE struct value *val; */
+ /* OBSOLETE int count1, count2; */
+ /* OBSOLETE LONGEST low_bound, high_bound; */
+ /* OBSOLETE char *valaddr, *valaddr_data; */
+ /* OBSOLETE *//* For lint warning about eltype2 possibly uninitialized: */
+ /* OBSOLETE eltype2 = NULL; */
+ /* OBSOLETE if (code2 == TYPE_CODE_BITSTRING) */
+ /* OBSOLETE error ("not implemented: converting bitstring to varying type"); */
+ /* OBSOLETE if ((code2 != TYPE_CODE_ARRAY && code2 != TYPE_CODE_STRING) */
+ /* OBSOLETE || (eltype1 = check_typedef (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 1))), */
+ /* OBSOLETE eltype2 = check_typedef (TYPE_TARGET_TYPE (type2)), */
+ /* OBSOLETE (TYPE_LENGTH (eltype1) != TYPE_LENGTH (eltype2) */
+ /* OBSOLETE *//*|| TYPE_CODE (eltype1) != TYPE_CODE (eltype2) *//* ))) */
+ /* OBSOLETE error ("Invalid conversion to varying type"); */
+ /* OBSOLETE range1 = TYPE_FIELD_TYPE (TYPE_FIELD_TYPE (type, 1), 0); */
+ /* OBSOLETE range2 = TYPE_FIELD_TYPE (type2, 0); */
+ /* OBSOLETE if (get_discrete_bounds (range1, &low_bound, &high_bound) < 0) */
+ /* OBSOLETE count1 = -1; */
+ /* OBSOLETE else */
+ /* OBSOLETE count1 = high_bound - low_bound + 1; */
+ /* OBSOLETE if (get_discrete_bounds (range2, &low_bound, &high_bound) < 0) */
+ /* OBSOLETE count1 = -1, count2 = 0; *//* To force error before */
+ /* OBSOLETE else */
+ /* OBSOLETE count2 = high_bound - low_bound + 1; */
+ /* OBSOLETE if (count2 > count1) */
+ /* OBSOLETE error ("target varying type is too small"); */
+ /* OBSOLETE val = allocate_value (type); */
+ /* OBSOLETE valaddr = VALUE_CONTENTS_RAW (val); */
+ /* OBSOLETE valaddr_data = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8; */
+ /* OBSOLETE *//* Set val's __var_length field to count2. */
+ /* OBSOLETE store_signed_integer (valaddr, TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)), */
+ /* OBSOLETE count2); */
+ /* OBSOLETE *//* Set the __var_data field to count2 elements copied from arg2. */
+ /* OBSOLETE memcpy (valaddr_data, VALUE_CONTENTS (arg2), */
+ /* OBSOLETE count2 * TYPE_LENGTH (eltype2)); */
+ /* OBSOLETE *//* Zero the rest of the __var_data field of val. */
+ /* OBSOLETE memset (valaddr_data + count2 * TYPE_LENGTH (eltype2), '\0', */
+ /* OBSOLETE (count1 - count2) * TYPE_LENGTH (eltype2)); */
+ /* OBSOLETE return val; */
+ /* OBSOLETE } */
else if (VALUE_LVAL (arg2) == lval_memory)
{
return value_at_lazy (type, VALUE_ADDRESS (arg2) + VALUE_OFFSET (arg2),
/* Look for a match through the fields of an anonymous union,
or anonymous struct. C++ provides anonymous unions.
- In the GNU Chill implementation of variant record types,
- each <alternative field> has an (anonymous) union type,
- each member of the union represents a <variant alternative>.
- Each <variant alternative> is represented as a struct,
- with a member for each <variant field>. */
+ In the GNU Chill (OBSOLETE) implementation of
+ variant record types, each <alternative field> has
+ an (anonymous) union type, each member of the union
+ represents a <variant alternative>. Each <variant
+ alternative> is represented as a struct, with a
+ member for each <variant field>. */
struct value *v;
int new_offset = offset;
- /* This is pretty gross. In G++, the offset in an anonymous
- union is relative to the beginning of the enclosing struct.
- In the GNU Chill implementation of variant records,
- the bitpos is zero in an anonymous union field, so we
- have to add the offset of the union here. */
+ /* This is pretty gross. In G++, the offset in an
+ anonymous union is relative to the beginning of the
+ enclosing struct. In the GNU Chill (OBSOLETE)
+ implementation of variant records, the bitpos is
+ zero in an anonymous union field, so we have to add
+ the offset of the union here. */
if (TYPE_CODE (field_type) == TYPE_CODE_STRUCT
|| (TYPE_NFIELDS (field_type) > 0
&& TYPE_FIELD_BITPOS (field_type, 0) == 0))
if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0)
error ("slice from bad array or bitstring");
if (lowbound < lowerbound || length < 0
- || lowbound + length - 1 > upperbound
- /* Chill allows zero-length strings but not arrays. */
- || (current_language->la_language == language_chill
- && length == 0 && TYPE_CODE (array_type) == TYPE_CODE_ARRAY))
+ || lowbound + length - 1 > upperbound)
+ /* OBSOLETE Chill allows zero-length strings but not arrays. */
+ /* OBSOLETE || (current_language->la_language == language_chill */
+ /* OBSOLETE && length == 0 && TYPE_CODE (array_type) == TYPE_CODE_ARRAY)) */
error ("slice out of range");
/* FIXME-type-allocation: need a way to free this type when we are
done with it. */
return slice;
}
-/* Assuming chill_varying_type (VARRAY) is true, return an equivalent
- value as a fixed-length array. */
+/* Assuming OBSOLETE chill_varying_type (VARRAY) is true, return an
+ equivalent value as a fixed-length array. */
struct value *
varying_to_slice (struct value *varray)
#include "gdbcore.h"
#include "gdbcmd.h"
#include "target.h"
-#include "obstack.h"
#include "language.h"
#include "annotate.h"
#include "valprint.h"
do { COERCE_ARRAY(arg); COERCE_ENUM(arg); } while (0)
#define COERCE_VARYING_ARRAY(arg, real_arg_type) \
-{ if (chill_varying_type (real_arg_type)) \
- arg = varying_to_slice (arg), real_arg_type = VALUE_TYPE (arg); }
+/* OBSOLETE { if (chill_varying_type (real_arg_type)) */ \
+/* OBSOLETE arg = varying_to_slice (arg), real_arg_type = VALUE_TYPE (arg); } */
/* If ARG is an enum, convert it to an integer. */
#include "language.h"
#include "wrapper.h"
#include "gdbcmd.h"
+#include "gdb_string.h"
#include <math.h>
#include "varobj.h"
-2002-07-22-cvs
+2002-08-09-cvs
#include "defs.h"
#include "frame.h"
-#include "obstack.h"
#include "symtab.h"
#include "gdbcmd.h"
#include "gdbtypes.h"
+2002-08-07 H.J. Lu <hjl@gnu.org>
+
+ * bfdlink.h (bfd_link_info): Add allow_undefined_version.
+ (bfd_elf_version_expr): Add symver and script.
+
+2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
+
+ * bfdlink.h (bfd_link_common_skip_ar_symbols): New enum.
+ (struct bfd_link_info): Add new field 'common_skip_ar_symbols'.
+
+2002-07-25 Richard Sandiford <rsandifo@redhat.com>
+
+ * opcode/mips.h (CPU_R2000): Remove.
+
2002-07-19 Denis Chertykov <denisc@overta.ru>
Matthew Green <mrg@redhat.com>
bfd_link_hash_warning /* Like indirect, but warn if referenced. */
};
+enum bfd_link_common_skip_ar_aymbols
+{
+ bfd_link_common_skip_none,
+ bfd_link_common_skip_text,
+ bfd_link_common_skip_data,
+ bfd_link_common_skip_all
+};
+
/* The linking routines use a hash table which uses this structure for
its elements. */
/* true if ok to have multiple definition. */
boolean allow_multiple_definition;
+ /* true if ok to have version with no definition. */
+ boolean allow_undefined_version;
+
/* Which symbols to strip. */
enum bfd_link_strip strip;
/* How many spare .dynamic DT_NULL entries should be added? */
unsigned int spare_dynamic_tags;
+
+ /* Criteria for skipping symbols when detemining
+ whether to include an object from an archive. */
+ enum bfd_link_common_skip_ar_aymbols common_skip_ar_aymbols;
};
/* This structures holds a set of callback functions. These are
const char *pattern;
/* Matching function. */
int (*match) PARAMS((struct bfd_elf_version_expr *, const char *));
+ /* Defined by ".symver". */
+ unsigned int symver: 1;
+ /* Defined by version script. */
+ unsigned int script : 1;
};
/* Version dependencies. */
+2002-07-29 Andrey Volkov <avolkov@transas.com>
+
+ * sim-h8300.h: Rename all enums from H8300_ to SIM_H8300_
+ prefix.
+
+2002-07-23 Andrey Volkov <avolkov@transas.com>
+
+ * sim-h8300.h: New file.
+
2002-07-17 Andrew Cagney <cagney@redhat.com>
* remote-sim.h: Update copyright.
/* CPU defines, use instead of hardcoding processor number. Keep this
in sync with bfd/archures.c in order for machine selection to work. */
#define CPU_UNKNOWN 0 /* Gas internal use. */
-#define CPU_R2000 2000
#define CPU_R3000 3000
#define CPU_R3900 3900
#define CPU_R4000 4000
+2002-08-07 DJ Delorie <dj@redhat.com>
+
+ * regex.c (re_error_msgid): Just use a simple array of strings.
+ (re_compile_pattern): Compensate.
+ (re_comp): Likewise.
+ (re_comp): Likewise.
+ (regerror): Likewise.
+
+2002-07-29 Neil Booth <neil@daikokuya.co.uk>
+
+ * cplus-dem.c (PREPEND_BLANK): Remove.
+
2002-07-10 Jason Merrill <jason@redhat.com>
* cp-demangle.c (demangle_identifier): Support extended Unicode
};
#define STRING_EMPTY(str) ((str) -> b == (str) -> p)
-#define PREPEND_BLANK(str) {if (!STRING_EMPTY(str)) \
- string_prepend(str, " ");}
#define APPEND_BLANK(str) {if (!STRING_EMPTY(str)) \
string_append(str, " ");}
#define LEN_STRING(str) ( (STRING_EMPTY(str))?0:((str)->p - (str)->b))
version 0.12.
(Implements POSIX draft P1003.2/D11.2, except for some of the
internationalization features.)
- Copyright (C) 1993-1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1993-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
POSIX doesn't require that we do anything for REG_NOERROR,
but why not be nice? */
-static const char re_error_msgid[] =
+static const char *re_error_msgid[] =
{
-# define REG_NOERROR_IDX 0
- gettext_noop ("Success") /* REG_NOERROR */
- "\0"
-# define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success")
- gettext_noop ("No match") /* REG_NOMATCH */
- "\0"
-# define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match")
- gettext_noop ("Invalid regular expression") /* REG_BADPAT */
- "\0"
-# define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression")
- gettext_noop ("Invalid collation character") /* REG_ECOLLATE */
- "\0"
-# define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character")
- gettext_noop ("Invalid character class name") /* REG_ECTYPE */
- "\0"
-# define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name")
- gettext_noop ("Trailing backslash") /* REG_EESCAPE */
- "\0"
-# define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash")
- gettext_noop ("Invalid back reference") /* REG_ESUBREG */
- "\0"
-# define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
- gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */
- "\0"
-# define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
- gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
- "\0"
-# define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
- gettext_noop ("Unmatched \\{") /* REG_EBRACE */
- "\0"
-# define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{")
- gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */
- "\0"
-# define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}")
- gettext_noop ("Invalid range end") /* REG_ERANGE */
- "\0"
-# define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end")
- gettext_noop ("Memory exhausted") /* REG_ESPACE */
- "\0"
-# define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted")
- gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */
- "\0"
-# define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression")
- gettext_noop ("Premature end of regular expression") /* REG_EEND */
- "\0"
-# define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression")
- gettext_noop ("Regular expression too big") /* REG_ESIZE */
- "\0"
-# define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big")
+ gettext_noop ("Success"), /* REG_NOERROR */
+ gettext_noop ("No match"), /* REG_NOMATCH */
+ gettext_noop ("Invalid regular expression"), /* REG_BADPAT */
+ gettext_noop ("Invalid collation character"), /* REG_ECOLLATE */
+ gettext_noop ("Invalid character class name"), /* REG_ECTYPE */
+ gettext_noop ("Trailing backslash"), /* REG_EESCAPE */
+ gettext_noop ("Invalid back reference"), /* REG_ESUBREG */
+ gettext_noop ("Unmatched [ or [^"), /* REG_EBRACK */
+ gettext_noop ("Unmatched ( or \\("), /* REG_EPAREN */
+ gettext_noop ("Unmatched \\{"), /* REG_EBRACE */
+ gettext_noop ("Invalid content of \\{\\}"), /* REG_BADBR */
+ gettext_noop ("Invalid range end"), /* REG_ERANGE */
+ gettext_noop ("Memory exhausted"), /* REG_ESPACE */
+ gettext_noop ("Invalid preceding regular expression"), /* REG_BADRPT */
+ gettext_noop ("Premature end of regular expression"), /* REG_EEND */
+ gettext_noop ("Regular expression too big"), /* REG_ESIZE */
gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
};
-
-static const size_t re_error_msgid_idx[] =
- {
- REG_NOERROR_IDX,
- REG_NOMATCH_IDX,
- REG_BADPAT_IDX,
- REG_ECOLLATE_IDX,
- REG_ECTYPE_IDX,
- REG_EESCAPE_IDX,
- REG_ESUBREG_IDX,
- REG_EBRACK_IDX,
- REG_EPAREN_IDX,
- REG_EBRACE_IDX,
- REG_BADBR_IDX,
- REG_ERANGE_IDX,
- REG_ESPACE_IDX,
- REG_BADRPT_IDX,
- REG_EEND_IDX,
- REG_ESIZE_IDX,
- REG_ERPAREN_IDX
- };
\f
#endif /* INSIDE_RECURSION */
if (!ret)
return NULL;
- return gettext (re_error_msgid + re_error_msgid_idx[(int) ret]);
+ return gettext (re_error_msgid[(int) ret]);
}
#ifdef _LIBC
weak_alias (__re_compile_pattern, re_compile_pattern)
{
re_comp_buf.buffer = (unsigned char *) malloc (200);
if (re_comp_buf.buffer == NULL)
- return (char *) gettext (re_error_msgid
- + re_error_msgid_idx[(int) REG_ESPACE]);
+ return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
re_comp_buf.allocated = 200;
re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
if (re_comp_buf.fastmap == NULL)
- return (char *) gettext (re_error_msgid
- + re_error_msgid_idx[(int) REG_ESPACE]);
+ return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
}
/* Since `re_exec' always passes NULL for the `regs' argument, we
return NULL;
/* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
- return (char *) gettext (re_error_msgid + re_error_msgid_idx[(int) ret]);
+ return (char *) gettext (re_error_msgid[(int) ret]);
}
size_t msg_size;
if (errcode < 0
- || errcode >= (int) (sizeof (re_error_msgid_idx)
- / sizeof (re_error_msgid_idx[0])))
+ || errcode >= (int) (sizeof (re_error_msgid)
+ / sizeof (re_error_msgid[0])))
/* Only error codes returned by the rest of the code should be passed
to this routine. If we are given anything else, or if other regex
code generates an invalid error code, then the program has a bug.
Dump core so we can fix it. */
abort ();
- msg = gettext (re_error_msgid + re_error_msgid_idx[errcode]);
+ msg = gettext (re_error_msgid[errcode]);
msg_size = strlen (msg) + 1; /* Includes the null. */
+2002-08-09 Nick Clifton <nickc@redhat.com>
+
+ * po/sv.po: Updated Swedish translation.
+
+2002-08-08 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * mips-opc.c (mips_builtin_opcodes): Remove "dla" and "la" as
+ aliases to "daddiu" and "addiu".
+
+2002-07-30 Nick Clifton <nickc@redhat.com>
+
+ * po/sv.po: Updated Swedish translation.
+
+2002-07-25 Nick Clifton <nickc@redhat.com>
+
+ * po/sv.po: Updated Swedish translation.
+ * po/es.po: Updated Spanish translation.
+ * po/pr_BR.po: Updated Brazilian Portuguese translation.
+ * po/tr.po: Updated Turkish translation.
+ * po/fr.po: Updated French translation.
+
+2002-07-24 Nick Clifton <nickc@redhat.com>
+
+ * po/sv.po: Updated Swedish translation.
+ * po/es.po: Updated Spanish translation.
+ * po/pr_BR.po: Updated Brazilian Portuguese translation.
+
+2002-07-23 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2002-07-23 Nick Clifton <nickc@redhat.com>
+
+ * po/fr.po: Updated French translation.
+ * po/pr_BR.po: New Brazilian Portuguese translation.
+ * po/id.po: Updated Indonesian translation.
+ * configure.in (LINGUAS): Add pr_BR.
+ * configure: Regenerate.
+
2002-07-18 Denis Chertykov <denisc@overta.ru>
Frank Ch. Eigler <fche@redhat.com>
Alan Lehotsky <alehotsky@cygnus.com>
* arc-dis.c: Use #include "" instead of <> for local header files.
* m68k-dis.c: Likewise.
-Wed May 22 20:11:51 2002 J"orn Rennecke <joern.rennecke@superh.com>
+2002-05-22 J"orn Rennecke <joern.rennecke@superh.com>
* Makefile.am (sh-dis.lo): Compile with @archdefs@.
* Makefile.in: regenerate.
* mips-opc.c (mips_builtin_opcodes): Add drol, dror macros.
-Fri May 17 14:26:44 2002 J"orn Rennecke <joern.rennecke@superh.com>
+2002-05-17 J"orn Rennecke <joern.rennecke@superh.com>
* disassemble.c (disassembler): Just use print_insn_sh for bfd_arch_sh.
* sh-dis.c (LITTLE_BIT): Delete.
* ppc-opc.c: Add optional field to mtmsrd.
(MTMSRD_L, XRLARB_MASK): Define.
-Mon Mar 18 21:10:43 CET 2002 Jan Hubicka <jh@suse.cz>
+2002-03-18 Jan Hubicka <jh@suse.cz>
* i386-dis.c (prefix_name): Fix handling of 32bit address prefix
in 64bit mode.
* ia64-ic.tbl: Update from Intel. Add setf to fr-writers.
* ia64-asmtab.c: Regenerate.
-Mon Feb 12 17:41:26 CET 2001 Jan Hubicka <jh@suse.cz>
+2001-02-12 Jan Hubicka <jh@suse.cz>
* i386-dis.c (prefix_user_t): Add 'Y' to SSE ineger converison
instructions.
* fr30-desc.h: Regenerate with CGEN_MAX_SYNTAX_ELEMENTS.
* m32r-desc.h: Regenerate.
-Thu Feb 1 16:29:06 MET 2001 Jan Hubicka <jh@suse.cz>
+2001-02-01 Jan Hubicka <jh@suse.cz>
* i386-dis.c (dis386_att, grps): Use 'T' for push/pop
(putop): Handle 'T', alphabetize order, fix 'I' handling in Intel syntax
* disassemble.c: Remove spurious white space.
-Sat Jan 13 01:48:24 MET 2001 Jan Hubicka <jh@suse.cz>
+2001-01-13 Jan Hubicka <jh@suse.cz>
* i386-dis.c (dis386_att, disx86_64_att): Fix ret, lret and iret
templates.
fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
fr30-opc.h $(INCDIR)/libiberty.h
-frv-asm.lo: frv-asm.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
-frv-desc.lo: frv-desc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
+frv-asm.lo: frv-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+ frv-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+ frv-opc.h opintl.h $(INCDIR)/libiberty.h
+frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
$(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
-frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
- frv-opc.h opintl.h
-frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
- frv-opc.h opintl.h
-frv-opc.lo: frv-opc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h
+frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
+frv-opc.lo: frv-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+ frv-opc.h $(INCDIR)/libiberty.h $(INCDIR)/elf/frv.h \
+ $(INCDIR)/elf/reloc-macros.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/symcat.h opintl.h
ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
ia64-asmtab.lo: ia64-asmtab.c
-ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h ip2k-desc.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
-ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h ip2k-desc.h \
+ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+ ip2k-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+ ip2k-opc.h opintl.h $(INCDIR)/libiberty.h
+ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
$(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
-ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h opintl.h
-ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h opintl.h
-ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h ip2k-desc.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h
+ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
+ $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+ ip2k-opc.h $(INCDIR)/libiberty.h
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
fr30-opc.h $(INCDIR)/libiberty.h
-frv-asm.lo: frv-asm.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
-frv-desc.lo: frv-desc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
+frv-asm.lo: frv-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+ frv-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+ frv-opc.h opintl.h $(INCDIR)/libiberty.h
+frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
$(INCDIR)/opcode/cgen.h frv-opc.h opintl.h
-frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
- frv-opc.h opintl.h
-frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
- frv-opc.h opintl.h
-frv-opc.lo: frv-opc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h frv-desc.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h
+frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
+ $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
+frv-opc.lo: frv-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen.h \
+ frv-opc.h $(INCDIR)/libiberty.h $(INCDIR)/elf/frv.h \
+ $(INCDIR)/elf/reloc-macros.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/symcat.h opintl.h
ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
ia64-asmtab.lo: ia64-asmtab.c
-ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h ip2k-desc.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
-ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h ip2k-desc.h \
+ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+ ip2k-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+ ip2k-opc.h opintl.h $(INCDIR)/libiberty.h
+ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
$(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h
-ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h opintl.h
-ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/dis-asm.h \
- $(BFD_H) $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h opintl.h
-ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h ip2k-desc.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h
+ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
+ $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen.h \
+ ip2k-opc.h $(INCDIR)/libiberty.h
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
fi
-ALL_LINGUAS="fr sv tr es da de id"
+ALL_LINGUAS="fr sv tr es da de id pt_BR"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:2631: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
AC_PROG_CC
-ALL_LINGUAS="fr sv tr es da de id"
+ALL_LINGUAS="fr sv tr es da de id pt_BR"
CY_GNU_GETTEXT
. ${srcdir}/../bfd/configure.host
{"divu", "z,t", 0x0000001b, 0xffe0ffff, RD_s|RD_t|WR_HILO, I1 },
{"divu", "d,v,t", 0, (int) M_DIVU_3, INSN_MACRO, I1 },
{"divu", "d,v,I", 0, (int) M_DIVU_3I, INSN_MACRO, I1 },
-{"dla", "t,o(b)", 0x64000000, 0xfc000000, WR_t|RD_s, I3 }, /* daddiu */
{"dla", "t,A(b)", 0, (int) M_DLA_AB, INSN_MACRO, I3 },
{"dli", "t,j", 0x24000000, 0xffe00000, WR_t, I3 }, /* addiu */
{"dli", "t,i", 0x34000000, 0xffe00000, WR_t, I3 }, /* ori */
will match first). */
{"jal", "a", 0x0c000000, 0xfc000000, UBD|WR_31, I1 },
{"jalx", "a", 0x74000000, 0xfc000000, UBD|WR_31, I16 },
-{"la", "t,o(b)", 0x24000000, 0xfc000000, WR_t|RD_s, I1 }, /* addiu */
{"la", "t,A(b)", 0, (int) M_LA_AB, INSN_MACRO, I1 },
{"lb", "t,o(b)", 0x80000000, 0xfc000000, LDD|RD_b|WR_t, I1 },
{"lb", "t,A(b)", 0, (int) M_LB_AB, INSN_MACRO, I1 },
ia64-opc-m.c
ia64-opc.c
ia64-opc.h
+ip2k-asm.c
+ip2k-desc.c
+ip2k-desc.h
+ip2k-dis.c
+ip2k-ibld.c
+ip2k-opc.c
+ip2k-opc.h
m10200-dis.c
m10200-opc.c
m10300-dis.c
-# Mensajes en español para opcodes-2.12-pre020121
+# Mensajes en español para opcodes-2.12.91
# Copyright (C) 2002 Free Software Foundation, Inc.
# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2002.
#
msgid ""
msgstr ""
-"Project-Id-Version: opcodes 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 13:58+0000\n"
-"PO-Revision-Date: 2002-01-24 08:55-0600\n"
+"Project-Id-Version: opcodes 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-24 02:03-0500\n"
"Last-Translator: Cristian Othón Martínez Vera <cfuga@itam.mx>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
msgid "Illegal limm reference in last instruction!\n"
msgstr "¡Referencia limm ilegal en la última instrucción!\n"
-#: arm-dis.c:509
+#: arm-dis.c:507
msgid "<illegal precision>"
msgstr "<precisión ilegal>"
-#: arm-dis.c:1019
+#: arm-dis.c:1010
#, c-format
msgid "Unrecognised register name set: %s\n"
msgstr "Conjunto de nombres de registro no reconocido: %s\n"
-#: arm-dis.c:1026
+#: arm-dis.c:1017
#, c-format
msgid "Unrecognised disassembler option: %s\n"
msgstr "Opción de desensamblador no reconocida: %s\n"
-#: arm-dis.c:1198
+#: arm-dis.c:1191
msgid ""
"\n"
"The following ARM specific disassembler options are supported for use with\n"
msgid "unknown constraint `%c'"
msgstr "restricción `%c' desconocida"
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
+#: openrisc-ibld.c:195 xstormy16-ibld.c:195
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
msgstr "operando fuera de rango (%ld no está entre %ld y %ld)"
msgid "Address 0x%x is out of bounds.\n"
msgstr "La dirección 0x%x está fuera de los límites.\n"
-#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
+#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
+#: xstormy16-asm.c:231
#, c-format
msgid "Unrecognized field %d while parsing.\n"
msgstr "No se reconoció el campo %d durante la decodificación.\n"
-#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
+#: xstormy16-asm.c:281
msgid "missing mnemonic in syntax string"
msgstr "falta el mnemónico en la cadena sintáctica"
#. We couldn't parse it.
-#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512
-#: m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431
-#: openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
+#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
+#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
msgid "unrecognized instruction"
msgstr "instrucción no reconocida"
-#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
+#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
+#: xstormy16-asm.c:464
#, c-format
msgid "syntax error (expected char `%c', found `%c')"
msgstr "error sintáctico (se esperaba el carácter `%c', se encontró `%c')"
-#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
+#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
+#: xstormy16-asm.c:474
#, c-format
msgid "syntax error (expected char `%c', found end of instruction)"
msgstr "error sintáctico (se esperaba el carácter `%c', se encontró el final de la instrucción)"
-#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
+#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
+#: xstormy16-asm.c:502
msgid "junk at end of line"
msgstr "basura al final de la línea"
-#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
+#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
+#: xstormy16-asm.c:609
msgid "unrecognized form of instruction"
msgstr "forma de instrucción no reconocida"
-#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
+#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
+#: xstormy16-asm.c:621
#, c-format
msgid "bad instruction `%.50s...'"
msgstr "instrucción errónea `%.50s...'"
-#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
+#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
+#: xstormy16-asm.c:624
#, c-format
msgid "bad instruction `%.50s'"
msgstr "instrucción errónea `%.50s'"
#. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: xstormy16-dis.c:39
msgid "*unknown*"
msgstr "*desconocida*"
-#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
+#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
+#: xstormy16-dis.c:169
#, c-format
msgid "Unrecognized field %d while printing insn.\n"
msgstr "No se reconoció el campo %d al mostrar insn.\n"
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: xstormy16-ibld.c:166
#, c-format
msgid "operand out of range (%ld not between %ld and %lu)"
msgstr "operando fuera de rango (%ld no está entre %ld y %lu)"
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: xstormy16-ibld.c:179
#, c-format
msgid "operand out of range (%lu not between 0 and %lu)"
msgstr "operando fuera de rango (%lu no está entre 0 y %lu)"
-#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
+#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
+#: xstormy16-ibld.c:678
#, c-format
msgid "Unrecognized field %d while building insn.\n"
msgstr "No se reconoció el campo %d al construir insn.\n"
-#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
+#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
+#: xstormy16-ibld.c:826
#, c-format
msgid "Unrecognized field %d while decoding insn.\n"
msgstr "No se reconoció el campo %d al decodificar insn.\n"
-#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
+#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
+#: xstormy16-ibld.c:939
#, c-format
msgid "Unrecognized field %d while getting int operand.\n"
msgstr "No se reconoció el campo %d al obtener el operando int.\n"
-#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
+#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
+#: xstormy16-ibld.c:1032
#, c-format
msgid "Unrecognized field %d while getting vma operand.\n"
msgstr "No se reconoció el campo %d al obtener el operando vma.\n"
-#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
+#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
+#: xstormy16-ibld.c:1134
#, c-format
msgid "Unrecognized field %d while setting int operand.\n"
msgstr "No se reconoció el campo %d al establecer el operando int.\n"
-#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
+#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
+#: xstormy16-ibld.c:1224
#, c-format
msgid "Unrecognized field %d while setting vma operand.\n"
msgstr "No se reconoció el campo %d al establecer el operando vma.\n"
-#: h8300-dis.c:384
+#: h8300-dis.c:385
#, c-format
msgid "Hmmmm %x"
msgstr "Hmmmm %x"
-#: h8300-dis.c:395
+#: h8300-dis.c:396
#, c-format
msgid "Don't understand %x \n"
msgstr "No se entiende %x \n"
msgid "# <dis error: %08x>"
msgstr "# <error de desensamblador: %08x>"
-#: mips-dis.c:290
+#: mips-dis.c:337
#, c-format
msgid "# internal error, undefined modifier(%c)"
msgstr "# error interno, modificador(%c) sin definir"
-#: mips-dis.c:1154
+#: mips-dis.c:1209
#, c-format
msgid "# internal disassembler error, unrecognised modifier (%c)"
msgstr "# error interno del desensamblador, modificador (%c) no reconocido"
msgid "$<undefined>"
msgstr "$<sin definir>"
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:777 ppc-opc.c:810
msgid "invalid conditional option"
msgstr "opción condicional inválida"
-#: ppc-opc.c:800
+#: ppc-opc.c:812
msgid "attempt to set y bit when using + or - modifier"
msgstr "intento de establecer el bit y cuando se usaba el modificador + ó -"
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:844 ppc-opc.c:896
msgid "offset not a multiple of 4"
msgstr "el desplazamiento no es un múltiplo de 4"
-#: ppc-opc.c:857
+#: ppc-opc.c:869
msgid "offset not between -2048 and 2047"
msgstr "el desplazamiento no está entre -2048 y 2047"
-#: ppc-opc.c:882
+#: ppc-opc.c:894
msgid "offset not between -8192 and 8191"
msgstr "el desplazamiento no está entre -8192 y 8191"
-#: ppc-opc.c:910
+#: ppc-opc.c:922
msgid "ignoring least significant bits in branch offset"
msgstr "ignorando los bits menos significativos en el desplazamiento de la rama"
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:956 ppc-opc.c:993
msgid "illegal bitmask"
msgstr "máscara de bits ilegal"
-#: ppc-opc.c:1054
+#: ppc-opc.c:1066
msgid "value out of range"
msgstr "valor fuera de rango"
-#: ppc-opc.c:1130
+#: ppc-opc.c:1142
msgid "index register in load range"
msgstr "registro índice en el rango de carga"
-#: ppc-opc.c:1146
+#: ppc-opc.c:1158
msgid "invalid register operand when updating"
msgstr "operando de registro inválido mientras se actualizaba"
#. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
msgid "unknown"
msgstr "desconocida"
-#: sparc-dis.c:824
+#: sparc-dis.c:825
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr "Error interno: sparc-opcode.h erróneo: \"%s\", %#.8lx, %#.8lx\n"
-#: sparc-dis.c:835
+#: sparc-dis.c:836
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr "Error interno: sparc-opcode.h erróneo: \"%s\", %#.8lx, %#.8lx\n"
-#: sparc-dis.c:884
+#: sparc-dis.c:885
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
msgstr "Error interno: sparc-opcode.h erróneo: \"%s\" == \"%s\"\n"
msgid "immediate value must be even"
msgstr "el valor inmediato debe ser par"
+#: xstormy16-asm.c:74
+msgid "Bad register in preincrement"
+msgstr "Registro erróneo en el preincremento"
+
+#: xstormy16-asm.c:79
+msgid "Bad register in postincrement"
+msgstr "Registro erróneo en el postincremento"
+
+#: xstormy16-asm.c:81
+msgid "Bad register name"
+msgstr "Nombre de registro erróneo"
+
+#: xstormy16-asm.c:85
+msgid "Label conflicts with register name"
+msgstr "La etiqueta tiene conflictos con el nombre de registro"
+
+#: xstormy16-asm.c:89
+msgid "Label conflicts with `Rx'"
+msgstr "La etiqueta tiene conflictos con `Rx'"
+
+#: xstormy16-asm.c:91
+msgid "Bad immediate expression"
+msgstr "Expresión inmediata errónea"
+
+#: xstormy16-asm.c:120
+msgid "Small operand was not an immediate number"
+msgstr "El operando small no era un número inmediato"
+
#~ msgid "unrecognized keyword/register name"
#~ msgstr "nombre clave/de registro no reconocido"
# Messages français pour opcodes.
-# Copyright (C) 1996 Free Software Foundation, Inc.
-# Michel Robitaille <robitail@IRO.UMontreal.CA>, 1996.
+# Copyright © 1996 Free Software Foundation, Inc.
+# Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996.
#
msgid ""
msgstr ""
-"Project-Id-Version: opcodes 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 13:58+0000\n"
-"PO-Revision-Date: 2002-03-17 20:00-0500\n"
+"Project-Id-Version: opcodes 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-24 08:00-0500\n"
"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
"Language-Team: French <traduc@traduc.org>\n"
"MIME-Version: 1.0\n"
msgid "Illegal limm reference in last instruction!\n"
msgstr "Référence limite illégale dans la dernière instruction!\n"
-#: arm-dis.c:509
+#: arm-dis.c:507
msgid "<illegal precision>"
msgstr "<précision illégale>"
-#: arm-dis.c:1019
+#: arm-dis.c:1010
#, c-format
msgid "Unrecognised register name set: %s\n"
msgstr "Nom de jeu de registres inconnu: %s\n"
-#: arm-dis.c:1026
+#: arm-dis.c:1017
#, c-format
msgid "Unrecognised disassembler option: %s\n"
msgstr "Option du désassembleur non reconnue: %s\n"
-#: arm-dis.c:1198
+#: arm-dis.c:1191
msgid ""
"\n"
"The following ARM specific disassembler options are supported for use with\n"
msgid "unknown constraint `%c'"
msgstr "contrainte inconnue « %c »"
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
+#: openrisc-ibld.c:195 xstormy16-ibld.c:195
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
msgstr "opérande hors gamme (%ld n'est pas entre %ld et %ld)"
msgid "Address 0x%x is out of bounds.\n"
msgstr "Adresse 0x%x est hors gamme.\n"
-#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
+#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
+#: xstormy16-asm.c:231
#, c-format
msgid "Unrecognized field %d while parsing.\n"
msgstr "Champ non reconnu %d lors de l'analyse.\n"
-#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
+#: xstormy16-asm.c:281
msgid "missing mnemonic in syntax string"
msgstr "mnémonique manquante dans la syntaxe de la chaîne"
#. We couldn't parse it.
-#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512 m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431 openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
+#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
+#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
msgid "unrecognized instruction"
msgstr "instruction non reconnue"
-#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
+#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
+#: xstormy16-asm.c:464
#, c-format
msgid "syntax error (expected char `%c', found `%c')"
msgstr "erreur de syntaxe (caractère « %c » attendu, « %c » obtenu)"
-#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
+#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
+#: xstormy16-asm.c:474
#, c-format
msgid "syntax error (expected char `%c', found end of instruction)"
msgstr "erreur de syntaxe (caractère « %c » attendu, fin de l'instruction obtenue)"
-#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
+#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
+#: xstormy16-asm.c:502
msgid "junk at end of line"
msgstr "rebut à la fin de la ligne"
-#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
+#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
+#: xstormy16-asm.c:609
msgid "unrecognized form of instruction"
msgstr "forme d'instruction non reconnue"
-#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
+#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
+#: xstormy16-asm.c:621
#, c-format
msgid "bad instruction `%.50s...'"
msgstr "instruction erronée « %.50s... »"
-#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
+#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
+#: xstormy16-asm.c:624
#, c-format
msgid "bad instruction `%.50s'"
msgstr "instruction erronée « %.50s »"
#. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: xstormy16-dis.c:39
msgid "*unknown*"
msgstr "*inconnu*"
-#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
+#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
+#: xstormy16-dis.c:169
#, c-format
msgid "Unrecognized field %d while printing insn.\n"
msgstr "Champ non reconnu %d lors de l'impression insn.\n"
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: xstormy16-ibld.c:166
#, c-format
msgid "operand out of range (%ld not between %ld and %lu)"
msgstr "opérande hors gamme (%ld n'est pas entre %ld et %lu)"
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: xstormy16-ibld.c:179
#, c-format
msgid "operand out of range (%lu not between 0 and %lu)"
msgstr "opérande hors gamme (%lu n'est pas entre 0 et %lu)"
-#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
+#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
+#: xstormy16-ibld.c:678
#, c-format
msgid "Unrecognized field %d while building insn.\n"
msgstr "Champ non reconnu %d lors de la construction de insn.\n"
-#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
+#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
+#: xstormy16-ibld.c:826
#, c-format
msgid "Unrecognized field %d while decoding insn.\n"
msgstr "Champ non reconnu %d lors du décodage de insn.\n"
-#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
+#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
+#: xstormy16-ibld.c:939
#, c-format
msgid "Unrecognized field %d while getting int operand.\n"
msgstr "Champ non reconnu %d lors de la prise d'une opérande int.\n"
-#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
+#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
+#: xstormy16-ibld.c:1032
#, c-format
msgid "Unrecognized field %d while getting vma operand.\n"
msgstr "Champ non reconnu %d lors de la prise d'une opérande vma.\n"
-#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
+#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
+#: xstormy16-ibld.c:1134
#, c-format
msgid "Unrecognized field %d while setting int operand.\n"
msgstr "Champ non reconnu %d lors de l'initialisation d'une opérande int.\n"
-#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
+#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
+#: xstormy16-ibld.c:1224
#, c-format
msgid "Unrecognized field %d while setting vma operand.\n"
msgstr "Champ non reconnu %d lors de l'initialisation d'une opérande vma.\n"
# h8300-dis.c:380Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
-#: h8300-dis.c:384
+#: h8300-dis.c:385
#, c-format
msgid "Hmmmm %x"
msgstr "Hummm %x"
-#: h8300-dis.c:395
+#: h8300-dis.c:396
#, c-format
msgid "Don't understand %x \n"
msgstr "Ne comprend pas %x \n"
msgid "# <dis error: %08x>"
msgstr "# <erreur du désassembleur: %08x>"
-#: mips-dis.c:290
+#: mips-dis.c:337
#, c-format
msgid "# internal error, undefined modifier(%c)"
msgstr "# erreur interne, modificateur non défini(%c)"
-#: mips-dis.c:1154
+#: mips-dis.c:1209
#, c-format
msgid "# internal disassembler error, unrecognised modifier (%c)"
msgstr "# erreur interne du déssassembleur, modificateur non reconnu(%c)"
msgid "$<undefined>"
msgstr "$<non défini>"
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:777 ppc-opc.c:810
msgid "invalid conditional option"
msgstr "option conditionnelle invalide"
-#: ppc-opc.c:800
+#: ppc-opc.c:812
msgid "attempt to set y bit when using + or - modifier"
msgstr "tentative d'initialisation du bit y lorsque le modificateur + ou - a été utilisé"
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:844 ppc-opc.c:896
msgid "offset not a multiple of 4"
msgstr "décalage n'est pas un multiple de 4"
-#: ppc-opc.c:857
+#: ppc-opc.c:869
msgid "offset not between -2048 and 2047"
msgstr "décalage n'est pas entre -2048 et 2047"
-#: ppc-opc.c:882
+#: ppc-opc.c:894
msgid "offset not between -8192 and 8191"
msgstr "décalage n'est pas entre -8192 et 8191"
-#: ppc-opc.c:910
+#: ppc-opc.c:922
msgid "ignoring least significant bits in branch offset"
msgstr "Les derniers bits les moins significatifs sont ignorés dans le décalage de branchement"
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:956 ppc-opc.c:993
msgid "illegal bitmask"
msgstr "masque de bits illégal"
-#: ppc-opc.c:1054
+#: ppc-opc.c:1066
msgid "value out of range"
msgstr "valeur hors gamme"
-#: ppc-opc.c:1130
+#: ppc-opc.c:1142
msgid "index register in load range"
msgstr "registre index n'est pas dans la plage de chargement"
-#: ppc-opc.c:1146
+#: ppc-opc.c:1158
msgid "invalid register operand when updating"
msgstr "opérande registre invalide lors de la mise à jour"
#. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
msgid "unknown"
msgstr "inconnu"
-#: sparc-dis.c:824
+#: sparc-dis.c:825
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr "Erreur interne: sparc-opcode.h erroné: « %s », %#.8lx, %#.8lx\n"
-#: sparc-dis.c:835
+#: sparc-dis.c:836
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr "Erreur interne: sparc-opcode.h erroné: « %s », %#.8lx, %#.8lx\n"
-#: sparc-dis.c:884
+#: sparc-dis.c:885
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
msgstr "Erreur interne: sparc-opcode.h erroné: « %s » == « %s »\n"
#: v850-opc.c:69
msgid "displacement value is out of range"
-msgstr "La valeur de déplacement est hors gamme."
+msgstr "valeur de déplacement est hors gamme"
#: v850-opc.c:70
msgid "displacement value is not aligned"
-msgstr "La valeur de déplacement n'est pas alignée."
+msgstr "valeur de déplacement n'est pas alignée"
#: v850-opc.c:72
msgid "immediate value is out of range"
-msgstr "La valeur immédiate est hors gamme."
+msgstr "valeur immédiate est hors gamme"
#: v850-opc.c:83
msgid "branch value not in range and to odd offset"
-msgstr "Valeur de branchement est hors gamme et a un décalage impair."
+msgstr "valeur de branchement est hors gamme et a un décalage impair"
#: v850-opc.c:85 v850-opc.c:117
msgid "branch value out of range"
-msgstr "Valeur de branchement hors gamme."
+msgstr "valeur de branchement hors gamme"
#: v850-opc.c:88 v850-opc.c:120
msgid "branch to odd offset"
-msgstr "Branchement avec un décalage impair."
+msgstr "Branchement avec un décalage impair"
#: v850-opc.c:115
msgid "branch value not in range and to an odd offset"
-msgstr "Valeur de branchement est hors gamme et a un décalage impair"
+msgstr "valeur de branchement est hors gamme et a un décalage impair"
#: v850-opc.c:346
msgid "invalid register for stack adjustment"
#: v850-opc.c:370
msgid "immediate value not in range and not even"
-msgstr "La valeur immédiate est hors gamme et est impaire."
+msgstr "valeur immédiate est hors gamme et est impaire"
#: v850-opc.c:375
msgid "immediate value must be even"
-msgstr "La valeur immédiate doit être paire."
+msgstr "valeur immédiate doit être paire"
+
+#: xstormy16-asm.c:74
+msgid "Bad register in preincrement"
+msgstr "Registre erroné dans un préincrément"
+
+#: xstormy16-asm.c:79
+msgid "Bad register in postincrement"
+msgstr "Registre erroné dans un postincrément"
+
+#: xstormy16-asm.c:81
+msgid "Bad register name"
+msgstr "Nom erroné de registre"
+
+#: xstormy16-asm.c:85
+msgid "Label conflicts with register name"
+msgstr "Conflits d'étiquette avec le nom de registre"
+
+#: xstormy16-asm.c:89
+msgid "Label conflicts with `Rx'"
+msgstr "Conflit d'étiquette avec « Rx »"
+
+#: xstormy16-asm.c:91
+msgid "Bad immediate expression"
+msgstr "Expression immédiate erronée"
+
+#: xstormy16-asm.c:120
+msgid "Small operand was not an immediate number"
+msgstr "Petite opérande n'était pas un nombre immédiat"
#~ msgid "unrecognized keyword/register name"
#~ msgstr "nom de mot clé ou de registre non reconnu"
-# opcodes 2.12-pre020121 (Indonesian)
+# opcodes 2.12.1 (Indonesian)
# Copyright (C) 2002 Free Software Foundation, Inc.
# Tedi Heriyanto <tedi_h@gmx.net>, 2002.
#
msgid ""
msgstr ""
-"Project-Id-Version: opcodes 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 13:58+0000\n"
-"PO-Revision-Date: 2002-04-02 08:20GMT+0700\n"
+"Project-Id-Version: opcodes 2.12.1\n"
+"POT-Creation-Date: 2002-02-08 03:24-0200\n"
+"PO-Revision-Date: 2002-07-23 12:35GMT+0700\n"
"Last-Translator: Tedi Heriyanto <tedi_h@gmx.net>\n"
"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
msgid "Illegal limm reference in last instruction!\n"
msgstr "referensi limm ilegal dalam instruksi terakhir!\n"
-#: arm-dis.c:509
+#: arm-dis.c:502
msgid "<illegal precision>"
msgstr "<presisi ilegal>"
-#: arm-dis.c:1019
+#: arm-dis.c:1012
#, c-format
msgid "Unrecognised register name set: %s\n"
msgstr "Set nama register tidak dikenal: %s\n"
-#: arm-dis.c:1026
+#: arm-dis.c:1019
#, c-format
msgid "Unrecognised disassembler option: %s\n"
msgstr "Option disasembler tidak dikenal: %s\n"
-#: arm-dis.c:1198
+#: arm-dis.c:1191
msgid ""
"\n"
"The following ARM specific disassembler options are supported for use with\n"
msgid "unknown constraint `%c'"
msgstr "konstrain tidak dikenal `%c'"
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
msgstr "operand keluar batas (%ld tidak antara %ld dan %ld)"
msgid "Address 0x%x is out of bounds.\n"
msgstr "Alamat 0x%x di luar batas.\n"
-#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
+#: fr30-asm.c:323 m32r-asm.c:325 openrisc-asm.c:244 xstormy16-asm.c:231
#, c-format
msgid "Unrecognized field %d while parsing.\n"
msgstr "Field tidak dikenal %d saat parsing.\n"
-#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+#: fr30-asm.c:373 m32r-asm.c:375 openrisc-asm.c:294 xstormy16-asm.c:281
msgid "missing mnemonic in syntax string"
msgstr "mnemonik hilang dalam string sintaks"
#. We couldn't parse it.
-#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512 m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431 openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 m32r-asm.c:511 m32r-asm.c:515 m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434 openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417 xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
msgid "unrecognized instruction"
msgstr "instruksti tidak dikenal"
-#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
+#: fr30-asm.c:556 m32r-asm.c:558 openrisc-asm.c:477 xstormy16-asm.c:464
#, c-format
msgid "syntax error (expected char `%c', found `%c')"
msgstr "kesalahan sintaks (diharapkan karakter `%c', ditemukan `%c')"
-#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
+#: fr30-asm.c:566 m32r-asm.c:568 openrisc-asm.c:487 xstormy16-asm.c:474
#, c-format
msgid "syntax error (expected char `%c', found end of instruction)"
msgstr "kesalahan sintaks (diharapkan karakter `%c', ditemukan akhir instruksi)"
-#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
+#: fr30-asm.c:594 m32r-asm.c:596 openrisc-asm.c:515 xstormy16-asm.c:502
msgid "junk at end of line"
msgstr "sampah di akhir baris"
-#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
+#: fr30-asm.c:701 m32r-asm.c:703 openrisc-asm.c:622 xstormy16-asm.c:609
msgid "unrecognized form of instruction"
msgstr "bentuk instruksi tidak dikenal"
-#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
+#: fr30-asm.c:713 m32r-asm.c:715 openrisc-asm.c:634 xstormy16-asm.c:621
#, c-format
msgid "bad instruction `%.50s...'"
msgstr "instruksi buruk `%.50s...'"
-#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
+#: fr30-asm.c:716 m32r-asm.c:718 openrisc-asm.c:637 xstormy16-asm.c:624
#, c-format
msgid "bad instruction `%.50s'"
msgstr "instruksi buruk `%.50s'"
#. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39 xstormy16-dis.c:39
msgid "*unknown*"
msgstr "*tidak dikenal*"
-#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
+#: fr30-dis.c:318 m32r-dis.c:249 openrisc-dis.c:136 xstormy16-dis.c:169
#, c-format
msgid "Unrecognized field %d while printing insn.\n"
msgstr "Field tidak dikenal %d saat mencetak insn.\n"
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
#, c-format
msgid "operand out of range (%ld not between %ld and %lu)"
msgstr "operand di luar batas (%ld tidak antara %ld dan %lu)"
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
#, c-format
msgid "operand out of range (%lu not between 0 and %lu)"
msgstr "operand di luar batas (%lu tidak antara 0 dan %lu)"
-#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
+#: fr30-ibld.c:730 m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
#, c-format
msgid "Unrecognized field %d while building insn.\n"
msgstr "Field tidak dikenal %d saat membuild insn.\n"
-#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
+#: fr30-ibld.c:937 m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
#, c-format
msgid "Unrecognized field %d while decoding insn.\n"
msgstr "Field tidak dikenal %d saat mendekode insn.\n"
-#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
+#: fr30-ibld.c:1086 m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
#, c-format
msgid "Unrecognized field %d while getting int operand.\n"
msgstr "Field tidak dikenal %d saat memperoleh operand int.\n"
-#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
+#: fr30-ibld.c:1215 m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
#, c-format
msgid "Unrecognized field %d while getting vma operand.\n"
msgstr "Field tidak dikenal %d saat memperoleh operand vma.\n"
-#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
+#: fr30-ibld.c:1349 m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
#, c-format
msgid "Unrecognized field %d while setting int operand.\n"
msgstr "Field tidak dikenal %d saat menset operand int.\n"
-#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
+#: fr30-ibld.c:1471 m32r-ibld.c:1176 openrisc-ibld.c:1001 xstormy16-ibld.c:1224
#, c-format
msgid "Unrecognized field %d while setting vma operand.\n"
msgstr "Field tidak dikenal %d saat menset operand vma.\n"
msgstr "operand register tidak valid saat mengupdate"
#. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
msgid "unknown"
msgstr "tidak dikenal"
-#: sparc-dis.c:824
+#: sparc-dis.c:825
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr "Kesalahan internal: sparc-opcode.h buruk: \"%s\", %#.8lx, %#.8lx\n"
-#: sparc-dis.c:835
+#: sparc-dis.c:836
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr "Kesalahan internal: sparc-opcode.h buruk: \"%s\", %#.8lx, %#.8lx\n"
-#: sparc-dis.c:884
+#: sparc-dis.c:885
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
msgstr "Kesalahan internal: sparc-opcode.h buruk: \"%s\" == \"%s\"\n"
#: v850-opc.c:375
msgid "immediate value must be even"
msgstr "nilai langsung harus genap"
+
+#: xstormy16-asm.c:74
+msgid "Bad register in preincrement"
+msgstr "register buruk dalam preinkremen"
+
+#: xstormy16-asm.c:79
+msgid "Bad register in postincrement"
+msgstr "Register buruk dalam pascainkremen"
+
+#: xstormy16-asm.c:81
+msgid "Bad register name"
+msgstr "Nama register buruk"
+
+#: xstormy16-asm.c:85
+msgid "Label conflicts with register name"
+msgstr "Label konflik dengan nama register"
+
+#: xstormy16-asm.c:89
+msgid "Label conflicts with `Rx'"
+msgstr "Label konflik dengan `Rx'"
+
+#: xstormy16-asm.c:91
+msgid "Bad immediate expression"
+msgstr "Ekspresi langsung yang buruk"
+
+#: xstormy16-asm.c:120
+msgid "Small operand was not an immediate number"
+msgstr "Operand kecil bukan sebuah angka immediate"
# Swedish messages for opcodes.
-# Copyright (C) 2001 Free Software Foundation, Inc.
-# Christian Rose <menthos@menthos.com>, 2001.
+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Christian Rose <menthos@menthos.com>, 2001, 2002.
#
msgid ""
msgstr ""
-"Project-Id-Version: opcodes 2.11\n"
-"POT-Creation-Date: 2002-01-31 17:10+0000\n"
-"PO-Revision-Date: 2001-10-23 15:35+0200\n"
+"Project-Id-Version: opcodes 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-08-03 13:19+0200\n"
"Last-Translator: Christian Rose <menthos@menthos.com>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
msgid "Illegal limm reference in last instruction!\n"
msgstr "Otillåten limm-referens i sista instruktionen!\n"
-#: arm-dis.c:502
+#: arm-dis.c:507
msgid "<illegal precision>"
msgstr "<otillåten precision>"
-#: arm-dis.c:1012
+#: arm-dis.c:1010
#, c-format
msgid "Unrecognised register name set: %s\n"
msgstr "Okänt registernamn är angivet: %s\n"
-#: arm-dis.c:1019
+#: arm-dis.c:1017
#, c-format
msgid "Unrecognised disassembler option: %s\n"
msgstr "Okänt disassembleralternativ: %s\n"
msgid "unknown constraint `%c'"
msgstr "okänd begränsning \"%c\""
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
-#: xstormy16-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
+#: openrisc-ibld.c:195 xstormy16-ibld.c:195
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
msgstr "operanden är utanför intervallet (%ld är inte mellan %ld och %ld)"
msgid "Address 0x%x is out of bounds.\n"
msgstr "Adressen 0x%x ligger utanför tillåtna gränser.\n"
-#: fr30-asm.c:323 m32r-asm.c:325 openrisc-asm.c:244 xstormy16-asm.c:231
+#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
+#: xstormy16-asm.c:231
#, c-format
msgid "Unrecognized field %d while parsing.\n"
msgstr "Okänt fält %d vid tolkning.\n"
-#: fr30-asm.c:373 m32r-asm.c:375 openrisc-asm.c:294 xstormy16-asm.c:281
+#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
+#: xstormy16-asm.c:281
msgid "missing mnemonic in syntax string"
-msgstr ""
+msgstr "instruktion saknas i syntaxsträng"
#. We couldn't parse it.
-#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 m32r-asm.c:511
-#: m32r-asm.c:515 m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430
-#: openrisc-asm.c:434 openrisc-asm.c:521 openrisc-asm.c:623
-#: xstormy16-asm.c:417 xstormy16-asm.c:421 xstormy16-asm.c:508
-#: xstormy16-asm.c:610
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
+#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
+#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
msgid "unrecognized instruction"
msgstr "okänd instruktion"
-#: fr30-asm.c:556 m32r-asm.c:558 openrisc-asm.c:477 xstormy16-asm.c:464
+#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
+#: xstormy16-asm.c:464
#, c-format
msgid "syntax error (expected char `%c', found `%c')"
msgstr "syntaxfel (tecknet \"%c\" förväntades, hittade \"%c\")"
-#: fr30-asm.c:566 m32r-asm.c:568 openrisc-asm.c:487 xstormy16-asm.c:474
-#, fuzzy, c-format
+#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
+#: xstormy16-asm.c:474
+#, c-format
msgid "syntax error (expected char `%c', found end of instruction)"
-msgstr "syntaxfel (tecknet \"%c\" förväntades, hittade \"%c\")"
+msgstr "syntaxfel (tecknet \"%c\" förväntades, hittade slutet på instruktion)"
-#: fr30-asm.c:594 m32r-asm.c:596 openrisc-asm.c:515 xstormy16-asm.c:502
+#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
+#: xstormy16-asm.c:502
msgid "junk at end of line"
msgstr "skräp vid slutet på raden"
-#: fr30-asm.c:701 m32r-asm.c:703 openrisc-asm.c:622 xstormy16-asm.c:609
-#, fuzzy
+#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
+#: xstormy16-asm.c:609
msgid "unrecognized form of instruction"
-msgstr "okänd instruktion"
+msgstr "okänd instruktionsform"
-#: fr30-asm.c:713 m32r-asm.c:715 openrisc-asm.c:634 xstormy16-asm.c:621
+#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
+#: xstormy16-asm.c:621
#, c-format
msgid "bad instruction `%.50s...'"
msgstr "felaktig instruktion \"%.50s...\""
-#: fr30-asm.c:716 m32r-asm.c:718 openrisc-asm.c:637 xstormy16-asm.c:624
+#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
+#: xstormy16-asm.c:624
#, c-format
msgid "bad instruction `%.50s'"
msgstr "felaktig instruktion \"%.50s\""
#. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
#: xstormy16-dis.c:39
msgid "*unknown*"
msgstr "*okänd*"
-#: fr30-dis.c:318 m32r-dis.c:249 openrisc-dis.c:136 xstormy16-dis.c:169
+#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
+#: xstormy16-dis.c:169
#, c-format
msgid "Unrecognized field %d while printing insn.\n"
msgstr "Okänt fält %d vid utskrift av instruktion.\n"
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
-#, fuzzy, c-format
+#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: xstormy16-ibld.c:166
+#, c-format
msgid "operand out of range (%ld not between %ld and %lu)"
-msgstr "operanden är utanför intervallet (%ld är inte mellan %ld och %ld)"
+msgstr "operanden är utanför intervallet (%ld är inte mellan %ld och %lu)"
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: xstormy16-ibld.c:179
#, c-format
msgid "operand out of range (%lu not between 0 and %lu)"
msgstr "operanden utanför intervallet (%lu inte mellan 0 och %lu)"
-#: fr30-ibld.c:730 m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
+#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
+#: xstormy16-ibld.c:678
#, c-format
msgid "Unrecognized field %d while building insn.\n"
msgstr "Okänt fält %d vid konstruktion av instruktion.\n"
-#: fr30-ibld.c:937 m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
+#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
+#: xstormy16-ibld.c:826
#, c-format
msgid "Unrecognized field %d while decoding insn.\n"
msgstr "Okänt fält %d vid avkodning av instruktion.\n"
-#: fr30-ibld.c:1086 m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
+#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
+#: xstormy16-ibld.c:939
#, c-format
msgid "Unrecognized field %d while getting int operand.\n"
msgstr "Okänt fält %d vid hämtning av heltalsoperand.\n"
-#: fr30-ibld.c:1215 m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
+#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
+#: xstormy16-ibld.c:1032
#, c-format
msgid "Unrecognized field %d while getting vma operand.\n"
msgstr "Okänt fält %d vid hämtning av vma-operand.\n"
-#: fr30-ibld.c:1349 m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
+#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
+#: xstormy16-ibld.c:1134
#, c-format
msgid "Unrecognized field %d while setting int operand.\n"
msgstr "Okänt fält %d vid inställning av heltalsoperand.\n"
-#: fr30-ibld.c:1471 m32r-ibld.c:1176 openrisc-ibld.c:1001
+#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
#: xstormy16-ibld.c:1224
#, c-format
msgid "Unrecognized field %d while setting vma operand.\n"
msgstr "Okänt fält %d vid inställning av vma-operand.\n"
-#: h8300-dis.c:384
+#: h8300-dis.c:385
#, c-format
msgid "Hmmmm %x"
msgstr "Hmmmm %x"
-#: h8300-dis.c:395
+#: h8300-dis.c:396
#, c-format
msgid "Don't understand %x \n"
msgstr "Förstår inte %x \n"
msgid "# <dis error: %08x>"
msgstr "# <disassemblerarfel: %08x>"
-#: mips-dis.c:290
+#: mips-dis.c:337
#, c-format
msgid "# internal error, undefined modifier(%c)"
msgstr "# internt fel, okänd modifierare(%c)"
-#: mips-dis.c:1154
-#, fuzzy, c-format
+#: mips-dis.c:1209
+#, c-format
msgid "# internal disassembler error, unrecognised modifier (%c)"
-msgstr "# internt fel, okänd modifierare(%c)"
+msgstr "# internt disassemblerfel, okänd modifierare (%c)"
#: mmix-dis.c:34
#, c-format
msgid "Bad case %d (%s) in %s:%d\n"
-msgstr ""
+msgstr "Felaktigt fall %d (%s) i %s:%d\n"
#: mmix-dis.c:44
#, c-format
msgid "Internal: Non-debugged code (test-case missing): %s:%d"
-msgstr ""
+msgstr "Internt: Ej felsökt kod (testfall saknas): %s:%d"
#: mmix-dis.c:53
-#, fuzzy
msgid "(unknown)"
-msgstr "okänd"
+msgstr "(okänd)"
#: mmix-dis.c:517
-#, fuzzy, c-format
+#, c-format
msgid "*unknown operands type: %d*"
-msgstr "okänt operandskifte: %x\n"
+msgstr "*okänd operandtyp: %d*"
#. I and Z are output operands and can`t be immediate
#. * A is an address and we can`t have the address of
msgid "$<undefined>"
msgstr "$<odefinierad>"
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:777 ppc-opc.c:810
msgid "invalid conditional option"
msgstr "ogiltig villkorlig flagga"
-#: ppc-opc.c:800
+#: ppc-opc.c:812
msgid "attempt to set y bit when using + or - modifier"
msgstr "försök att ställa in y-biten då modifieraren + eller - användes"
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:844 ppc-opc.c:896
msgid "offset not a multiple of 4"
-msgstr ""
+msgstr "avståndet är inte en multipel av 4"
-#: ppc-opc.c:857
+#: ppc-opc.c:869
msgid "offset not between -2048 and 2047"
-msgstr ""
+msgstr "avståndet är inte mellan -2048 och 2047"
-#: ppc-opc.c:882
+#: ppc-opc.c:894
msgid "offset not between -8192 and 8191"
-msgstr ""
+msgstr "avståndet är inte mellan -8192 och 8191"
-#: ppc-opc.c:910
+#: ppc-opc.c:922
msgid "ignoring least significant bits in branch offset"
msgstr "ignorerar minst signifikanta bitarna i grenavstånd"
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:956 ppc-opc.c:993
msgid "illegal bitmask"
msgstr "otillåten bitmask"
-#: ppc-opc.c:1054
+#: ppc-opc.c:1066
msgid "value out of range"
msgstr "värdet är utanför intervallet"
-#: ppc-opc.c:1130
+#: ppc-opc.c:1142
msgid "index register in load range"
msgstr "indexregistret är i inläsningsintervallet"
-#: ppc-opc.c:1146
+#: ppc-opc.c:1158
msgid "invalid register operand when updating"
msgstr "ogiltig registeroperand vid uppdatering"
#. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
msgid "unknown"
msgstr "okänd"
-#: sparc-dis.c:824
+#: sparc-dis.c:825
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr "Internt fel: felaktig sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
-#: sparc-dis.c:835
+#: sparc-dis.c:836
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr "Internt fel: felaktig sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
-#: sparc-dis.c:884
+#: sparc-dis.c:885
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
msgstr "Internt fel: felaktig sparc-opcode.h: \"%s\" == \"%s\"\n"
#. specific command line option is given to GAS.
#: v850-opc.c:68
msgid "displacement value is not in range and is not aligned"
-msgstr ""
-"förskjutningsvärdet är inte inom intervallet och ligger inte på jämn gräns"
+msgstr "förskjutningsvärdet är inte inom intervallet och ligger inte på jämn gräns"
#: v850-opc.c:69
msgid "displacement value is out of range"
msgstr "omedelbara värdet måste vara jämnt"
#: xstormy16-asm.c:74
-#, fuzzy
msgid "Bad register in preincrement"
-msgstr "indexregistret är i inläsningsintervallet"
+msgstr "Felaktigt register i förhandsökning"
#: xstormy16-asm.c:79
-#, fuzzy
msgid "Bad register in postincrement"
-msgstr "ogiltigt register för stackjustering"
+msgstr "Felaktigt register i efterhandsökning"
#: xstormy16-asm.c:81
-#, fuzzy
msgid "Bad register name"
-msgstr "indexregistret är i inläsningsintervallet"
+msgstr "Felaktigt registernamn"
#: xstormy16-asm.c:85
msgid "Label conflicts with register name"
-msgstr ""
+msgstr "Etiketten är i konflikt med registernamn"
#: xstormy16-asm.c:89
msgid "Label conflicts with `Rx'"
-msgstr ""
+msgstr "Etiketten är i konflikt med \"Rx\""
#: xstormy16-asm.c:91
msgid "Bad immediate expression"
-msgstr ""
+msgstr "Felaktigt omedelbart uttryck"
#: xstormy16-asm.c:120
msgid "Small operand was not an immediate number"
-msgstr ""
+msgstr "Liten operand var inte ett omedelbart tal"
#~ msgid "unrecognized keyword/register name"
#~ msgstr "okänt namn på nyckelord/register"
#
msgid ""
msgstr ""
-"Project-Id-Version: opcodes 2.12-pre020121\n"
-"POT-Creation-Date: 2002-01-17 13:58+0000\n"
-"PO-Revision-Date: 2002-02-17 11:26EET\n"
+"Project-Id-Version: opcodes 2.12.91\n"
+"POT-Creation-Date: 2002-07-23 15:55-0400\n"
+"PO-Revision-Date: 2002-07-24 11:26EET\n"
"Last-Translator: Deniz Akkus Kanca <deniz@arayan.com>\n"
"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
msgid "Illegal limm reference in last instruction!\n"
msgstr "Son işlemde geçersiz limm referansı!\n"
-#: arm-dis.c:509
+#: arm-dis.c:507
msgid "<illegal precision>"
msgstr "<geçersiz kesinlik>"
-#: arm-dis.c:1019
+#: arm-dis.c:1010
#, c-format
msgid "Unrecognised register name set: %s\n"
msgstr "Bilinmeyen yazmaç ad kümesi: %s\n"
-#: arm-dis.c:1026
+#: arm-dis.c:1017
#, c-format
msgid "Unrecognised disassembler option: %s\n"
msgstr "Bilinmeyen karşıt-çevirici seçeneği: %s\n"
-#: arm-dis.c:1198
+#: arm-dis.c:1191
msgid ""
"\n"
"The following ARM specific disassembler options are supported for use with\n"
msgid "unknown constraint `%c'"
msgstr "`%c' bilinmeyen kısıtı"
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
+#: cgen-asm.c:346 fr30-ibld.c:195 frv-ibld.c:195 m32r-ibld.c:195
+#: openrisc-ibld.c:195 xstormy16-ibld.c:195
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
msgstr "Kapsam dışı terim (%ld, %ld ve %ld arasında değil) "
msgid "Address 0x%x is out of bounds.\n"
msgstr "0x%x adresi sınırların dışında.\n"
-#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
+#: fr30-asm.c:323 frv-asm.c:595 m32r-asm.c:325 openrisc-asm.c:244
+#: xstormy16-asm.c:231
#, c-format
msgid "Unrecognized field %d while parsing.\n"
msgstr "Ayrıştırma esnasında bilinmeyen alan %d bulundu.\n"
-#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+#: fr30-asm.c:373 frv-asm.c:645 m32r-asm.c:375 openrisc-asm.c:294
+#: xstormy16-asm.c:281
msgid "missing mnemonic in syntax string"
msgstr "biçem dizgesinde ipucu eksik"
#. We couldn't parse it.
-#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512
-#: m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431
-#: openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:781
+#: frv-asm.c:785 frv-asm.c:872 frv-asm.c:974 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:417
+#: xstormy16-asm.c:421 xstormy16-asm.c:508 xstormy16-asm.c:610
msgid "unrecognized instruction"
msgstr "bilinmeyen işlem"
-#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
+#: fr30-asm.c:556 frv-asm.c:828 m32r-asm.c:558 openrisc-asm.c:477
+#: xstormy16-asm.c:464
#, c-format
msgid "syntax error (expected char `%c', found `%c')"
msgstr "biçem hatası (char `%c' beklenirken `%c' bulundu)"
-#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
+#: fr30-asm.c:566 frv-asm.c:838 m32r-asm.c:568 openrisc-asm.c:487
+#: xstormy16-asm.c:474
#, c-format
msgid "syntax error (expected char `%c', found end of instruction)"
msgstr "biçem hatası (char `%c' beklenirken işlem sonu bulundu)"
-#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
+#: fr30-asm.c:594 frv-asm.c:866 m32r-asm.c:596 openrisc-asm.c:515
+#: xstormy16-asm.c:502
msgid "junk at end of line"
msgstr "Satır sonu bozuk "
-#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
+#: fr30-asm.c:701 frv-asm.c:973 m32r-asm.c:703 openrisc-asm.c:622
+#: xstormy16-asm.c:609
msgid "unrecognized form of instruction"
msgstr "bilinmeyen işlem türü"
-#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
+#: fr30-asm.c:713 frv-asm.c:985 m32r-asm.c:715 openrisc-asm.c:634
+#: xstormy16-asm.c:621
#, c-format
msgid "bad instruction `%.50s...'"
msgstr "geçersiz işlem `%.50s...'"
-#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
+#: fr30-asm.c:716 frv-asm.c:988 m32r-asm.c:718 openrisc-asm.c:637
+#: xstormy16-asm.c:624
#, c-format
msgid "bad instruction `%.50s'"
msgstr "geçersiz işlem `%.50s'"
#. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: fr30-dis.c:39 frv-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
+#: xstormy16-dis.c:39
msgid "*unknown*"
msgstr "*bilinmeyen*"
-#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
+#: fr30-dis.c:318 frv-dis.c:360 m32r-dis.c:249 openrisc-dis.c:136
+#: xstormy16-dis.c:169
#, c-format
msgid "Unrecognized field %d while printing insn.\n"
msgstr "yönerge yazdırılırken bilinmeyen alan %d bulundu.\n"
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#: xstormy16-ibld.c:166
#, c-format
msgid "operand out of range (%ld not between %ld and %lu)"
msgstr "Kapsam dışı işlenen (%ld, %ld ve %lu arasında değil) "
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
+#: xstormy16-ibld.c:179
#, c-format
msgid "operand out of range (%lu not between 0 and %lu)"
msgstr "kapsam dışı terim (%lu 0 ve %lu arasında değil) "
-#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
+#: fr30-ibld.c:730 frv-ibld.c:820 m32r-ibld.c:659 openrisc-ibld.c:633
+#: xstormy16-ibld.c:678
#, c-format
msgid "Unrecognized field %d while building insn.\n"
msgstr "Yönerge oluşturulurken bilinmeyen alan %d bulundu.\n"
-#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
+#: fr30-ibld.c:937 frv-ibld.c:1103 m32r-ibld.c:792 openrisc-ibld.c:735
+#: xstormy16-ibld.c:826
#, c-format
msgid "Unrecognized field %d while decoding insn.\n"
msgstr "Yönerge çözümlenirken bilinmeyen alan %d bulundu.\n"
-#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
+#: fr30-ibld.c:1086 frv-ibld.c:1348 m32r-ibld.c:902 openrisc-ibld.c:815
+#: xstormy16-ibld.c:939
#, c-format
msgid "Unrecognized field %d while getting int operand.\n"
msgstr "`int' terimi alınırken bilinmeyen alan %d bulundu.\n"
-#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
+#: fr30-ibld.c:1215 frv-ibld.c:1573 m32r-ibld.c:992 openrisc-ibld.c:875
+#: xstormy16-ibld.c:1032
#, c-format
msgid "Unrecognized field %d while getting vma operand.\n"
msgstr "`vma' terimi alınırken bilinmeyen alan %d bulundu.\n"
-#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
+#: fr30-ibld.c:1349 frv-ibld.c:1807 m32r-ibld.c:1090 openrisc-ibld.c:944
+#: xstormy16-ibld.c:1134
#, c-format
msgid "Unrecognized field %d while setting int operand.\n"
msgstr "`int' terimi atanırken bilinmeyen alan %d bulundu.\n"
-#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
+#: fr30-ibld.c:1471 frv-ibld.c:2029 m32r-ibld.c:1176 openrisc-ibld.c:1001
+#: xstormy16-ibld.c:1224
#, c-format
msgid "Unrecognized field %d while setting vma operand.\n"
msgstr "`vma' terimi atanırken bilinmeyen alan %d bulundu.\n"
-#: h8300-dis.c:384
+#: h8300-dis.c:385
#, c-format
msgid "Hmmmm %x"
msgstr "Hmmmm %x"
-#: h8300-dis.c:395
+#: h8300-dis.c:396
#, c-format
msgid "Don't understand %x \n"
msgstr "%x anlaşılamadı\n"
msgid "# <dis error: %08x>"
msgstr "# <`dis' hatası: %08x>"
-#: mips-dis.c:290
+#: mips-dis.c:337
#, c-format
msgid "# internal error, undefined modifier(%c)"
msgstr "#iç hata, tanımlanmamış değiştirici (%c)"
-#: mips-dis.c:1154
+#: mips-dis.c:1209
#, c-format
msgid "# internal disassembler error, unrecognised modifier (%c)"
msgstr "#iç karşıt-çevirici hatası, tanımlanmamış değiştirici (%c)"
msgid "$<undefined>"
msgstr "$<tanımlanmamış>"
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:777 ppc-opc.c:810
msgid "invalid conditional option"
msgstr "koşullu seçenek geçersiz "
-#: ppc-opc.c:800
+#: ppc-opc.c:812
msgid "attempt to set y bit when using + or - modifier"
msgstr "+ veya - değiştiricisini kullanırken y bitini atama denemesi"
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:844 ppc-opc.c:896
msgid "offset not a multiple of 4"
msgstr "görece 4'ün katı değil"
-#: ppc-opc.c:857
+#: ppc-opc.c:869
msgid "offset not between -2048 and 2047"
msgstr "görece -2048 ve 2047 arasında değil"
-#: ppc-opc.c:882
+#: ppc-opc.c:894
msgid "offset not between -8192 and 8191"
msgstr "görece -8192 ve 8191 arasında değil"
-#: ppc-opc.c:910
+#: ppc-opc.c:922
msgid "ignoring least significant bits in branch offset"
msgstr "Dal göreli konumunda en önemsiz bitler atlanıyor"
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:956 ppc-opc.c:993
msgid "illegal bitmask"
msgstr "geçersiz bitmask "
-#: ppc-opc.c:1054
+#: ppc-opc.c:1066
msgid "value out of range"
msgstr "değer aralık dışı"
-#: ppc-opc.c:1130
+#: ppc-opc.c:1142
msgid "index register in load range"
msgstr "yükleme aralığında endeks yazmacı"
-#: ppc-opc.c:1146
+#: ppc-opc.c:1158
msgid "invalid register operand when updating"
msgstr "güncelleme esnasında geçersiz yazmaç terimi bulundu"
#. Mark as non-valid instruction
-#: sparc-dis.c:749
+#: sparc-dis.c:750
msgid "unknown"
msgstr "bilinmeyen"
-#: sparc-dis.c:824
+#: sparc-dis.c:825
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr "İç hata: geçersiz sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
-#: sparc-dis.c:835
+#: sparc-dis.c:836
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr "İç hata: geçersiz sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
-#: sparc-dis.c:884
+#: sparc-dis.c:885
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
msgstr "İç hata: geçersiz sparc-opcode.h: \"%s\" == \"%s\"\n"
#: v850-opc.c:375
msgid "immediate value must be even"
msgstr "şimdiki değer çift sayı olmalı"
+
+#: xstormy16-asm.c:74
+msgid "Bad register in preincrement"
+msgstr "Arttırma öncesinde geçersiz yazmaç"
+
+#: xstormy16-asm.c:79
+msgid "Bad register in postincrement"
+msgstr "Arttırma sonrasında geçersiz yazmaç "
+
+#: xstormy16-asm.c:81
+msgid "Bad register name"
+msgstr "Geçersiz yazmaç adı"
+
+#: xstormy16-asm.c:85
+msgid "Label conflicts with register name"
+msgstr "Etiket, yazmaç adıyla çakışıyor"
+
+#: xstormy16-asm.c:89
+msgid "Label conflicts with `Rx'"
+msgstr "Etiket, `Rx' ile çakışıyor"
+
+#: xstormy16-asm.c:91
+msgid "Bad immediate expression"
+msgstr "Hatalı şimdiki ifade"
+
+#: xstormy16-asm.c:120
+msgid "Small operand was not an immediate number"
+msgstr "Küçük işlenen şimdiki sayı değil"
+2002-07-29 Andrey Volkov <avolkov@transas.com>
+
+ * compile.c: Include "gdb/sim-h8300.h"
+ * Makefile.in: Add dependences on "inst.h",
+ "gdb/callback.h", "gdb/remote-sim.h" and "gdb/sim-h8300.h".
+
2002-06-16 Andrew Cagney <ac131313@redhat.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
## COMMON_PRE_CONFIG_FRAG
SIM_OBJS = compile.o sim-load.o
-
## COMMON_POST_CONFIG_FRAG
-compile.o: compile.c config.h
+compile.o: compile.c inst.h config.h \
+ $(srcdir)/../../include/gdb/sim-h8300.h \
+ $(srcdir)/../../include/gdb/remote-sim.h \
+ $(srcdir)/../../include/gdb/callback.h
#include "bfd.h"
#include "gdb/callback.h"
#include "gdb/remote-sim.h"
+#include "gdb/sim-h8300.h"
#ifndef SIGTRAP
# define SIGTRAP 5
+2002-07-30 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.igen (do_load_double, do_store_double): New functions.
+ (LDC1, SDC1): Rename to...
+ (LDC1b, SDC1b): respectively.
+ (LDC1a, SDC1a): New instructions for MIPS II and MIPS32 support.
+
+2002-07-29 Michael Snyder <msnyder@redhat.com>
+
+ * cp1.c (fp_recip2): Modify initialization expression so that
+ GCC will recognize it as constant.
+
2002-06-18 Chris Demetriou <cgd@broadcom.com>
* mdmx.c (SD_): Delete.
{
static const unsigned64 one_single = UNSIGNED64 (0x3F800000);
static const unsigned64 one_double = UNSIGNED64 (0x3FF0000000000000);
- static const unsigned64 one_ps = (one_single << 32 | one_single);
+ static const unsigned64 one_ps = (UNSIGNED64 (0x3F800000) << 32 | UNSIGNED64 (0x3F800000));
unsigned64 one;
/* Implemented as nmsub fd, 1, fs, ft. */
{
static const unsigned64 half_single = UNSIGNED64 (0x3F000000);
static const unsigned64 half_double = UNSIGNED64 (0x3FE0000000000000);
- static const unsigned64 half_ps = (half_single << 32 | half_single);
+ static const unsigned64 half_ps = (UNSIGNED64 (0x3F000000) << 32 | UNSIGNED64 (0x3F000000));
unsigned64 half;
/* Implemented as (nmsub fd, 0.5, fs, ft)/2, where the divide is
}
+// Helper:
+//
+// Load a double word FP value using 2 32-bit memory cycles a la MIPS II
+// or MIPS32. do_load cannot be used instead because it returns an
+// unsigned_word, which is limited to the size of the machine's registers.
+//
+
+:function:::unsigned64:do_load_double:address_word base, address_word offset
+*mipsII:
+*mips32:
+{
+ int bigendian = (BigEndianCPU ? ! ReverseEndian : ReverseEndian);
+ address_word vaddr;
+ address_word paddr;
+ int uncached;
+ unsigned64 memval;
+ unsigned64 v;
+
+ vaddr = loadstore_ea (SD_, base, offset);
+ if ((vaddr & AccessLength_DOUBLEWORD) != 0)
+ {
+ SIM_CORE_SIGNAL (SD, STATE_CPU (SD, 0), cia, read_map,
+ AccessLength_DOUBLEWORD + 1, vaddr, read_transfer,
+ sim_core_unaligned_signal);
+ }
+ AddressTranslation (vaddr, isDATA, isLOAD, &paddr, &uncached, isTARGET,
+ isREAL);
+ LoadMemory (&memval, NULL, uncached, AccessLength_WORD, paddr, vaddr,
+ isDATA, isREAL);
+ v = (unsigned64)memval;
+ LoadMemory (&memval, NULL, uncached, AccessLength_WORD, paddr + 4, vaddr + 4,
+ isDATA, isREAL);
+ return (bigendian ? ((v << 32) | memval) : (v | (memval << 32)));
+}
+
+
+// Helper:
+//
+// Store a double word FP value using 2 32-bit memory cycles a la MIPS II
+// or MIPS32. do_load cannot be used instead because it returns an
+// unsigned_word, which is limited to the size of the machine's registers.
+//
+
+:function:::void:do_store_double:address_word base, address_word offset, unsigned64 v
+*mipsII:
+*mips32:
+{
+ int bigendian = (BigEndianCPU ? ! ReverseEndian : ReverseEndian);
+ address_word vaddr;
+ address_word paddr;
+ int uncached;
+ unsigned64 memval;
+
+ vaddr = loadstore_ea (SD_, base, offset);
+ if ((vaddr & AccessLength_DOUBLEWORD) != 0)
+ {
+ SIM_CORE_SIGNAL (SD, STATE_CPU(SD, 0), cia, read_map,
+ AccessLength_DOUBLEWORD + 1, vaddr, write_transfer,
+ sim_core_unaligned_signal);
+ }
+ AddressTranslation (vaddr, isDATA, isSTORE, &paddr, &uncached, isTARGET,
+ isREAL);
+ memval = (bigendian ? (v >> 32) : (v & 0xFFFFFFFF));
+ StoreMemory (uncached, AccessLength_WORD, memval, 0, paddr, vaddr,
+ isREAL);
+ memval = (bigendian ? (v & 0xFFFFFFFF) : (v >> 32));
+ StoreMemory (uncached, AccessLength_WORD, memval, 0, paddr + 4, vaddr + 4,
+ isREAL);
+}
+
+
010001,10,3.FMT,00000,5.FS,5.FD,000101:COP1:32,f::ABS.fmt
"abs.%s<FMT> f<FD>, f<FS>"
*mipsI:
}
-110101,5.BASE,5.FT,16.OFFSET:COP1:32,f::LDC1
+110101,5.BASE,5.FT,16.OFFSET:COP1:32,f::LDC1a
"ldc1 f<FT>, <OFFSET>(r<BASE>)"
*mipsII:
+*mips32:
+{
+ check_fpu (SD_);
+ COP_LD (1, FT, do_load_double (SD_, GPR[BASE], EXTEND16 (OFFSET)));
+}
+
+
+110101,5.BASE,5.FT,16.OFFSET:COP1:32,f::LDC1b
+"ldc1 f<FT>, <OFFSET>(r<BASE>)"
*mipsIII:
*mipsIV:
*mipsV:
-*mips32:
*mips64:
*vr4100:
*vr5000:
}
-111101,5.BASE,5.FT,16.OFFSET:COP1:32,f::SDC1
+111101,5.BASE,5.FT,16.OFFSET:COP1:32,f::SDC1a
"sdc1 f<FT>, <OFFSET>(r<BASE>)"
*mipsII:
+*mips32:
+{
+ check_fpu (SD_);
+ do_store_double (SD_, GPR[BASE], EXTEND16 (OFFSET), COP_SD (1, FT));
+}
+
+
+111101,5.BASE,5.FT,16.OFFSET:COP1:32,f::SDC1b
+"sdc1 f<FT>, <OFFSET>(r<BASE>)"
*mipsIII:
*mipsIV:
*mipsV:
-*mips32:
*mips64:
*vr4100:
*vr5000: