This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug and question


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]