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/5955] New: declaration of global variables with semicolon gives semantic error.


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

stap throws up the semantic error messages when global variables are declared
with semicolon.
==========================
[root@llm27lp1 obj]# cat a.stp
        global array;

        probe syscall.open {
                array[pid()]++;
        }
        ...................
        ................


==========================
[root@llm27lp1 obj]# ./stap -vvv a.stp
SystemTap translator/driver (version 0.6.2/0.128 built 2008-03-18)
Copyright (C) 2005-2008 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
Created temporary directory "/tmp/stapNDhJHA"
parse error: expected 'probe', 'global', 'function', or '%{'
        saw: operator ';' at a.stp:1:14
1 parse error(s).
Searched
'/home/systemtap/tmp/stap_testing_200803181128/install/share/systemtap/tapset/ppc64/*.stp',
found 1
Searched
'/home/systemtap/tmp/stap_testing_200803181128/install/share/systemtap/tapset/*.stp',
found 37
Pass 1: parsed user script and 38 library script(s) in 960usr/10sys/1077real ms.
Pass 1: parse failed.  Try again with more '-v' (verbose) options.
Running rm -rf /tmp/stapNDhJHA
=====================================

As systemtap allows semicolon at the end of statements(eventhough if it is not
required), it should also allow semicolon at the end of global declaration
statement. A C-programmer(kernel developer to be precise) may commit this
mistake frequently.

-- 
           Summary: declaration of global variables with semicolon gives
                    semantic error.
           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=5955

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