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/20389] New: warn on $var.field when $var->field correct


https://sourceware.org/bugzilla/show_bug.cgi?id=20389

            Bug ID: 20389
           Summary: warn on  $var.field   when $var->field correct
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: fche at redhat dot com
  Target Milestone: ---

I could've sworn we already have a warning for this, but can't find it:
e.g.:

stap -p4 -e ' probe kernel.function("__d_drop") { x=$dentry->d_lockref.count
println(x) }'
WARNING: never-assigned local variable 'count' (similar: x): identifier 'count'
at <input>:1:59
 source:  probe kernel.function("__d_drop") { x=$dentry->d_lockref.count
println(x) }
                                                                   ^
semantic error: while processing probe
kernel.function("__d_drop@fs/dcache.c:468") from: kernel.function("__d_drop")

semantic error: 'struct lockref' is being accessed instead of a member:
identifier '$dentry' at :1:40
        source:  probe kernel.function("__d_drop") { x=$dentry->d_lockref.count
println(x) }

instead of something saying that the '.' should have been a '->'.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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