+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.
+
2008-01-16 Eugene Teo <eteo@redhat.com>
* stapfuncs.5.in: Document signal.stp tapset functions.
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;
this->locations.push_back (pp);
if (cond)
- add_condition (cond);
+ add_condition (cond);
insert_condition_statement ();
// expand the signature string