From owner-svn-src-stable-10@freebsd.org Wed Feb 24 22:01:46 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB43CAB27D1; Wed, 24 Feb 2016 22:01:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 ADFB910A7; Wed, 24 Feb 2016 22:01:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1OM1jli075002; Wed, 24 Feb 2016 22:01:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1OM1jMa075000; Wed, 24 Feb 2016 22:01:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201602242201.u1OM1jMa075000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 24 Feb 2016 22:01:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r296010 - stable/10/usr.bin/truss X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2016 22:01:47 -0000 Author: jhb Date: Wed Feb 24 22:01:45 2016 New Revision: 296010 URL: https://svnweb.freebsd.org/changeset/base/296010 Log: MFC 295636,295637: Fix issues with tracing Linux/i386 binaries. 295636: Sign extend the error value for failing Linux/i386 system calls. This restores the mapping of Linux errors to native FreeBSD errno values after the refactoring in r288424. 295637: Correct the ABI name for Linux/i386 binaries under FreeBSD/i386. This allows truss to work for these binaries again after r288424. Approved by: re (marius) Modified: stable/10/usr.bin/truss/amd64-linux32.c stable/10/usr.bin/truss/i386-linux.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/truss/amd64-linux32.c ============================================================================== --- stable/10/usr.bin/truss/amd64-linux32.c Wed Feb 24 22:00:35 2016 (r296009) +++ stable/10/usr.bin/truss/amd64-linux32.c Wed Feb 24 22:01:45 2016 (r296010) @@ -116,6 +116,8 @@ amd64_linux32_fetch_retval(struct trussi retval[0] = regs.r_rax & 0xffffffff; retval[1] = regs.r_rdx & 0xffffffff; *errorp = !!(regs.r_rflags & PSL_C); + if (*errorp) + retval[0] = (int)retval[0]; if (*errorp) { for (i = 0; i < nitems(bsd_to_linux_errno); i++) { Modified: stable/10/usr.bin/truss/i386-linux.c ============================================================================== --- stable/10/usr.bin/truss/i386-linux.c Wed Feb 24 22:00:35 2016 (r296009) +++ stable/10/usr.bin/truss/i386-linux.c Wed Feb 24 22:01:45 2016 (r296010) @@ -130,7 +130,7 @@ i386_linux_fetch_retval(struct trussinfo } static struct procabi i386_linux = { - "Linux ELF32", + "Linux ELF", linux_syscallnames, nitems(linux_syscallnames), i386_linux_fetch_args,