]> sourceware.org Git - systemtap.git/commitdiff
2005-03-15 Frank Ch. Eigler <fche@redhat.com>
authorfche <fche>
Tue, 15 Mar 2005 22:59:24 +0000 (22:59 +0000)
committerfche <fche>
Tue, 15 Mar 2005 22:59:24 +0000 (22:59 +0000)
* semtest.cxx: Print probe signatures properly.
* staptree.cxx (probe::printsig): New function.

ChangeLog
semtest.cxx
staptree.cxx
staptree.h

index 6a5c3dc447d18f551933b71931f03a4537cdb42e..66dc61b223e0646a30b6300b4fb2d0db5e42dc82 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
index b154209faa05893ffdb01566a120384f05679077..a37e3323188186d5e211d059bc1255364efe1506 100644 (file)
@@ -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++)
             {
index 51ac81135ef044029b823e7e095df1b6b321d370..34242c8f9e42e55102c0849d5a2b0508588cde80 100644 (file)
@@ -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;
 }
 
 
index cb22969be044c9cd6e50734ec78bed1b83244f9b..b28a334b215dc3c1e76a5b1dcecbc08ac3709fd0 100644 (file)
@@ -388,4 +388,5 @@ struct probe
   block* body;
   vector<vardecl*> locals;
   void print (ostream& o);
+  void printsig (ostream &o);
 };
This page took 0.029209 seconds and 5 git commands to generate.