From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18826 invoked by alias); 4 Sep 2010 18:22:25 -0000 Received: (qmail 18815 invoked by uid 22791); 4 Sep 2010 18:22:24 -0000 X-SWARE-Spam-Status: No, hits=-5.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Sat, 04 Sep 2010 18:22:19 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o84IMF5D014044 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 4 Sep 2010 14:22:15 -0400 Received: from fche.csb (vpn-8-23.rdu.redhat.com [10.11.8.23]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o84IMErk007583; Sat, 4 Sep 2010 14:22:14 -0400 Received: by fche.csb (Postfix, from userid 2569) id E19E3580F4; Sat, 4 Sep 2010 14:22:13 -0400 (EDT) Date: Sat, 04 Sep 2010 18:22:00 -0000 From: "Frank Ch. Eigler" To: Hui Zhu Cc: Steven , "gdb@sourceware.org" , linux-kernel@vger.kernel.org, Michael Snyder , Marc Khouzam , Thiago Jung Bauermann Subject: Re: Linux Kernel GDB tracepoint module 2010-8-30 release Message-ID: <20100904182213.GD10118@redhat.com> References: <1283504768.2100.43.camel@steven> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00034.txt.bz2 Hi - Hui Zhu wrote: > I met a issue with build systemtap. Build it need (install > elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel), but > ubuntu looks don't have it. It is there (apt-get builddep systemtap), but you can also use the bundled-elfutils mode in the README, which uses a private source tarball / build of elfutils. > > #! /usr/bin/stap -g > > probe kernel.function("vfs_readdir") { > > �println(%{ jiffies_64 %}) > > �println($file$) > > } > > parse error: expected literal string or number > saw: embedded-code at ./1.sh:3:14 > source: println(%{ jiffies_64 %}) This particular script needs to be run with "stap -g" (guru mode) because it uses embedded-C to access the jiffies_64 value instead of debuginfo. > > #! /usr/bin/stap > > probe kernel.statement("*@fs/readdir.c:29") { > > �println($res) > > } > > > > semantic error: not accessible at this address: identifier '$res' at ./1.sh:3:14 > source: println($res) That can happen if your line number is not quite right, or if you're using a version of gcc prior to the VTA (better debuginfo for local variables) code released in 4.5 (backported to 4.4 in Red Hat distros). (More recent versions of systemtap may also help.) If OTOH gdb can access the variable there but systemtap can't, then we have a bug (and I'd appreciate your time helping collect some extra data to help fix it). - FChE