summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authordsmith <dsmith>2008-01-16 17:05:50 +0000
committerdsmith <dsmith>2008-01-16 17:05:50 +0000
commit6f93ef37f7d97e3cf8f91b94df25adae7a510bfb (patch)
tree4d5761d5c14ef22987412e145e40e03efe574b43 /tapsets.cxx
parented22941d3e10e5723ead8381d79b55ba8a36981c (diff)
downloadsystemtap-steved-6f93ef37f7d97e3cf8f91b94df25adae7a510bfb.tar.gz
systemtap-steved-6f93ef37f7d97e3cf8f91b94df25adae7a510bfb.tar.xz
systemtap-steved-6f93ef37f7d97e3cf8f91b94df25adae7a510bfb.zip
2008-01-16 David Smith <dsmith@redhat.com>
PR 5608. * tapsets.cxx (visit_target_symbol): Print an error when trying to use a marker argument as an array or structure.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index ebc07ba3..4bb46786 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -5044,6 +5044,24 @@ mark_var_expanding_copy_visitor::visit_target_symbol (target_symbol* e)
if (is_active_lvalue (e))
throw semantic_error("write to marker parameter not permitted", e->tok);
+ if (e->components.size() > 0)
+ {
+ switch (e->components[0].first)
+ {
+ case target_symbol::comp_literal_array_index:
+ throw semantic_error("marker argument may not be used as array",
+ e->tok);
+ break;
+ case target_symbol::comp_struct_member:
+ throw semantic_error("marker argument may not be used as a structure",
+ e->tok);
+ break;
+ default:
+ throw semantic_error ("invalid marker argument use", e->tok);
+ break;
+ }
+ }
+
// Remember that we've seen a target variable.
target_symbol_seen = true;
@@ -5100,7 +5118,7 @@ mark_derived_probe::mark_derived_probe (systemtap_session &s,
this->locations.push_back (pp);
if (cond)
- add_condition (cond);
+ add_condition (cond);
insert_condition_statement ();
// expand the signature string