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/3016] New: error accessing anonymous struct/union memeber


stap works fine with this script:

probe kernel.function("do_mpage_readpage")
{
  printf("%p", $page)
}

But it will generate an error with this script:

probe kernel.function("do_mpage_readpage")
{
        printf("%p", $page->mapping) 
}

stap -vv says:
...
Pass 1: parsed user script and 40 library script(s) in 310usr/0sys/372real ms.
probe do_mpage_readpage@fs/mpage.c:179 pc=0xc0000000000e716c
semantic error: unresolved target-symbol expression: identifier '$page' at
b.stp:3:15
...

The struct page is defined in "include/linux/mm.h" and mapping is an anonymous
struct member of struct page:

struct page {
      unsigned long flags;
      atomic_t _count; 
      atomic_t _mapcount; 
      union {
          struct {
              unsigned long private;
              struct address_space *mapping;
          };
      ...
}

-- 
           Summary: error accessing anonymous struct/union memeber
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: guanglei at cn dot ibm dot com


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

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