summaryrefslogtreecommitdiffstats
path: root/tapsets.h
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2010-02-23 12:48:49 -0600
committerDavid Smith <dsmith@redhat.com>2010-02-23 12:48:49 -0600
commita50de93955fe1272731dccfb3520514a9545f434 (patch)
tree162aba6d10ab730eb1383c71f2745e00ab7cdad9 /tapsets.h
parentd6c273473f7bea4d696c95ca48d55ca26e25ab2f (diff)
downloadsystemtap-steved-a50de93955fe1272731dccfb3520514a9545f434.tar.gz
systemtap-steved-a50de93955fe1272731dccfb3520514a9545f434.tar.xz
systemtap-steved-a50de93955fe1272731dccfb3520514a9545f434.zip
PR 10690 (partial fix). Handle '.=' operator in procfs probes.
* tapsets.h (var_expanding_visitor): Add 'valid_ops' and 'op' member variables. * tapsets.cxx (var_expanding_visitor::var_expanding_visitor): Set 'valid_ops' to '='. By default, var_expanding_visitor classes only handle the '=' operator. (var_expanding_visitor::visit_assignment): Remember what operator we're handling. When an operator is found that isn't in the 'valid_ops' set, error. * tapset-procfs.cxx (procfs_var_expanding_visitor::procfs_var_expanding_visitor): Add '.=' to the 'valid_ops' set. (procfs_var_expanding_visitor::visit_target_symbol): Handle the '.=' operator when the target variable is an lvalue.
Diffstat (limited to 'tapsets.h')
-rw-r--r--tapsets.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tapsets.h b/tapsets.h
index 115f2ccf..d415ef42 100644
--- a/tapsets.h
+++ b/tapsets.h
@@ -49,8 +49,10 @@ struct var_expanding_visitor: public update_visitor
{
static unsigned tick;
std::stack<functioncall**> target_symbol_setter_functioncalls;
+ std::set<std::string> valid_ops;
+ std::string *op;
- var_expanding_visitor() {}
+ var_expanding_visitor ();
void visit_assignment (assignment* e);
};