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/15552] New: macro error messages should be improved


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

            Bug ID: 15552
           Summary: macro error messages should be improved
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: dsmith at redhat dot com

Created attachment 7051
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7051&action=edit
systemtap script

Error messages involving macros need more context. Specifically they need the
source line where the offending macro was called from.

====
# stap -I inc -g -vp4 ./macro_test.stp
Pass 1: parsed user script and 95 library script(s) using
28964virt/16096res/2472shr/13984data kb, in 200usr/30sys/248real ms.
semantic error: unable to find member 'd_flags' for struct dentry_stat_t
(alternatives: nr_dentry nr_unused age_limit want_pages dummy): operator '->'
at inc/macro_test.stpm:3:11
        source:     ( @dentry->d_flags )
                             ^

Pass 2: analyzed script: 1 probe(s), 2 function(s), 1 embed(s), 0 global(s)
using 276368virt/167220res/99684shr/67864data kb, in 1560usr/80sys/1668real ms.
Pass 2: analysis failed.  [man error::pass2]
====

In this case, the macro isn't the problem. The systemtap script is calling it
with the wrong type.  The error message should include the offending script
line.

To duplicate this error, put the macro file in a subdirectory called 'inc'.

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