From owner-svn-src-projects@FreeBSD.ORG Tue Jun 2 19:15:18 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87D3CF44; Tue, 2 Jun 2015 19:15:18 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7026413E5; Tue, 2 Jun 2015 19:15:18 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t52JFI5C095754; Tue, 2 Jun 2015 19:15:18 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t52JFEXd095738; Tue, 2 Jun 2015 19:15:14 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201506021915.t52JFEXd095738@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 2 Jun 2015 19:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r283926 - in projects/em_mq: . bin/ps contrib/diff/src contrib/elftoolchain/common contrib/elftoolchain/elfcopy contrib/elftoolchain/libdwarf contrib/elftoolchain/libelftc contrib/elfto... X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2015 19:15:18 -0000 Author: sbruno Date: Tue Jun 2 19:15:13 2015 New Revision: 283926 URL: https://svnweb.freebsd.org/changeset/base/283926 Log: MFH @283922 Added: projects/em_mq/lib/libutil/kinfo_getvmobject.3 - copied unchanged from r283922, head/lib/libutil/kinfo_getvmobject.3 projects/em_mq/lib/libutil/kinfo_getvmobject.c - copied unchanged from r283922, head/lib/libutil/kinfo_getvmobject.c projects/em_mq/release/arm/CUBOX-HUMMINGBOARD.conf - copied unchanged from r283922, head/release/arm/CUBOX-HUMMINGBOARD.conf projects/em_mq/share/man/man4/ig4.4 - copied unchanged from r283922, head/share/man/man4/ig4.4 projects/em_mq/share/man/man9/PCI_IOV_ADD_VF.9 - copied unchanged from r283922, head/share/man/man9/PCI_IOV_ADD_VF.9 projects/em_mq/share/man/man9/PCI_IOV_INIT.9 - copied unchanged from r283922, head/share/man/man9/PCI_IOV_INIT.9 projects/em_mq/share/man/man9/PCI_IOV_UNINIT.9 - copied unchanged from r283922, head/share/man/man9/PCI_IOV_UNINIT.9 projects/em_mq/sys/dev/ichiic/ - copied from r283922, head/sys/dev/ichiic/ projects/em_mq/sys/dev/pci/pci_iov.h - copied unchanged from r283922, head/sys/dev/pci/pci_iov.h projects/em_mq/sys/dev/pci/pci_iov_if.m - copied unchanged from r283922, head/sys/dev/pci/pci_iov_if.m projects/em_mq/sys/dev/usb/template/usb_template_midi.c - copied unchanged from r283922, head/sys/dev/usb/template/usb_template_midi.c projects/em_mq/sys/modules/i2c/controllers/ichiic/ - copied from r283922, head/sys/modules/i2c/controllers/ichiic/ projects/em_mq/tools/build/options/WITHOUT_MANDOCDB - copied unchanged from r283922, head/tools/build/options/WITHOUT_MANDOCDB Deleted: projects/em_mq/etc/tests/ projects/em_mq/lib/libc/arm/sys/fork.S projects/em_mq/lib/libc/mips/sys/fork.S projects/em_mq/share/man/man9/PCI_ADD_VF.9 projects/em_mq/share/man/man9/PCI_INIT_IOV.9 projects/em_mq/share/man/man9/PCI_UNINIT_IOV.9 Modified: projects/em_mq/Makefile.inc1 projects/em_mq/ObsoleteFiles.inc projects/em_mq/bin/ps/ps.1 projects/em_mq/bin/ps/ps.c projects/em_mq/contrib/diff/src/context.c projects/em_mq/contrib/elftoolchain/common/_elftc.h projects/em_mq/contrib/elftoolchain/common/elfdefinitions.h projects/em_mq/contrib/elftoolchain/elfcopy/elfcopy.h projects/em_mq/contrib/elftoolchain/elfcopy/main.c projects/em_mq/contrib/elftoolchain/elfcopy/sections.c projects/em_mq/contrib/elftoolchain/elfcopy/symbols.c projects/em_mq/contrib/elftoolchain/libdwarf/libdwarf_reloc.c projects/em_mq/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c projects/em_mq/contrib/elftoolchain/libelftc/os.Linux.mk projects/em_mq/contrib/elftoolchain/readelf/readelf.1 projects/em_mq/contrib/elftoolchain/readelf/readelf.c projects/em_mq/contrib/gcc/config/arm/lib1funcs.asm projects/em_mq/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c projects/em_mq/contrib/netbsd-tests/lib/libc/c063/t_openat.c projects/em_mq/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c projects/em_mq/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c projects/em_mq/contrib/netbsd-tests/lib/libc/string/t_memmem.c projects/em_mq/contrib/traceroute/traceroute.8 projects/em_mq/contrib/traceroute/traceroute.c projects/em_mq/crypto/openssh/moduli projects/em_mq/lib/libc/arm/SYS.h projects/em_mq/lib/libc/arm/aeabi/aeabi_asm_double.S projects/em_mq/lib/libc/arm/aeabi/aeabi_asm_float.S projects/em_mq/lib/libc/arm/gen/_setjmp.S projects/em_mq/lib/libc/arm/gen/setjmp.S projects/em_mq/lib/libc/arm/string/ffs.S projects/em_mq/lib/libc/arm/string/memmove.S projects/em_mq/lib/libc/arm/string/memset.S projects/em_mq/lib/libc/arm/string/strcmp.S projects/em_mq/lib/libc/arm/string/strlen.S projects/em_mq/lib/libc/arm/string/strncmp.S projects/em_mq/lib/libc/gen/fpclassify.c projects/em_mq/lib/libc/gen/isinf.c projects/em_mq/lib/libc/mips/sys/Makefile.inc projects/em_mq/lib/libc/string/memmem.3 projects/em_mq/lib/libc/string/memmem.c projects/em_mq/lib/libc/xdr/xdr.c projects/em_mq/lib/libc/xdr/xdr_array.c projects/em_mq/lib/libc/xdr/xdr_float.c projects/em_mq/lib/libc/xdr/xdr_mem.c projects/em_mq/lib/libc/xdr/xdr_rec.c projects/em_mq/lib/libc/xdr/xdr_reference.c projects/em_mq/lib/libc/xdr/xdr_sizeof.c projects/em_mq/lib/libc/xdr/xdr_stdio.c projects/em_mq/lib/libdpv/dpv.c projects/em_mq/lib/libelftc/elftc_version.c projects/em_mq/lib/libgssapi/gss_accept_sec_context.c projects/em_mq/lib/libprocstat/libprocstat.c projects/em_mq/lib/libutil/Makefile projects/em_mq/lib/libutil/kinfo_getallproc.3 projects/em_mq/lib/libutil/kinfo_getfile.3 projects/em_mq/lib/libutil/kinfo_getproc.3 projects/em_mq/lib/libutil/kinfo_getvmmap.3 projects/em_mq/lib/libutil/libutil.h projects/em_mq/libexec/ypxfr/ypxfr_main.c projects/em_mq/release/Makefile.ec2 projects/em_mq/release/Makefile.mirrors projects/em_mq/release/arm/PANDABOARD.conf projects/em_mq/release/arm/RPI2.conf projects/em_mq/release/arm/WANDBOARD.conf projects/em_mq/release/tools/arm.subr projects/em_mq/sbin/camcontrol/camcontrol.c projects/em_mq/sbin/camcontrol/persist.c projects/em_mq/sbin/dhclient/dhclient.c projects/em_mq/sbin/dumpfs/dumpfs.c projects/em_mq/share/man/man3/pthread_setspecific.3 projects/em_mq/share/man/man4/Makefile projects/em_mq/share/man/man4/gre.4 projects/em_mq/share/man/man5/src.conf.5 projects/em_mq/share/man/man9/Makefile projects/em_mq/share/man/man9/pci.9 projects/em_mq/share/man/man9/pci_iov_schema.9 projects/em_mq/share/mk/src.libnames.mk projects/em_mq/share/mk/src.opts.mk projects/em_mq/share/mk/src.sys.mk projects/em_mq/sys/Makefile projects/em_mq/sys/amd64/amd64/pmap.c projects/em_mq/sys/amd64/amd64/trap.c projects/em_mq/sys/amd64/amd64/vm_machdep.c projects/em_mq/sys/amd64/ia32/ia32_reg.c projects/em_mq/sys/amd64/include/vmm.h (contents, props changed) projects/em_mq/sys/amd64/vmm/amd/svm.c projects/em_mq/sys/amd64/vmm/intel/vmx.c projects/em_mq/sys/amd64/vmm/vmm.c projects/em_mq/sys/amd64/vmm/vmm_stat.c projects/em_mq/sys/amd64/vmm/vmm_stat.h projects/em_mq/sys/arm/arm/copystr.S projects/em_mq/sys/arm/arm/elf_trampoline.c projects/em_mq/sys/arm/arm/exception.S projects/em_mq/sys/arm/arm/machdep.c projects/em_mq/sys/arm/arm/stack_machdep.c projects/em_mq/sys/arm/broadcom/bcm2835/bcm2835_spi.c projects/em_mq/sys/arm/include/_types.h projects/em_mq/sys/arm/include/asm.h projects/em_mq/sys/arm/include/proc.h projects/em_mq/sys/boot/fdt/dts/arm/sun4i-a10.dtsi projects/em_mq/sys/boot/fdt/dts/arm/sun7i-a20.dtsi projects/em_mq/sys/boot/uboot/lib/module.c projects/em_mq/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c projects/em_mq/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c projects/em_mq/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/em_mq/sys/conf/files projects/em_mq/sys/conf/kmod.mk projects/em_mq/sys/dev/acpi_support/acpi_ibm.c projects/em_mq/sys/dev/ath/ath_rate/sample/sample.c projects/em_mq/sys/dev/ath/if_ath.c projects/em_mq/sys/dev/ath/if_ath_rx.c projects/em_mq/sys/dev/ath/if_ath_tdma.c projects/em_mq/sys/dev/ath/if_ath_tx.c projects/em_mq/sys/dev/bwi/bwimac.c projects/em_mq/sys/dev/bwi/bwimac.h projects/em_mq/sys/dev/bwi/if_bwi.c projects/em_mq/sys/dev/bwi/if_bwi_pci.c projects/em_mq/sys/dev/cxgbe/t4_main.c projects/em_mq/sys/dev/cxgbe/t4_sge.c projects/em_mq/sys/dev/ixgbe/if_ix.c projects/em_mq/sys/dev/ixgbe/if_ixv.c projects/em_mq/sys/dev/ixgbe/ix_txrx.c projects/em_mq/sys/dev/ixgbe/ixgbe.h projects/em_mq/sys/dev/ixgbe/ixgbe_mbx.h projects/em_mq/sys/dev/ixgbe/ixgbe_vf.c projects/em_mq/sys/dev/ixl/if_ixl.c projects/em_mq/sys/dev/ixl/ixl.h projects/em_mq/sys/dev/mmc/mmcsd.c projects/em_mq/sys/dev/mpr/mpi/mpi2.h projects/em_mq/sys/dev/mpr/mpi/mpi2_cnfg.h projects/em_mq/sys/dev/mpr/mpi/mpi2_hbd.h projects/em_mq/sys/dev/mpr/mpi/mpi2_history.txt projects/em_mq/sys/dev/mpr/mpi/mpi2_init.h projects/em_mq/sys/dev/mpr/mpi/mpi2_ioc.h projects/em_mq/sys/dev/mpr/mpi/mpi2_ra.h projects/em_mq/sys/dev/mpr/mpi/mpi2_raid.h projects/em_mq/sys/dev/mpr/mpi/mpi2_sas.h projects/em_mq/sys/dev/mpr/mpi/mpi2_targ.h projects/em_mq/sys/dev/mpr/mpi/mpi2_tool.h projects/em_mq/sys/dev/mpr/mpi/mpi2_type.h projects/em_mq/sys/dev/mpr/mpr.c projects/em_mq/sys/dev/mpr/mpr_config.c projects/em_mq/sys/dev/mpr/mpr_ioctl.h projects/em_mq/sys/dev/mpr/mpr_mapping.c projects/em_mq/sys/dev/mpr/mpr_mapping.h projects/em_mq/sys/dev/mpr/mpr_pci.c projects/em_mq/sys/dev/mpr/mpr_sas.c projects/em_mq/sys/dev/mpr/mpr_sas.h projects/em_mq/sys/dev/mpr/mpr_sas_lsi.c projects/em_mq/sys/dev/mpr/mpr_user.c projects/em_mq/sys/dev/mpr/mprvar.h projects/em_mq/sys/dev/pci/pci.c projects/em_mq/sys/dev/pci/pci_if.m projects/em_mq/sys/dev/pci/pci_iov.c projects/em_mq/sys/dev/pci/pcivar.h projects/em_mq/sys/dev/sfxge/sfxge_port.c projects/em_mq/sys/dev/sfxge/sfxge_version.h projects/em_mq/sys/dev/uart/uart_dev_ns8250.c projects/em_mq/sys/dev/usb/controller/dwc_otg.c projects/em_mq/sys/dev/usb/template/usb_template.c projects/em_mq/sys/dev/usb/template/usb_template.h projects/em_mq/sys/dev/usb/usb_ioctl.h projects/em_mq/sys/fs/ext2fs/ext2_vnops.c projects/em_mq/sys/fs/nfs/nfs.h projects/em_mq/sys/fs/nfs/nfsdport.h projects/em_mq/sys/fs/nfs/nfsrvstate.h projects/em_mq/sys/fs/nfsserver/nfs_nfsdkrpc.c projects/em_mq/sys/fs/nfsserver/nfs_nfsdport.c projects/em_mq/sys/fs/nfsserver/nfs_nfsdserv.c projects/em_mq/sys/fs/nfsserver/nfs_nfsdsocket.c projects/em_mq/sys/fs/nfsserver/nfs_nfsdstate.c projects/em_mq/sys/fs/nfsserver/nfs_nfsdsubs.c projects/em_mq/sys/fs/procfs/procfs_ctl.c projects/em_mq/sys/kern/kern_exit.c projects/em_mq/sys/kern/kern_sig.c projects/em_mq/sys/kern/kern_synch.c projects/em_mq/sys/kern/subr_trap.c projects/em_mq/sys/kern/sys_process.c projects/em_mq/sys/kern/vfs_cluster.c projects/em_mq/sys/kern/vfs_init.c projects/em_mq/sys/kern/vfs_mount.c projects/em_mq/sys/kern/vfs_subr.c projects/em_mq/sys/kern/vfs_vnops.c projects/em_mq/sys/libkern/arm/memcpy.S projects/em_mq/sys/mips/include/pcpu.h projects/em_mq/sys/modules/Makefile projects/em_mq/sys/modules/i2c/controllers/Makefile projects/em_mq/sys/modules/ixl/Makefile (contents, props changed) projects/em_mq/sys/modules/ixv/Makefile projects/em_mq/sys/modules/sfxge/Makefile projects/em_mq/sys/modules/usb/template/Makefile projects/em_mq/sys/net80211/ieee80211.h projects/em_mq/sys/net80211/ieee80211_crypto.c projects/em_mq/sys/net80211/ieee80211_crypto_ccmp.c projects/em_mq/sys/net80211/ieee80211_crypto_none.c projects/em_mq/sys/net80211/ieee80211_crypto_tkip.c projects/em_mq/sys/net80211/ieee80211_crypto_wep.c projects/em_mq/sys/net80211/ieee80211_freebsd.h projects/em_mq/sys/net80211/ieee80211_hwmp.c projects/em_mq/sys/net80211/ieee80211_ratectl_none.c projects/em_mq/sys/netinet/sctp_asconf.c projects/em_mq/sys/netinet/sctp_cc_functions.c projects/em_mq/sys/netinet/sctp_constants.h projects/em_mq/sys/netinet/sctp_indata.c projects/em_mq/sys/netinet/sctp_input.c projects/em_mq/sys/netinet/sctp_output.c projects/em_mq/sys/netinet/sctp_pcb.c projects/em_mq/sys/netinet/sctp_timer.c projects/em_mq/sys/netinet/sctp_usrreq.c projects/em_mq/sys/netinet/sctputil.c projects/em_mq/sys/netinet6/in6.c projects/em_mq/sys/netinet6/nd6.c projects/em_mq/sys/netinet6/sctp6_usrreq.c projects/em_mq/sys/ofed/drivers/net/mlx4/en_netdev.c projects/em_mq/sys/ofed/drivers/net/mlx4/port.c projects/em_mq/sys/ofed/include/linux/mlx4/device.h projects/em_mq/sys/sys/nlist_aout.h projects/em_mq/sys/sys/param.h projects/em_mq/sys/sys/proc.h projects/em_mq/sys/sys/systm.h projects/em_mq/sys/sys/user.h projects/em_mq/sys/sys/vnode.h projects/em_mq/sys/ufs/ffs/ffs_softdep.c projects/em_mq/sys/ufs/ffs/ffs_suspend.c projects/em_mq/sys/ufs/ffs/ffs_vfsops.c projects/em_mq/sys/ufs/ffs/ffs_vnops.c projects/em_mq/sys/ufs/ufs/ufs_bmap.c projects/em_mq/sys/ufs/ufs/ufs_dirhash.c projects/em_mq/sys/vm/vm_object.c projects/em_mq/sys/vm/vm_page.c projects/em_mq/sys/x86/iommu/busdma_dmar.c projects/em_mq/sys/x86/iommu/intel_idpgtbl.c projects/em_mq/sys/x86/iommu/intel_qi.c projects/em_mq/tests/Makefile projects/em_mq/tests/sys/kern/ptrace_test.c projects/em_mq/usr.bin/Makefile projects/em_mq/usr.bin/man/Makefile projects/em_mq/usr.bin/mandoc/Makefile projects/em_mq/usr.bin/vmstat/vmstat.8 projects/em_mq/usr.bin/vmstat/vmstat.c projects/em_mq/usr.sbin/bhyve/bhyverun.c projects/em_mq/usr.sbin/ctld/login.c projects/em_mq/usr.sbin/pmcstat/pmcstat.8 projects/em_mq/usr.sbin/pmcstat/pmcstat.c projects/em_mq/usr.sbin/pw/Makefile projects/em_mq/usr.sbin/pw/grupd.c projects/em_mq/usr.sbin/pw/pw.c projects/em_mq/usr.sbin/pw/pw_conf.c projects/em_mq/usr.sbin/pw/pw_group.c projects/em_mq/usr.sbin/pw/pw_user.c projects/em_mq/usr.sbin/pw/pwupd.c projects/em_mq/usr.sbin/pw/pwupd.h projects/em_mq/usr.sbin/yppoll/yppoll.8 projects/em_mq/usr.sbin/yppoll/yppoll.c projects/em_mq/usr.sbin/yppush/yppush_main.c Directory Properties: projects/em_mq/ (props changed) projects/em_mq/contrib/elftoolchain/ (props changed) projects/em_mq/contrib/gcc/ (props changed) projects/em_mq/crypto/openssh/ (props changed) projects/em_mq/etc/ (props changed) projects/em_mq/gnu/lib/ (props changed) projects/em_mq/lib/libc/ (props changed) projects/em_mq/lib/libutil/ (props changed) projects/em_mq/sbin/ (props changed) projects/em_mq/share/ (props changed) projects/em_mq/share/man/man4/ (props changed) projects/em_mq/sys/ (props changed) projects/em_mq/sys/amd64/vmm/ (props changed) projects/em_mq/sys/boot/ (props changed) projects/em_mq/sys/cddl/contrib/opensolaris/ (props changed) projects/em_mq/sys/conf/ (props changed) projects/em_mq/usr.sbin/bhyve/ (props changed) Modified: projects/em_mq/Makefile.inc1 ============================================================================== --- projects/em_mq/Makefile.inc1 Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/Makefile.inc1 Tue Jun 2 19:15:13 2015 (r283926) @@ -1276,8 +1276,8 @@ _sed= usr.bin/sed .endif .if ${BOOTSTRAPPING} < 1000002 -_m4= lib/libohash \ - usr.bin/m4 +_libohash= lib/libohash +_m4= usr.bin/m4 ${_bt}-usr.bin/m4: ${_bt}-lib/libohash .endif @@ -1363,6 +1363,15 @@ _kerberos5_bootstrap_tools= \ .ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} .endif +.if ${MK_MANDOCDB} != "no" +_libohash?= lib/libohash +_makewhatis= lib/libsqlite3 \ + usr.bin/mandoc +${_bt}-usr.bin/mandoc: ${_bt}-lib/libohash ${_bt}-lib/libsqlite3 +.else +_makewhatis=usr.bin/makewhatis +.endif + # Rebuild up-to-date libmd for xinstall ${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd @@ -1383,7 +1392,8 @@ bootstrap-tools: .PHONY ${_awk} \ ${_cat} \ usr.bin/lorder \ - usr.bin/makewhatis \ + ${_libohash} \ + ${_makewhatis} \ usr.bin/rpcgen \ ${_sed} \ ${_yacc} \ @@ -1755,6 +1765,7 @@ _cddl_lib= cddl/lib cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L cddl/lib/libzfs__L: lib/libgeom__L cddl/lib/libctf__L: lib/libz__L +.endif # cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built # on select architectures though (see cddl/lib/Makefile) .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ @@ -1762,7 +1773,6 @@ cddl/lib/libctf__L: lib/libz__L ${MACHINE_CPUARCH} == "arm" _prebuild_libs+= lib/libproc lib/librtld_db .endif -.endif .if ${MK_CRYPT} != "no" .if ${MK_OPENSSL} != "no" @@ -1806,9 +1816,10 @@ kerberos5/lib/libroken__L: lib/libcrypt_ kerberos5/lib/libwind__L: kerberos5/lib/libroken__L lib/libcom_err__L kerberos5/lib/libheimbase__L: lib/libthr__L kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L kerberos5/lib/libheimbase__L lib/libthr__L -lib/libsqlite3__L: lib/libthr__L .endif +lib/libsqlite3__L: lib/libthr__L + .if ${MK_GSSAPI} != "no" _lib_libgssapi= lib/libgssapi .endif Modified: projects/em_mq/ObsoleteFiles.inc ============================================================================== --- projects/em_mq/ObsoleteFiles.inc Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/ObsoleteFiles.inc Tue Jun 2 19:15:13 2015 (r283926) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20150528: PCI IOV device driver methods moved to a separate kobj interface. +OLD_FILES+=usr/share/man/man9/PCI_ADD_VF.9 +OLD_FILES+=usr/share/man/man9/PCI_INIT_IOV.9 +OLD_FILES+=usr/share/man/man9/PCI_UNINIT_IOV.9 # 20150525: new clang import which bumps version from 3.6.0 to 3.6.1. OLD_FILES+=usr/lib/clang/3.6.0/include/__stddef_max_align_t.h OLD_FILES+=usr/lib/clang/3.6.0/include/__wmmintrin_aes.h Modified: projects/em_mq/bin/ps/ps.1 ============================================================================== --- projects/em_mq/bin/ps/ps.1 Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/bin/ps/ps.1 Tue Jun 2 19:15:13 2015 (r283926) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 22, 2015 +.Dd May 27, 2015 .Dt PS 1 .Os .Sh NAME @@ -350,6 +350,9 @@ the include file .In sys/proc.h : .Bl -column P2_INHERIT_PROTECTED 0x00000001 .It Dv "P2_INHERIT_PROTECTED" Ta No "0x00000001" Ta "New children get P_PROTECTED" +.It Dv "P2_NOTRACE" Ta No "0x00000002" Ta "No ptrace(2) attach or coredumps" +.It Dv "P2_NOTRACE_EXEC" Ta No "0x00000004" Ta "Keep P2_NOPTRACE on exec(2)" +.It Dv "P2_AST_SU" Ta No "0x00000008" Ta "Handles SU ast for kthreads" .El .It Cm label The MAC label of the process. Modified: projects/em_mq/bin/ps/ps.c ============================================================================== --- projects/em_mq/bin/ps/ps.c Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/bin/ps/ps.c Tue Jun 2 19:15:13 2015 (r283926) @@ -180,7 +180,7 @@ main(int argc, char *argv[]) KINFO_STR *ks; struct varent *vent; struct winsize ws = { .ws_row = 0 }; - const char *nlistf, *memf, *fmtstr, *str; + const char *nlistf, *memf, *str; char *cols; int all, ch, elem, flag, _fmt, i, lineno, linelen, left; int descendancy, nentries, nkept, nselectors; @@ -649,11 +649,6 @@ main(int argc, char *argv[]) linelen = 0; xo_open_instance("process"); STAILQ_FOREACH(vent, &varlist, next_ve) { - if (vent->var->flag & LJUST) - fmtstr = "%-*s"; - else - fmtstr = "%*s"; - ks = STAILQ_FIRST(&kinfo[i].ki_ks); STAILQ_REMOVE_HEAD(&kinfo[i].ki_ks, ks_next); /* Truncate rightmost column if necessary. */ Modified: projects/em_mq/contrib/diff/src/context.c ============================================================================== --- projects/em_mq/contrib/diff/src/context.c Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/contrib/diff/src/context.c Tue Jun 2 19:15:13 2015 (r283926) @@ -62,7 +62,7 @@ print_context_label (char const *mark, { time_t sec = inf->stat.st_mtime; verify (info_preserved, sizeof inf->stat.st_mtime <= sizeof sec); - sprintf (buf, "%jd.%.9d", (intmax_t)sec, nsec); + sprintf (buf, "%jd.%.9ld", (intmax_t)sec, nsec); } fprintf (outfile, "%s %s\t%s\n", mark, inf->name, buf); } Modified: projects/em_mq/contrib/elftoolchain/common/_elftc.h ============================================================================== --- projects/em_mq/contrib/elftoolchain/common/_elftc.h Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/contrib/elftoolchain/common/_elftc.h Tue Jun 2 19:15:13 2015 (r283926) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _elftc.h 3175 2015-03-27 17:21:24Z emaste $ + * $Id: _elftc.h 3209 2015-05-17 13:40:46Z kaiwang27 $ */ /** @@ -342,12 +342,13 @@ struct name { \ #if defined(__GLIBC__) || defined(__linux__) - +#ifndef _GNU_SOURCE /* * GLIBC based systems have a global 'char *' pointer referencing * the executable's name. */ extern const char *program_invocation_short_name; +#endif /* !_GNU_SOURCE */ #define ELFTC_GETPROGNAME() program_invocation_short_name Modified: projects/em_mq/contrib/elftoolchain/common/elfdefinitions.h ============================================================================== --- projects/em_mq/contrib/elftoolchain/common/elfdefinitions.h Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/contrib/elftoolchain/common/elfdefinitions.h Tue Jun 2 19:15:13 2015 (r283926) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfdefinitions.h 3178 2015-03-30 18:29:13Z emaste $ + * $Id: elfdefinitions.h 3198 2015-05-14 18:36:19Z emaste $ */ /* @@ -565,6 +565,7 @@ _ELF_DEFINE_EM(EM_SPARC, 2, " _ELF_DEFINE_EM(EM_386, 3, "Intel 80386") \ _ELF_DEFINE_EM(EM_68K, 4, "Motorola 68000") \ _ELF_DEFINE_EM(EM_88K, 5, "Motorola 88000") \ +_ELF_DEFINE_EM(EM_IAMCU, 6, "Intel MCU") \ _ELF_DEFINE_EM(EM_860, 7, "Intel 80860") \ _ELF_DEFINE_EM(EM_MIPS, 8, "MIPS I Architecture") \ _ELF_DEFINE_EM(EM_S370, 9, "IBM System/370 Processor") \ Modified: projects/em_mq/contrib/elftoolchain/elfcopy/elfcopy.h ============================================================================== --- projects/em_mq/contrib/elftoolchain/elfcopy/elfcopy.h Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/contrib/elftoolchain/elfcopy/elfcopy.h Tue Jun 2 19:15:13 2015 (r283926) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfcopy.h 3173 2015-03-27 16:46:13Z emaste $ + * $Id: elfcopy.h 3221 2015-05-24 23:42:43Z kaiwang27 $ */ #include @@ -237,6 +237,7 @@ struct elfcopy { uint64_t *secndx; /* section index map. */ uint64_t *symndx; /* symbol index map. */ unsigned char *v_rel; /* symbols needed by relocation. */ + unsigned char *v_grp; /* symbols refered by section group. */ unsigned char *v_secsym; /* sections with section symbol. */ STAILQ_HEAD(, segment) v_seg; /* list of segments. */ STAILQ_HEAD(, sec_action) v_sac;/* list of section operations. */ Modified: projects/em_mq/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- projects/em_mq/contrib/elftoolchain/elfcopy/main.c Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/contrib/elftoolchain/elfcopy/main.c Tue Jun 2 19:15:13 2015 (r283926) @@ -39,7 +39,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: main.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: main.c 3216 2015-05-23 21:16:36Z kaiwang27 $"); enum options { @@ -404,8 +404,19 @@ create_elf(struct elfcopy *ecp) * Insert SHDR table into the internal section list as a "pseudo" * section, so later it will get sorted and resynced just as "normal" * sections. + * + * Under FreeBSD, Binutils objcopy always put the section header + * at the end of all the sections. We want to do the same here. + * + * However, note that the behaviour is still different with Binutils: + * elfcopy checks the FreeBSD OSABI tag to tell whether it needs to + * move the section headers, while Binutils is probably configured + * this way when it's compiled on FreeBSD. */ - shtab = insert_shtab(ecp, 0); + if (oeh.e_ident[EI_OSABI] == ELFOSABI_FREEBSD) + shtab = insert_shtab(ecp, 1); + else + shtab = insert_shtab(ecp, 0); /* * Resync section offsets in the output object. This is needed @@ -485,6 +496,11 @@ free_elf(struct elfcopy *ecp) free(sec); } } + + if (ecp->secndx != NULL) { + free(ecp->secndx); + ecp->secndx = NULL; + } } /* Create a temporary file. */ Modified: projects/em_mq/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- projects/em_mq/contrib/elftoolchain/elfcopy/sections.c Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/contrib/elftoolchain/elfcopy/sections.c Tue Jun 2 19:15:13 2015 (r283926) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: sections.c 3185 2015-04-11 08:56:34Z kaiwang27 $"); +ELFTC_VCSID("$Id: sections.c 3220 2015-05-24 23:42:39Z kaiwang27 $"); static void add_gnu_debuglink(struct elfcopy *ecp); static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc); @@ -56,6 +56,7 @@ static void print_data(const char *d, si static void print_section(struct section *s); static void *read_section(struct section *s, size_t *size); static void update_reloc(struct elfcopy *ecp, struct section *s); +static void update_section_group(struct elfcopy *ecp, struct section *s); int is_remove_section(struct elfcopy *ecp, const char *name) @@ -552,6 +553,14 @@ copy_content(struct elfcopy *ecp) (s->type == SHT_REL || s->type == SHT_RELA)) filter_reloc(ecp, s); + /* + * The section indices in the SHT_GROUP section needs + * to be updated since we might have stripped some + * sections and changed section numbering. + */ + if (s->type == SHT_GROUP) + update_section_group(ecp, s); + if (is_modify_section(ecp, s->name)) modify_section(ecp, s); @@ -571,6 +580,71 @@ copy_content(struct elfcopy *ecp) } } + +/* + * Update section group section. The section indices in the SHT_GROUP + * section need update after section numbering changed. + */ +static void +update_section_group(struct elfcopy *ecp, struct section *s) +{ + GElf_Shdr ish; + Elf_Data *id; + uint32_t *ws, *wd; + uint64_t n; + size_t ishnum; + int i, j; + + if (!elf_getshnum(ecp->ein, &ishnum)) + errx(EXIT_FAILURE, "elf_getshnum failed: %s", + elf_errmsg(-1)); + + if (gelf_getshdr(s->is, &ish) == NULL) + errx(EXIT_FAILURE, "gelf_getehdr() failed: %s", + elf_errmsg(-1)); + + if ((id = elf_getdata(s->is, NULL)) == NULL) + errx(EXIT_FAILURE, "elf_getdata() failed: %s", + elf_errmsg(-1)); + + if (ish.sh_size == 0) + return; + + if (ish.sh_entsize == 0) + ish.sh_entsize = 4; + + ws = id->d_buf; + + /* We only support COMDAT section. */ +#ifndef GRP_COMDAT +#define GRP_COMDAT 0x1 +#endif + if ((*ws & GRP_COMDAT) == 0) + return; + + if ((s->buf = malloc(ish.sh_size)) == NULL) + err(EXIT_FAILURE, "malloc failed"); + + s->sz = ish.sh_size; + + wd = s->buf; + + /* Copy the flag word as-is. */ + *wd = *ws; + + /* Update the section indices. */ + n = ish.sh_size / ish.sh_entsize; + for(i = 1, j = 1; (uint64_t)i < n; i++) { + if (ws[i] != SHN_UNDEF && ws[i] < ishnum && + ecp->secndx[ws[i]] != 0) + wd[j++] = ecp->secndx[ws[i]]; + else + s->sz -= 4; + } + + s->nocopy = 1; +} + /* * Filter relocation entries, only keep those entries whose * symbol is in the keep list. @@ -1028,8 +1102,11 @@ copy_shdr(struct elfcopy *ecp, struct se osh.sh_flags |= SHF_WRITE; if (sec_flags & SF_CODE) osh.sh_flags |= SHF_EXECINSTR; - } else + } else { osh.sh_flags = ish.sh_flags; + if (ish.sh_type == SHT_REL || ish.sh_type == SHT_RELA) + osh.sh_flags |= SHF_INFO_LINK; + } } if (name == NULL) Modified: projects/em_mq/contrib/elftoolchain/elfcopy/symbols.c ============================================================================== --- projects/em_mq/contrib/elftoolchain/elfcopy/symbols.c Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/contrib/elftoolchain/elfcopy/symbols.c Tue Jun 2 19:15:13 2015 (r283926) @@ -33,7 +33,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: symbols.c 3191 2015-05-04 17:07:01Z jkoshy $"); +ELFTC_VCSID("$Id: symbols.c 3222 2015-05-24 23:47:23Z kaiwang27 $"); /* Symbol table buffer structure. */ struct symbuf { @@ -77,7 +77,8 @@ static int is_weak_symbol(unsigned char static int lookup_exact_string(hash_head *hash, const char *buf, const char *s); static int generate_symbols(struct elfcopy *ecp); -static void mark_symbols(struct elfcopy *ecp, size_t sc); +static void mark_reloc_symbols(struct elfcopy *ecp, size_t sc); +static void mark_section_group_symbols(struct elfcopy *ecp, size_t sc); static int match_wildcard(const char *name, const char *pattern); uint32_t str_hash(const char *s); @@ -160,6 +161,10 @@ is_needed_symbol(struct elfcopy *ecp, in if (BIT_ISSET(ecp->v_rel, i)) return (1); + /* Symbols refered by COMDAT sections are needed. */ + if (BIT_ISSET(ecp->v_grp, i)) + return (1); + /* * For relocatable files (.o files), global and weak symbols * are needed. @@ -207,7 +212,10 @@ is_remove_symbol(struct elfcopy *ecp, si return (1); if (ecp->v_rel == NULL) - mark_symbols(ecp, sc); + mark_reloc_symbols(ecp, sc); + + if (ecp->v_grp == NULL) + mark_section_group_symbols(ecp, sc); if (is_needed_symbol(ecp, i, s)) return (0); @@ -233,7 +241,7 @@ is_remove_symbol(struct elfcopy *ecp, si * Mark symbols refered by relocation entries. */ static void -mark_symbols(struct elfcopy *ecp, size_t sc) +mark_reloc_symbols(struct elfcopy *ecp, size_t sc) { const char *name; Elf_Data *d; @@ -311,6 +319,49 @@ mark_symbols(struct elfcopy *ecp, size_t elf_errmsg(elferr)); } +static void +mark_section_group_symbols(struct elfcopy *ecp, size_t sc) +{ + const char *name; + Elf_Scn *s; + GElf_Shdr sh; + size_t indx; + int elferr; + + ecp->v_grp = calloc((sc + 7) / 8, 1); + if (ecp->v_grp == NULL) + err(EXIT_FAILURE, "calloc failed"); + + if (elf_getshstrndx(ecp->ein, &indx) == 0) + errx(EXIT_FAILURE, "elf_getshstrndx failed: %s", + elf_errmsg(-1)); + + s = NULL; + while ((s = elf_nextscn(ecp->ein, s)) != NULL) { + if (gelf_getshdr(s, &sh) != &sh) + errx(EXIT_FAILURE, "elf_getshdr failed: %s", + elf_errmsg(-1)); + + if (sh.sh_type != SHT_GROUP) + continue; + + if ((name = elf_strptr(ecp->ein, indx, sh.sh_name)) == NULL) + errx(EXIT_FAILURE, "elf_strptr failed: %s", + elf_errmsg(-1)); + if (is_remove_section(ecp, name)) + continue; + + if (sh.sh_info > 0 && sh.sh_info < sc) + BIT_SET(ecp->v_grp, sh.sh_info); + else if (sh.sh_info != 0) + warnx("invalid symbox index"); + } + elferr = elf_errno(); + if (elferr != 0) + errx(EXIT_FAILURE, "elf_nextscn failed: %s", + elf_errmsg(elferr)); +} + static int generate_symbols(struct elfcopy *ecp) { @@ -351,6 +402,8 @@ generate_symbols(struct elfcopy *ecp) ecp->symtab->buf = sy_buf; ecp->strtab->buf = st_buf; + gsym = NULL; + /* * Create bit vector v_secsym, which is used to mark sections * that already have corresponding STT_SECTION symbols. @@ -384,7 +437,7 @@ generate_symbols(struct elfcopy *ecp) /* Symbol table should exist if this function is called. */ if (symndx == 0) { warnx("can't find .strtab section"); - return (0); + goto clean; } /* Locate .symtab of input object. */ @@ -413,7 +466,6 @@ generate_symbols(struct elfcopy *ecp) * output object, it is used by update_reloc() later to update * relocation information. */ - gsym = NULL; sc = ish.sh_size / ish.sh_entsize; if (sc > 0) { ecp->symndx = calloc(sc, sizeof(*ecp->symndx)); @@ -427,7 +479,7 @@ generate_symbols(struct elfcopy *ecp) if (elferr != 0) errx(EXIT_FAILURE, "elf_getdata failed: %s", elf_errmsg(elferr)); - return (0); + goto clean; } } else return (0); @@ -523,7 +575,7 @@ generate_symbols(struct elfcopy *ecp) * check if that only local symbol is the reserved symbol. */ if (sy_buf->nls <= 1 && sy_buf->ngs == 0) - return (0); + goto clean; /* * Create STT_SECTION symbols for sections that do not already @@ -550,6 +602,7 @@ generate_symbols(struct elfcopy *ecp) sym.st_value = s->vma; sym.st_size = 0; sym.st_info = GELF_ST_INFO(STB_LOCAL, STT_SECTION); + sym.st_other = STV_DEFAULT; /* * Don't let add_to_symtab() touch sym.st_shndx. * In this case, we know the index already. @@ -583,6 +636,12 @@ generate_symbols(struct elfcopy *ecp) } return (1); + +clean: + free(gsym); + free_symtab(ecp); + + return (0); } void @@ -624,7 +683,9 @@ create_symtab(struct elfcopy *ecp) if (((ecp->flags & SYMTAB_INTACT) == 0) && !generate_symbols(ecp)) { TAILQ_REMOVE(&ecp->v_sec, ecp->symtab, sec_list); TAILQ_REMOVE(&ecp->v_sec, ecp->strtab, sec_list); + free(ecp->symtab->buf); free(ecp->symtab); + free(ecp->strtab->buf); free(ecp->strtab); ecp->symtab = NULL; ecp->strtab = NULL; @@ -697,6 +758,23 @@ free_symtab(struct elfcopy *ecp) } } } + + if (ecp->symndx != NULL) { + free(ecp->symndx); + ecp->symndx = NULL; + } + if (ecp->v_rel != NULL) { + free(ecp->v_rel); + ecp->v_rel = NULL; + } + if (ecp->v_grp != NULL) { + free(ecp->v_grp); + ecp->v_grp = NULL; + } + if (ecp->v_secsym != NULL) { + free(ecp->v_secsym); + ecp->v_secsym = NULL; + } } void Modified: projects/em_mq/contrib/elftoolchain/libdwarf/libdwarf_reloc.c ============================================================================== --- projects/em_mq/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Tue Jun 2 19:15:13 2015 (r283926) @@ -26,7 +26,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_reloc.c 3149 2015-02-15 19:00:06Z emaste $"); +ELFTC_VCSID("$Id: libdwarf_reloc.c 3198 2015-05-14 18:36:19Z emaste $"); Dwarf_Unsigned _dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64) @@ -75,6 +75,7 @@ _dwarf_get_reloc_size(Dwarf_Debug dbg, D return (4); break; case EM_386: + case EM_IAMCU: if (rel_type == R_386_32) return (4); break; Modified: projects/em_mq/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c ============================================================================== --- projects/em_mq/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Tue Jun 2 19:05:02 2015 (r283925) +++ projects/em_mq/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Tue Jun 2 19:15:13 2015 (r283926) @@ -36,7 +36,7 @@ #include "_libelftc.h" -ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3194 2015-05-05 17:55:16Z emaste $"); +ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3212 2015-05-17 13:40:55Z kaiwang27 $"); /** * @file cpp_demangle.c @@ -50,7 +50,7 @@ ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 31 enum type_qualifier { TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT, - TYPE_CST + TYPE_CST, TYPE_VEC }; struct vector_type_qualifier { @@ -84,6 +84,7 @@ struct cpp_demangle_data { int func_type; const char *cur; /* current mangled name ptr */ const char *last_sname; /* last source name */ + int push_head; }; #define CPP_DEMANGLE_TRY_LIMIT 128 @@ -112,6 +113,8 @@ static int cpp_demangle_read_array(struc static int cpp_demangle_read_encoding(struct cpp_demangle_data *); static int cpp_demangle_read_expr_primary(struct cpp_demangle_data *); static int cpp_demangle_read_expression(struct cpp_demangle_data *); +static int cpp_demangle_read_expression_flat(struct cpp_demangle_data *, + char **); static int cpp_demangle_read_expression_binary(struct cpp_demangle_data *, const char *, size_t); static int cpp_demangle_read_expression_unary(struct cpp_demangle_data *, @@ -123,8 +126,12 @@ static int cpp_demangle_read_function(st static int cpp_demangle_local_source_name(struct cpp_demangle_data *ddata); static int cpp_demangle_read_local_name(struct cpp_demangle_data *); static int cpp_demangle_read_name(struct cpp_demangle_data *); +static int cpp_demangle_read_name_flat(struct cpp_demangle_data *, + char**); static int cpp_demangle_read_nested_name(struct cpp_demangle_data *); static int cpp_demangle_read_number(struct cpp_demangle_data *, long *); +static int cpp_demangle_read_number_as_string(struct cpp_demangle_data *, + char **); static int cpp_demangle_read_nv_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset_number(struct cpp_demangle_data *); @@ -138,6 +145,8 @@ static int cpp_demangle_read_tmpl_arg(st static int cpp_demangle_read_tmpl_args(struct cpp_demangle_data *); static int cpp_demangle_read_tmpl_param(struct cpp_demangle_data *); static int cpp_demangle_read_type(struct cpp_demangle_data *, int); +static int cpp_demangle_read_type_flat(struct cpp_demangle_data *, + char **); static int cpp_demangle_read_uqname(struct cpp_demangle_data *); static int cpp_demangle_read_v_offset(struct cpp_demangle_data *); static char *decode_fp_to_double(const char *, size_t); @@ -156,8 +165,6 @@ static int vector_type_qualifier_init(st static int vector_type_qualifier_push(struct vector_type_qualifier *, enum type_qualifier); -static int cpp_demangle_gnu3_push_head; - /** * @brief Decode the input string by IA-64 C++ ABI style. * @@ -190,7 +197,6 @@ cpp_demangle_gnu3(const char *org) if (!cpp_demangle_data_init(&ddata, org + 2)) return (NULL); - cpp_demangle_gnu3_push_head = 0; rtn = NULL; if (!cpp_demangle_read_encoding(&ddata)) @@ -277,6 +283,7 @@ cpp_demangle_data_init(struct cpp_demang d->func_type = 0; d->cur = cur; d->last_sname = NULL; + d->push_head = 0; return (1); @@ -309,7 +316,6 @@ cpp_demangle_push_fp(struct cpp_demangle fp = ddata->cur; while (*ddata->cur != 'E') ++ddata->cur; - ++ddata->cur; if ((f = decoder(fp, ddata->cur - fp)) == NULL) return (0); @@ -320,6 +326,8 @@ cpp_demangle_push_fp(struct cpp_demangle free(f); + ++ddata->cur; + return (rtn); } @@ -331,7 +339,7 @@ cpp_demangle_push_str(struct cpp_demangl if (ddata == NULL || str == NULL || len == 0) return (0); - if (cpp_demangle_gnu3_push_head > 0) + if (ddata->push_head > 0) return (vector_str_push(&ddata->output_tmp, str, len)); return (vector_str_push(&ddata->output, str, len)); @@ -403,7 +411,8 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, "*", 1)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; @@ -414,7 +423,8 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, "&", 1)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; @@ -425,7 +435,8 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, " complex", 8)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; @@ -434,23 +445,26 @@ cpp_demangle_push_type_qualifier(struct if (!cpp_demangle_push_str(ddata, " imaginary", 10)) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " imaginary", 10)) + if (!vector_str_push(&subst_v, " imaginary", + 10)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; case TYPE_EXT: - if (e_idx > v->ext_name.size - 1) + if (v->ext_name.size == 0 || + e_idx > v->ext_name.size - 1) goto clean; - if ((e_len = strlen(v->ext_name.container[e_idx])) == 0) + if ((e_len = strlen(v->ext_name.container[e_idx])) == + 0) goto clean; - if ((buf = malloc(sizeof(char) * (e_len + 1))) == NULL) + if ((buf = malloc(e_len + 2)) == NULL) goto clean; - - memcpy(buf, " ", 1); - memcpy(buf + 1, v->ext_name.container[e_idx], e_len); + snprintf(buf, e_len + 2, " %s", + v->ext_name.container[e_idx]); if (!cpp_demangle_push_str(ddata, buf, e_len + 1)) { free(buf); @@ -463,7 +477,8 @@ cpp_demangle_push_type_qualifier(struct free(buf); goto clean; } - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) { + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) { free(buf); goto clean; } @@ -478,7 +493,8 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, " restrict", 9)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; @@ -489,7 +505,8 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, " volatile", 9)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; @@ -500,11 +517,42 @@ cpp_demangle_push_type_qualifier(struct if (type_str != NULL) { if (!vector_str_push(&subst_v, " const", 6)) goto clean; - if (!cpp_demangle_push_subst_v(ddata, &subst_v)) + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) goto clean; } break; + case TYPE_VEC: + if (v->ext_name.size == 0 || + e_idx > v->ext_name.size - 1) + goto clean; + if ((e_len = strlen(v->ext_name.container[e_idx])) == + 0) + goto clean; + if ((buf = malloc(e_len + 12)) == NULL) + goto clean; + snprintf(buf, e_len + 12, " __vector(%s)", + v->ext_name.container[e_idx]); + if (!cpp_demangle_push_str(ddata, buf, e_len + 11)) { + free(buf); + goto clean; + } + if (type_str != NULL) { + if (!vector_str_push(&subst_v, buf, + e_len + 11)) { + free(buf); + goto clean; + } + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) { + free(buf); + goto clean; + } + } + free(buf); + ++e_idx; + break; }; --idx; } @@ -655,10 +703,14 @@ cpp_demangle_read_expr_primary(struct cp switch (*ddata->cur) { case 'b': + if (*(ddata->cur + 2) != 'E') + return (0); switch (*(++ddata->cur)) { case '0': + ddata->cur += 2; return (cpp_demangle_push_str(ddata, "false", 5)); case '1': + ddata->cur += 2; return (cpp_demangle_push_str(ddata, "true", 4)); default: return (0); @@ -707,7 +759,8 @@ cpp_demangle_read_expr_primary(struct cp ++ddata->cur; } ++ddata->cur; - return (cpp_demangle_push_str(ddata, num, ddata->cur - num)); + return (cpp_demangle_push_str(ddata, num, + ddata->cur - num - 1)); default: return (0); @@ -999,6 +1052,38 @@ cpp_demangle_read_expression(struct cpp_ } static int +cpp_demangle_read_expression_flat(struct cpp_demangle_data *ddata, char **str) +{ + struct vector_str *output; + size_t i, p_idx, idx, exp_len; + char *exp; + + output = ddata->push_head > 0 ? &ddata->output_tmp : + &ddata->output; + + p_idx = output->size; + + if (!cpp_demangle_read_expression(ddata)) + return (0); + + if ((exp = vector_str_substr(output, p_idx, output->size - 1, + &exp_len)) == NULL) + return (0); + + idx = output->size; + for (i = p_idx; i < idx; ++i) { + if (!vector_str_pop(output)) { + free(exp); + return (0); + } + } + + *str = exp; + + return (1); +} + +static int cpp_demangle_read_expression_binary(struct cpp_demangle_data *ddata, const char *name, size_t len) { @@ -1127,12 +1212,65 @@ cpp_demangle_read_function(struct cpp_de static int cpp_demangle_read_encoding(struct cpp_demangle_data *ddata) { + char *name, *type, *num_str; + long offset; + int rtn; if (ddata == NULL || *ddata->cur == '\0') return (0); /* special name */ switch (SIMPLE_HASH(*ddata->cur, *(ddata->cur + 1))) { + case SIMPLE_HASH('G', 'A'): + if (!cpp_demangle_push_str(ddata, "hidden alias for ", 17)) + return (0); + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + return (cpp_demangle_read_encoding(ddata)); + + case SIMPLE_HASH('G', 'R'): + if (!cpp_demangle_push_str(ddata, "reference temporary #", 21)) + return (0); + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + if (!cpp_demangle_read_name_flat(ddata, &name)) + return (0); + rtn = 0; + if (!cpp_demangle_read_number_as_string(ddata, &num_str)) + goto clean1; + if (!cpp_demangle_push_str(ddata, num_str, strlen(num_str))) + goto clean2; + if (!cpp_demangle_push_str(ddata, " for ", 5)) + goto clean2; + if (!cpp_demangle_push_str(ddata, name, strlen(name))) + goto clean2; + rtn = 1; + clean2: + free(num_str); + clean1: + free(name); + return (rtn); + + case SIMPLE_HASH('G', 'T'): + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + switch (*ddata->cur) { + case 'n': + if (!cpp_demangle_push_str(ddata, + "non-transaction clone for ", 26)) + return (0); + case 't': + default: + if (!cpp_demangle_push_str(ddata, + "transaction clone for ", 22)) + return (0); + } + ++ddata->cur; + return (cpp_demangle_read_encoding(ddata)); + case SIMPLE_HASH('G', 'V'): /* sentry object for 1 time init */ if (!cpp_demangle_push_str(ddata, "guard variable for ", 20)) @@ -1154,14 +1292,49 @@ cpp_demangle_read_encoding(struct cpp_de return (0); return (cpp_demangle_read_encoding(ddata)); + case SIMPLE_HASH('T', 'C'): + /* construction vtable */ + if (!cpp_demangle_push_str(ddata, "construction vtable for ", + 24)) + return (0); + ddata->cur += 2; + if (*ddata->cur == '\0') + return (0); + if (!cpp_demangle_read_type_flat(ddata, &type)) + return (0); + rtn = 0; + if (!cpp_demangle_read_number(ddata, &offset)) + goto clean3; + if (*ddata->cur++ != '_') + goto clean3; + if (!cpp_demangle_read_type(ddata, 0)) + goto clean3; + if (!cpp_demangle_push_str(ddata, "-in-", 4)) + goto clean3; + if (!cpp_demangle_push_str(ddata, type, strlen(type))) + goto clean3; + rtn = 1; + clean3: + free(type); + return (rtn); + case SIMPLE_HASH('T', 'D'): /* typeinfo common proxy */ break; + case SIMPLE_HASH('T', 'F'): + /* typeinfo fn */ + if (!cpp_demangle_push_str(ddata, "typeinfo fn for ", 16)) + return (0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***