From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29444 invoked by alias); 24 Nov 2009 19:47:34 -0000 Received: (qmail 29436 invoked by uid 22791); 24 Nov 2009 19:47:33 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Nov 2009 19:47:28 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAOJlPvf022004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 24 Nov 2009 14:47:25 -0500 Received: from fche.csb (vpn-243-193.phx2.redhat.com [10.3.243.193]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAOJlPe7027552; Tue, 24 Nov 2009 14:47:25 -0500 Received: by fche.csb (Postfix, from userid 2569) id 957E458120; Tue, 24 Nov 2009 14:47:24 -0500 (EST) To: daniel-kay3@arcor.de Cc: systemtap@sourceware.org Subject: Re: Dereferencing simple pointers References: <26472256.1259084550376.JavaMail.ngmail@webmail08.arcor-online.net> From: fche@redhat.com (Frank Ch. Eigler) Date: Tue, 24 Nov 2009 19:47:00 -0000 In-Reply-To: <26472256.1259084550376.JavaMail.ngmail@webmail08.arcor-online.net> (daniel-kay's message of "Tue, 24 Nov 2009 18:42:30 +0100 (CET)") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q4/txt/msg00674.txt.bz2 daniel-kay3@arcor.de writes: > I am playing around with systemtap and am quite impressed. But there > is one thing that confuses me. Is there any way that I can > derefernce a single pointer from a function parameter inside a > probe? > [...] > # My Probe Attempt without success: > probe kernel.function("urandom_read") { > printf("%s\n", *($ppos)); > } > > I can't believe that this isn't possible... Right, we don't currently use "*" as a derferencing operator, but instead make a family of functions available: kernel_{char,...,long,string} and user_{char,...,long,string}: So if $ppos was a just a random old char* string, printf("%s\n", kernel_string($ppos)) - FChE