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/5956] New: Usage of "NULL" in systemtap script throws non-apparent error messages


Environment: 2.6.24 kernel, systemtap 20080315 snapshot and elfutils-0.130

If I use "NULL" in systemtap scripts, stap throws non-apparent error messages.
Systemtap user finds it difficult to understand these error messages. So there
is a need for more obvious/apparent error message for this situation.


=======================================================
[root@llm27lp1 obj]# cat b.stp
        global array

        probe syscall.write {
                if ($buf != NULL)
                array[pid()]++;
        }
        ....................
        .....................
======================================
Pass 3: translated to C into
"/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c" in 0usr/0sys/2real ms.
Running make -C "/lib/modules/2.6.24/build" M="/tmp/stapAyIw1G" modules >/dev/null
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:92: error: expected
identifier or '(' before 'void'
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:92: error: expected
')' before numeric constant
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:93: error: expected
';' before 'union'
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c: In function
'probe_1109':
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:237: error: expected
identifier before '(' token
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:259: error: expected
identifier before '(' token
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:268: error: 'struct
probe_1109_locals' has no member named '__tmp0'
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:273: error: 'struct
probe_1109_locals' has no member named '__tmp2'
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:273: error: 'struct
probe_1109_locals' has no member named '__tmp0'
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:274: error: 'struct
probe_1109_locals' has no member named '__tmp3'
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:274: error: 'struct
probe_1109_locals' has no member named '__tmp2'
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:275: error: 'struct
probe_1109_locals' has no member named '__tmp2'
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:276: error: 'struct
probe_1109_locals' has no member named '__tmp0'
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:276: error: 'struct
probe_1109_locals' has no member named '__tmp2'
/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.c:277: error: 'struct
probe_1109_locals' has no member named '__tmp3'
make[1]: *** [/tmp/stapAyIw1G/stap_7513fe211e17b3d61924ad9133f1d1e1_857.o] Error 1
make: *** [_module_/tmp/stapAyIw1G] Error 2
==================================================

-- 
           Summary: Usage of "NULL" in systemtap script throws non-apparent
                    error messages
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: srinivasa at in dot ibm dot com


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

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