* semtest.cxx: Print probe signatures properly.
* staptree.cxx (probe::printsig): New function.
+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.
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++)
{
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;
}
block* body;
vector<vardecl*> locals;
void print (ostream& o);
+ void printsig (ostream &o);
};