public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Sebastien Decugis <sebastien.decugis@ext.bull.net>
Cc: SystemTAP <systemtap@sources.redhat.com>
Subject: Re: Bug and question
Date: Wed, 12 Oct 2005 10:09:00 -0000	[thread overview]
Message-ID: <20051012100911.GB7552@redhat.com> (raw)
In-Reply-To: <1129110154.7277.49.camel@decugiss.frec.bull.fr>

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.
-- 
|=- Red Hat, Global Professional Services, London.  +44 (0)7977 267 243 -=|
|=-         Perl modules: http://search.cpan.org/~danberr/              -=|
|=-             Projects: http://freshmeat.net/~danielpb/               -=|
|=- GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| 

  reply	other threads:[~2005-10-12 10:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-12  9:41 Sebastien Decugis
2005-10-12 10:09 ` Daniel P. Berrange [this message]
2005-10-12 11:06   ` Sebastien Decugis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051012100911.GB7552@redhat.com \
    --to=berrange@redhat.com \
    --cc=sebastien.decugis@ext.bull.net \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).