This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/11598] @defined() with @cast() oddity
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 13 May 2010 21:23:20 -0000
- Subject: [Bug translator/11598] @defined() with @cast() oddity
- References: <20100513210311.11598.dsmith@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jistone at redhat dot com 2010-05-13 21:23 -------
(In reply to comment #0)
> printf("%d\n", &@cast(0, "task_struct", "kernel<linux/sched.h>")->rcu)
> printf("%d\n", @defined(@cast(0, "task_struct", "kernel<linux/sched.h>")->rcu)
> ? 1 : 0)
> I don't see why the last @defined is coming out false instead of true (like the
> 1st @defined).
It's because @defined works by checking whether the $target of @cast would
normally be a valid access. If you tried this case, you'd get:
semantic error: 'struct rcu_head' is being accessed instead of a member
That's why the printf still works with a '&' in front -- just use the same
thing: @defined(&@cast(...)->rcu)
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://sourceware.org/bugzilla/show_bug.cgi?id=11598
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.