* [Bug translator/7035] New: -L mode should not suppress all errors
@ 2008-11-17 14:26 fche at redhat dot com
2008-11-18 5:55 ` [Bug translator/7035] " wenji dot huang at oracle dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: fche at redhat dot com @ 2008-11-17 14:26 UTC (permalink / raw)
To: systemtap
This is wrong:
% stap -r /sdfijsdfoidf -L 'kernel.function("*")'
% echo $?
0
This is more like it, though the "pass 2..." line is probably unhelpful.
% stap -r /sdfijsdfoidf -e 'probe kernel.function("*") {}'
semantic error: libdwfl failure (missing kernel /sdfijsdfoidf x86_64 debuginfo):
No such file or directory while resolving probe point kernel.function("*")
semantic error: no probes found
Pass 2: analysis failed. Try again with more '-v' (verbose) options.
% echo $?
1
--
Summary: -L mode should not suppress all errors
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: fche at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=7035
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug translator/7035] -L mode should not suppress all errors
2008-11-17 14:26 [Bug translator/7035] New: -L mode should not suppress all errors fche at redhat dot com
@ 2008-11-18 5:55 ` wenji dot huang at oracle dot com
2008-11-18 17:18 ` fche at redhat dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: wenji dot huang at oracle dot com @ 2008-11-18 5:55 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2008-11-18 05:53 -------
Current listing_mode (-l or -L) blocks all the errors. We can make -L out of
this restriction.
stap -r /sdfijsdfoidf -l 'kernel.function("*")' will still return 0.
stap -r /sdfijsdfoidf -L 'kernel.function("*")' will print error and return 1.
stap -r /sdfijsdfoidf -ul 'kernel.function("*")' will print error and return 1.
stap -L 'kernel.function("abcdef")' will print error and return 1.
diff --git a/elaborate.cxx b/elaborate.cxx
index 7cbac31..def4846 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -1446,8 +1446,8 @@ systemtap_session::print_error (const semantic_error& e)
string message_str[2];
string align_semantic_error (" ");
- // NB: we don't print error messages during listing mode.
- if (listing_mode) return;
+ // NB: we don't print error messages during listing mode -l but during -L.
+ if (listing_mode && !unoptimized) return;
// We generate two messages. The second one ([1]) is printed
// without token compression, for purposes of duplicate elimination.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=7035
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug translator/7035] -L mode should not suppress all errors
2008-11-17 14:26 [Bug translator/7035] New: -L mode should not suppress all errors fche at redhat dot com
2008-11-18 5:55 ` [Bug translator/7035] " wenji dot huang at oracle dot com
@ 2008-11-18 17:18 ` fche at redhat dot com
2008-11-19 5:32 ` wenji dot huang at oracle dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2008-11-18 17:18 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2008-11-18 17:16 -------
Error printing should probably work the same way with -l and -L.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=7035
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug translator/7035] -L mode should not suppress all errors
2008-11-17 14:26 [Bug translator/7035] New: -L mode should not suppress all errors fche at redhat dot com
2008-11-18 5:55 ` [Bug translator/7035] " wenji dot huang at oracle dot com
2008-11-18 17:18 ` fche at redhat dot com
@ 2008-11-19 5:32 ` wenji dot huang at oracle dot com
2008-11-25 2:08 ` wenji dot huang at oracle dot com
2008-11-27 15:54 ` fche at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: wenji dot huang at oracle dot com @ 2008-11-19 5:32 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2008-11-19 05:31 -------
Seems the return value depended on number_errors affected by print_error.So, all
the error will be printed and correct value can be returned.
diff --git a/elaborate.cxx b/elaborate.cxx
index 7cbac31..def4846 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -1446,8 +1446,8 @@ systemtap_session::print_error (const semantic_error& e)
string message_str[2];
string align_semantic_error (" ");
- // NB: we don't print error messages during listing mode.
- if (listing_mode) return;
// We generate two messages. The second one ([1]) is printed
// without token compression, for purposes of duplicate elimination.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=7035
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug translator/7035] -L mode should not suppress all errors
2008-11-17 14:26 [Bug translator/7035] New: -L mode should not suppress all errors fche at redhat dot com
` (2 preceding siblings ...)
2008-11-19 5:32 ` wenji dot huang at oracle dot com
@ 2008-11-25 2:08 ` wenji dot huang at oracle dot com
2008-11-27 15:54 ` fche at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: wenji dot huang at oracle dot com @ 2008-11-25 2:08 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2008-11-25 02:06 -------
Update the patch to block "Pass x:" message. Now
$ stap -rafda -l 'kernel.function("*")'
semantic error: libdwfl failure (missing kernel afda i686 debuginfo): No such
file or directory while resolving probe point kernel.function("*")
$ stap -L 'kernel.function("abcde")'
semantic error: no match while resolving probe point kernel.function("abcde")
Patch:
diff --git a/elaborate.cxx b/elaborate.cxx
index 7cbac31..0dd8062 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -1446,9 +1446,6 @@ systemtap_session::print_error (const semantic_error& e)
string message_str[2];
string align_semantic_error (" ");
- // NB: we don't print error messages during listing mode.
- if (listing_mode) return;
-
// We generate two messages. The second one ([1]) is printed
// without token compression, for purposes of duplicate elimination.
// This way, the same message that may be generated once with a
diff --git a/main.cxx b/main.cxx
index 406228a..40dbeec 100644
--- a/main.cxx
+++ b/main.cxx
@@ -937,7 +937,7 @@ main (int argc, char * const argv [])
<< endl;
}
- if (rc)
+ if (rc && !s.listing_mode)
cerr << "Pass 1: parse failed. "
<< "Try again with more '-v' (verbose) options."
<< endl;
@@ -965,7 +965,7 @@ main (int argc, char * const argv [])
<< TIMESPRINT
<< endl;
- if (rc)
+ if (rc && !s.listing_mode)
cerr << "Pass 2: analysis failed. "
<< "Try again with more '-v' (verbose) options."
<< endl;
--
http://sourceware.org/bugzilla/show_bug.cgi?id=7035
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug translator/7035] -L mode should not suppress all errors
2008-11-17 14:26 [Bug translator/7035] New: -L mode should not suppress all errors fche at redhat dot com
` (3 preceding siblings ...)
2008-11-25 2:08 ` wenji dot huang at oracle dot com
@ 2008-11-27 15:54 ` fche at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2008-11-27 15:54 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2008-11-27 15:53 -------
commit 708ce1f, thanks!
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=7035
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-11-27 15:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-17 14:26 [Bug translator/7035] New: -L mode should not suppress all errors fche at redhat dot com
2008-11-18 5:55 ` [Bug translator/7035] " wenji dot huang at oracle dot com
2008-11-18 17:18 ` fche at redhat dot com
2008-11-19 5:32 ` wenji dot huang at oracle dot com
2008-11-25 2:08 ` wenji dot huang at oracle dot com
2008-11-27 15:54 ` fche 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).