summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authorfche <fche>2007-03-30 19:17:02 +0000
committerfche <fche>2007-03-30 19:17:02 +0000
commitb8da0ad19d9dfcf88c4cd6dcf7b8aa73fc5016d7 (patch)
tree82225c0ef08f075dc0a5e9a8d59ed3d37a072b1c /elaborate.cxx
parent3be43eac84e5819b72dd311c3283ef2ea5bb1d83 (diff)
downloadsystemtap-steved-b8da0ad19d9dfcf88c4cd6dcf7b8aa73fc5016d7.tar.gz
systemtap-steved-b8da0ad19d9dfcf88c4cd6dcf7b8aa73fc5016d7.tar.xz
systemtap-steved-b8da0ad19d9dfcf88c4cd6dcf7b8aa73fc5016d7.zip
2007-03-30 Frank Ch. Eigler <fche@redhat.com>
PR 1570 * NEWS: Document probe handler language change re. inline functions. * stapprobes.5.in: Likewise. * tapsets.cxx: Many changes to simplify caches and implement new handling of inline functions, removed of stubs for future probes. * elaborate.cxx (derived_probe printsig_nested): New function. * elaborate.h: Declare it. * main.cxx (usage): Clarify "-r" meaning. (main): Tweak related "-p 4" message. 2007-03-30 Frank Ch. Eigler <fche@elastic.org> PR 1570. * memory.stp, scheduler.stp, signal.stp, LKET/signal.stp: Adapt to .inline -> .function change. 2007-03-30 Frank Ch. Eigler <fche@elastic.org> PR 1570 * */*.stp: Adapt to .inline -> .function change. * lib/stap_run.exp, stap_run2.exp, stap_run_binary.exp: Shorten pass/fail dejagnu log lines. * systemtap.syscall/sys.stp, test.tcl: Make slightly more compatible and failure more verbose.
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx36
1 files changed, 35 insertions, 1 deletions
diff --git a/elaborate.cxx b/elaborate.cxx
index be0cfcec..8ec376c0 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -62,8 +62,42 @@ derived_probe::derived_probe (probe *p, probe_point *l):
}
+void
+derived_probe::printsig (ostream& o) const
+{
+ probe::printsig (o);
+ printsig_nested (o);
+}
+
+void
+derived_probe::printsig_nested (ostream& o) const
+{
+ // We'd like to enclose the probe derivation chain in a /* */
+ // comment delimiter. But just printing /* base->printsig() */ is
+ // not enough, since base might itself be a derived_probe. So we,
+ // er, "cleverly" encode our nesting state as a formatting flag for
+ // the ostream.
+ ios::fmtflags f = o.flags (ios::internal);
+ if (f & ios::internal)
+ {
+ // already nested
+ o << " <- ";
+ base->printsig (o);
+ }
+ else
+ {
+ // outermost nesting
+ o << " /* <- ";
+ base->printsig (o);
+ o << " */";
+ }
+ // restore flags
+ (void) o.flags (f);
+}
+
+
probe_point*
-derived_probe::sole_location ()
+derived_probe::sole_location () const
{
if (locations.size() == 0)
throw semantic_error ("derived_probe with no locations", this->tok);