diff options
author | fche <fche> | 2005-03-15 22:38:27 +0000 |
---|---|---|
committer | fche <fche> | 2005-03-15 22:38:27 +0000 |
commit | 9c0c0e4652824a0bf8f4da2175278b129fac6809 (patch) | |
tree | c560854f3933fa4cfcf397c9fd040da913bd98bb /staptree.cxx | |
parent | 204b456c7c08bc40ffe1f21575461d92a544e92b (diff) | |
download | systemtap-steved-9c0c0e4652824a0bf8f4da2175278b129fac6809.tar.gz systemtap-steved-9c0c0e4652824a0bf8f4da2175278b129fac6809.tar.xz systemtap-steved-9c0c0e4652824a0bf8f4da2175278b129fac6809.zip |
2005-03-15 Frank Ch. Eigler <fche@redhat.com>
* TODO: New file. Include some probe-point-provider syntax examples.
* parse.cxx (lexer::scan, parser::parse_literal): Support hex, octal
numbers via strtol.
(parse_probe, parse_probe_point): Modify for dotted syntax.
* staptree.cxx: Ditto.
* parsetest.cxx, semtest.cxx: Print parse/sem results even if
.stp files were given on command line.
* parse.h, staptree.h: Rename probe_point_spec -> probe_point.
* runtest.sh: New test-runner front-end script.
* Makefile.am: Use it for TESTS_ENVIRONMENT.
* testsuite/*: Update probe point syntax. Add a bunch of new tests.
Diffstat (limited to 'staptree.cxx')
-rw-r--r-- | staptree.cxx | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/staptree.cxx b/staptree.cxx index 2bbdea9f..51ac8113 100644 --- a/staptree.cxx +++ b/staptree.cxx @@ -61,6 +61,18 @@ symboldecl::~symboldecl () } +probe_point::probe_point (): + tok (0), prov (0) +{ +} + + +probe_point::component::component (): + arg (0) +{ +} + + vardecl::vardecl () { } @@ -301,21 +313,26 @@ void stapfile::print (ostream& o) void probe::print (ostream& o) { o << "probe "; - for (unsigned i=0; i<location.size(); i++) + for (unsigned i=0; i<locations.size(); i++) { - o << (i>0 ? ":" : ""); - location[i]->print (o); + o << (i>0 ? ", " : ""); + locations[i]->print (o); } o << endl; o << *body; } -void probe_point_spec::print (ostream& o) +void probe_point::print (ostream& o) { - o << functor; - if (arg) - o << "(" << *arg << ")"; + for (unsigned i=0; i<components.size(); i++) + { + if (i>0) o << "."; + probe_point::component* c = components[i]; + o << c->functor; + if (c->arg) + o << "(" << *c->arg << ")"; + } } |