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/20423] New: improve error message for dwarf $var 'struct ... being accessed instead of member'


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

            Bug ID: 20423
           Summary: improve error message for dwarf $var 'struct ... being
                    accessed instead of member'
           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: ---

% stap -p2 -v -e 'probe kernel.function("dput") { println(
@cast($dentry->d_inode, "struct inode")->i_count) }'

Pass 1: parsed user script and 134 library scripts using
274368virt/76604res/7412shr/69340data kb, in 160usr/10sys/172real ms.
semantic error: while processing probe kernel.function("dput@fs/dcache.c:749")
from: kernel.function("dput")

semantic error: 'struct {...}' is being accessed instead of a member: operator
'@cast' at <input>:1:42
        source: probe kernel.function("dput") { println(
@cast($dentry->d_inode, "struct inode")->i_count) }
                                                         ^


Here, i_count is a struct atomic_t { unsigned long counter; }; but systemtap's
error message doesn't help a user.  We should be printing something better than
"{...}" for the struct/type name, and we should be identifying a member of that
struct/union as an example:

semantic error: 'struct atomic_t' is being accessed instead of a member such as
'->counter': operator '@cast' at <input>:1:42

-- 
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]