diff options
author | fche <fche> | 2005-03-15 22:59:24 +0000 |
---|---|---|
committer | fche <fche> | 2005-03-15 22:59:24 +0000 |
commit | 40a1cb627a1eb360cdb7de21c75a76c7fe137a76 (patch) | |
tree | 3d817b332e8eff16e15d3c0ffaabc905fe959d95 | |
parent | 9c0c0e4652824a0bf8f4da2175278b129fac6809 (diff) | |
download | systemtap-steved-40a1cb627a1eb360cdb7de21c75a76c7fe137a76.tar.gz systemtap-steved-40a1cb627a1eb360cdb7de21c75a76c7fe137a76.tar.xz systemtap-steved-40a1cb627a1eb360cdb7de21c75a76c7fe137a76.zip |
2005-03-15 Frank Ch. Eigler <fche@redhat.com>
* semtest.cxx: Print probe signatures properly.
* staptree.cxx (probe::printsig): New function.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | semtest.cxx | 3 | ||||
-rw-r--r-- | staptree.cxx | 8 | ||||
-rw-r--r-- | staptree.h | 1 |
4 files changed, 15 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2005-03-15 Frank Ch. Eigler <fche@redhat.com> + * semtest.cxx: Print probe signatures properly. + * staptree.cxx (probe::printsig): New function. + +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. diff --git a/semtest.cxx b/semtest.cxx index b154209f..a37e3323 100644 --- a/semtest.cxx +++ b/semtest.cxx @@ -155,7 +155,8 @@ main (int argc, char *argv []) for (unsigned j=0; j<f->probes.size(); j++) { probe* pn = f->probes[j]; - cerr << "Probe " << *pn->tok << endl; // XXX: print probespec + cerr << "Probe "; + pn->printsig (cerr); cerr << "locals:" << endl; for (unsigned k=0; k<pn->locals.size(); k++) { diff --git a/staptree.cxx b/staptree.cxx index 51ac8113..34242c8f 100644 --- a/staptree.cxx +++ b/staptree.cxx @@ -313,13 +313,19 @@ void stapfile::print (ostream& o) void probe::print (ostream& o) { o << "probe "; + printsig (o); + o << *body; +} + + +void probe::printsig (ostream& o) +{ for (unsigned i=0; i<locations.size(); i++) { o << (i>0 ? ", " : ""); locations[i]->print (o); } o << endl; - o << *body; } @@ -388,4 +388,5 @@ struct probe block* body; vector<vardecl*> locals; void print (ostream& o); + void printsig (ostream &o); }; |