Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jul 2019 16:02:51 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r350069 - head/usr.bin/truss
Message-ID:  <7bbc1a04-33b8-e6a4-7bda-2253de294806@FreeBSD.org>
In-Reply-To: <201907162259.x6GMxFrJ069696@repo.freebsd.org>
References:  <201907162259.x6GMxFrJ069696@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7/16/19 3:59 PM, John Baldwin wrote:
> Author: jhb
> Date: Tue Jul 16 22:59:15 2019
> New Revision: 350069
> URL: https://svnweb.freebsd.org/changeset/base/350069
> 
> Log:
>   Use PT_GET_SC_ARGS and PT_GET_SC_RET in truss.
>   
>   This removes all of the architecture-specific functions from truss.
>   
>   A per-ABI structure is still needed to map syscall numbers to names
>   and FreeBSD errno values to ABI error values as well as hold syscall
>   counters.  However, the linker set of ABI structures is now replaced
>   with a simple table mapping ABI names to structures.  This approach
>   permits sharing the same ABI structure among separate names such as
>   i386 a.out and ELF binaries as well as ELF v1 vs ELF v2 for powerpc64.
>   
>   A few differences are visible due to using PT_GET_SC_RET to fetch the
>   error value of a system call.  Note that ktrace/kdump have had the
>   "new" behaviors for a long time already:
>   - System calls that return with EJUSTRETURN or ERESTART will now be
>     noticed and logged as such.  Previously sigreturn (which uses
>     EJUSTRETURN) would report whatever random value was in the register
>     holding errno from the previous system call for example.  Now it
>     reports EJUSTRETURN.
>   - System calls that return errno as their error value such as
>     posix_fallocate() and posix_fadvise() now report non-zero return
>     values as errors instead of success with a non-zero return value.
>   
>   Reviewed by:	kib
>   MFC after:	1 month
>   Sponsored by:	DARPA
>   Differential Revision:	https://reviews.freebsd.org/D20963

One side effect of this change that I haven't tested is that I think this
enables truss for 64-bit Linux and 32-bit FreeBSD binaries on aarch64.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7bbc1a04-33b8-e6a4-7bda-2253de294806>