From nobody@FreeBSD.org  Wed Sep 17 13:57:00 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D20E5106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 Sep 2008 13:57:00 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id BDF688FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 Sep 2008 13:57:00 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m8HDv0oS008596
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 Sep 2008 13:57:00 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m8HDv0VH008595;
	Wed, 17 Sep 2008 13:57:00 GMT
	(envelope-from nobody)
Message-Id: <200809171357.m8HDv0VH008595@www.freebsd.org>
Date: Wed, 17 Sep 2008 13:57:00 GMT
From: Henri Hennebert <hlh@restart.be>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Dtrace arg0/arg1 variables don't contain return value of syscall:::return 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         127440
>Category:       kern
>Synopsis:       [dtrace] Dtrace arg0/arg1 variables don't contain return value of syscall:::return
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 17 14:00:14 UTC 2008
>Closed-Date:    Wed Jul 20 17:12:21 UTC 2011
>Last-Modified:  Wed Jul 20 17:12:21 UTC 2011
>Originator:     Henri Hennebert
>Release:        7.1-PRERELEASE
>Organization:
>Environment:
FreeBSD morzine.restart.bel 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Sun Sep 14 17:24:37 CEST 2008     root@morzine.restart.bel:/usr/obj/usr/src/sys/MORZINE  i386

>Description:
I am reading the 'Solaris Dynamic tracing guide' and using FreeBSD for the practical test.

In this D program:

syscall::read:entry,
syscall::write:entry
/pid == $1/
{
        printf("%s(%d, 0x%x, %4d)", probefunc, arg0, arg1, arg2);
}

syscall::read:return,
syscall::write:return
/pid == $1/
{
 	printf("\t\t = %d\n", arg1);
}

in syscall::read:return, syscall::write:return
argO/arg1 has respectively the value of arg0/arg1 at the corresponding syscall:::entry instead of the return value of the syscall.

Anyway, thanks for this great port

Henri
>How-To-Repeat:
running the previous D program under 7.1-PRERELEASE

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jb 
Responsible-Changed-By: remko 
Responsible-Changed-When: Wed Sep 17 14:46:36 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127440 
Responsible-Changed-From-To: jb->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Dec 14 12:05:25 UTC 2009 
Responsible-Changed-Why:  
RIP John Birrell: please see http://www.freebsd.org/releases/8.0R/announce.html. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127440 

From: Alex Samorukov <samm@os2.kiev.ua>
To: bug-followup@FreeBSD.org, hlh@restart.be
Cc:  
Subject: Re: kern/127440: [dtrace] Dtrace arg0/arg1 variables don't contain
 return value of syscall:::return
Date: Mon, 18 Jul 2011 20:57:09 +0200

 This bug is fixed. In 8-STABLE your test showing:
 
    2  42158                       read:entry read(9, 0x7fffffff9fe0, 16384)
    2  42159                      read:return          = 77
 
 So i think that this PR should be closed.

From: Henri Hennebert <hlh@restart.be>
To: Alex Samorukov <samm@os2.kiev.ua>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/127440: [dtrace] Dtrace arg0/arg1 variables don't contain
 return value of syscall:::return
Date: Tue, 19 Jul 2011 10:46:52 +0200

 On 07/18/2011 20:57, Alex Samorukov wrote:
 > This bug is fixed. In 8-STABLE your test showing:
 >
 > 2 42158 read:entry read(9, 0x7fffffff9fe0, 16384)
 > 2 42159 read:return = 77
 >
 > So i think that this PR should be closed.
 >
 All is fine now. Thank you!
 
 Henri
State-Changed-From-To: open->closed 
State-Changed-By: rwatson 
State-Changed-When: Wed Jul 20 17:11:35 UTC 2011 
State-Changed-Why:  
Fix confirmed by submitter -- thanks for the bug report! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127440 
>Unformatted:
