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]

[Bug translator/11598] New: @defined() with @cast() oddity


Using the following script:

====
probe begin
{
    printf("%d\n", &@cast(0, "task_struct", "kernel<linux/sched.h>")->pid)
    printf("%d\n", @defined(@cast(0, "task_struct", "kernel<linux/sched.h>")->pid)
           ? 1 : 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 see this output:

# stap ../tst.stp
540
1
1276
0

I don't see why the last @defined is coming out false instead of true (like the
1st @defined).

-- 
           Summary: @defined() with @cast() oddity
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: dsmith at redhat dot com


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.


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