]> sourceware.org Git - systemtap.git/commitdiff
improve error message if script requires -g but lacks it, part 3
authorFrank Ch. Eigler <fche@redhat.com>
Tue, 24 Jan 2012 03:42:52 +0000 (22:42 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Tue, 24 Jan 2012 03:42:52 +0000 (22:42 -0500)
* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Suggest -g
  if missing.
  (dwarf_cast_expanding_visitor::visit_cast_op): Ditto.
  (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto too.

tapsets.cxx

index ba36ffb6bd1fd81b57c0382260f7f1ad04338456..aeb742ddd279cadb176118097ce3c9729afc0d74 100644 (file)
@@ -3447,7 +3447,7 @@ dwarf_var_expanding_visitor::visit_target_symbol (target_symbol *e)
     {
       bool lvalue = is_active_lvalue(e);
       if (lvalue && !q.sess.guru_mode)
-        throw semantic_error(_("write to target variable not permitted"), e->tok);
+        throw semantic_error(_("write to target variable not permitted; need stap -g"), e->tok);
 
       // XXX: process $context vars should be writeable
 
@@ -3877,7 +3877,7 @@ void dwarf_cast_expanding_visitor::visit_cast_op (cast_op* e)
 {
   bool lvalue = is_active_lvalue(e);
   if (lvalue && !s.guru_mode)
-    throw semantic_error(_("write to @cast context variable not permitted"), e->tok);
+    throw semantic_error(_("write to @cast context variable not permitted; need stap -g"), e->tok);
 
   if (e->module.empty())
     e->module = "kernel"; // "*" may also be reasonable to search all kernel modules
@@ -8688,7 +8688,7 @@ tracepoint_var_expanding_visitor::visit_target_symbol_arg (target_symbol* e)
   // we can only write to dereferenced fields, and only if guru mode is on
   bool lvalue = is_active_lvalue(e);
   if (lvalue && (!dw.sess.guru_mode || e->components.empty()))
-    throw semantic_error(_F("write to tracepoint variable '%s' not permitted", e->name.c_str()), e->tok);
+    throw semantic_error(_F("write to tracepoint variable '%s' not permitted; need stap -g", e->name.c_str()), e->tok);
 
   // XXX: if a struct/union arg is passed by value, then writing to its fields
   // is also meaningless until you dereference past a pointer member.  It's
This page took 0.046733 seconds and 5 git commands to generate.