public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: "Kai Wong" <kai_wong@symantec.com>
Cc: <systemtap@sources.redhat.com>
Subject: Re: question regarding accessing a target variable
Date: Sun, 25 Jan 2009 02:44:00 -0000	[thread overview]
Message-ID: <y0my6x0sppx.fsf@ton.toronto.redhat.com> (raw)
In-Reply-To: <1A193CCB5218B14589B1979BC7D510E00802F544@TUS1XCHCLUPIN11.enterprise.veritas.com> (Kai Wong's message of "Fri, 23 Jan 2009 16:11:11 -0700")

"Kai Wong" <kai_wong@symantec.com> writes:

> [...]
> void dummy_function(void *a) {
> 	typedef struct {
> 		int	x;
> 		int	y;
> 	} b_t;
> 	b_t *b = (b_t*)a;
> 	 ...
> }
>
> I can't access the target variables x and y in a systemtap script using
> $b->x and $b->y (I get " semantic error: not accessible at this
> address").
>
> Is there any support in the systemtap script language that lets me
> access x and y without having to write a separate embedded-c function
> for each as follows?
> [...]

I think sources.redhat.com/PR6704 (now 5634) should at some point
cover this, by allowing you write the cast from void* to "struct b_t".

Our pointer/typing operations are currently rather limited.  I've been
hoping that we wouldn't need the whole C suite of */&/(cast), but
maybe we'll have to bite that bullet and build it.

- FChE

  reply	other threads:[~2009-01-24 15:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28 22:52 help needed to probe own modules Kai_Wong
2008-10-29  1:15 ` Frank Ch. Eigler
     [not found]   ` <1A193CCB5218B14589B1979BC7D510E006F0EB1E@TUS1XCHCLUPIN11.enterprise.veritas.com>
     [not found]     ` <20081029201826.GC16968@redhat.com>
     [not found]       ` <1A193CCB5218B14589B1979BC7D510E006F0ECBC@TUS1XCHCLUPIN11.enterprise.veritas.com>
     [not found]         ` <1A193CCB5218B14589B1979BC7D510E007077719@TUS1XCHCLUPIN11.enterprise.veritas.com>
     [not found]           ` <20081104152629.GB28139@redhat.com>
     [not found]             ` <1A193CCB5218B14589B1979BC7D510E0070F51F0@TUS1XCHCLUPIN12.enterprise.veritas.com>
     [not found]               ` <20081107020842.GG20928@redhat.com>
2009-01-02 22:30                 ` question regarding accessing a target variable Kai Wong
2009-01-03  1:00                   ` Frank Ch. Eigler
2009-01-03  1:30                 ` Kai Wong
2009-01-03 13:50                   ` Frank Ch. Eigler
2009-01-06  0:26                 ` Kai Wong
2009-01-24 14:27                 ` Kai Wong
2009-01-25  2:44                   ` Frank Ch. Eigler [this message]
     [not found]                 ` <1A193CCB5218B14589B1979BC7D510E00802FAFC@TUS1XCHCLUPIN12.enterprise.veritas.com>
2009-01-27 21:40                   ` Frank Ch. Eigler

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=y0my6x0sppx.fsf@ton.toronto.redhat.com \
    --to=fche@redhat.com \
    --cc=kai_wong@symantec.com \
    --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).