From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23977 invoked by alias); 12 Oct 2005 11:06:00 -0000 Mailing-List: contact systemtap-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sources.redhat.com Received: (qmail 23928 invoked by uid 22791); 12 Oct 2005 11:05:54 -0000 Subject: Re: Bug and question From: Sebastien Decugis To: "Daniel P. Berrange" Cc: SystemTAP In-Reply-To: <20051012100911.GB7552@redhat.com> References: <1129110154.7277.49.camel@decugiss.frec.bull.fr> <20051012100911.GB7552@redhat.com> Organization: Bull S.A. Date: Wed, 12 Oct 2005 11:06:00 -0000 Message-Id: <1129115258.7277.53.camel@decugiss.frec.bull.fr> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) X-MIMETrack: Itemize by SMTP Server on ECN002/FR/BULL(Release 5.0.12 |February 13, 2003) at 12/10/2005 13:19:28, Serialize by Router on ECN002/FR/BULL(Release 5.0.12 |February 13, 2003) at 12/10/2005 13:19:30, Serialize complete at 12/10/2005 13:19:30 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Virus-Scanned: by amavisd-new at frec.bull.fr X-SW-Source: 2005-q4/txt/msg00037.txt.bz2 Great, thank you! :) On Wed, 2005-10-12 at 11:09 +0100, Daniel P. Berrange wrote: > On Wed, Oct 12, 2005 at 11:42:33AM +0200, Sebastien Decugis wrote: > > I want to access a structure field of a parameter which is a char table, > > and I want to display it as a string. Is it possible? Here is what I > > want to do: > > Yes, but you need to use either 'user_string' or 'kernel_string' functions > to convert into the systemtap runtime string object. If you don't do this > you'll just get back the pointer as a long. > > > probe kernel.function("dev_put") { > > print("device name: " . $dev->name . "\n") > > } > > Try changing it to look like: > > probe kernel.function("dev_put") { > print("device name: " . kernel_string($dev->name) . "\n") > } > > Regards, > Dan. -- Sebastien Decugis Bull S.A.