Date: Wed, 24 Feb 2016 22:01:45 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> 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 Message-ID: <201602242201.u1OM1jMa075000@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602242201.u1OM1jMa075000>