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/11370] New: multi-header @cast


Sometimes a header may not #include everything that it needs to stand alone, and
so @cast will fail to build a module around it:

$ stap -ue 'probe begin {
println(&@cast(0, "fs_struct", "kernel<linux/fs_struct.h>")->root)
}' --vp 04
Running make -C '/lib/modules/2.6.32.9-67.fc12.x86_64/build'
M='/tmp/staprfow66/typequery_kmod_1' modules ARCH="x86_64" V=1
[...]
include/linux/fs_struct.h:8: error: expected specifier-qualifier-list before
?rwlock_t?
include/linux/fs_struct.h:16: warning: ?struct task_struct? declared inside
parameter list
include/linux/fs_struct.h:16: warning: its scope is only this definition or
declaration, which is probably not what you want
[...]
semantic error: type definition 'fs_struct' not found: identifier '@cast' at
<input>:2:10
        source: println(&@cast(0, "fs_struct", "kernel<linux/fs_struct.h>")->root)
                         ^

We could work around this by allowing @cast to specify multiple headers which
should be compiled together.  Frank suggested listing them like this:

  @cast(x, "foo", "kernel<foo.h><bar.h>")->...

-- 
           Summary: multi-header @cast
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: jistone at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11370

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