public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/15552] New: macro error messages should be improved
@ 2013-05-30 15:24 dsmith at redhat dot com
  2013-05-30 15:25 ` [Bug translator/15552] " dsmith at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: dsmith at redhat dot com @ 2013-05-30 15:24 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug translator/15552] macro error messages should be improved
  2013-05-30 15:24 [Bug translator/15552] New: macro error messages should be improved dsmith at redhat dot com
@ 2013-05-30 15:25 ` dsmith at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: dsmith at redhat dot com @ 2013-05-30 15:25 UTC (permalink / raw)
  To: systemtap

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

--- Comment #1 from David Smith <dsmith at redhat dot com> ---
Created attachment 7052
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7052&action=edit
macro file

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-30 15:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-30 15:24 [Bug translator/15552] New: macro error messages should be improved dsmith at redhat dot com
2013-05-30 15:25 ` [Bug translator/15552] " dsmith at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).