summaryrefslogtreecommitdiffstats
path: root/parse.cxx
diff options
context:
space:
mode:
authorwcohen <wcohen>2006-05-09 12:55:56 +0000
committerwcohen <wcohen>2006-05-09 12:55:56 +0000
commit0323ed4d37fee4f84251a74dce04271160d2d1f1 (patch)
tree6ef595d8821c3c7ffc2c2b54f59133831eed4adf /parse.cxx
parentf272aaccb24b64bf1baa1d70722e0608d654297f (diff)
downloadsystemtap-steved-0323ed4d37fee4f84251a74dce04271160d2d1f1.tar.gz
systemtap-steved-0323ed4d37fee4f84251a74dce04271160d2d1f1.tar.xz
systemtap-steved-0323ed4d37fee4f84251a74dce04271160d2d1f1.zip
Print out information to make it easier to determine which probe
in script associated with timing information.
Diffstat (limited to 'parse.cxx')
-rw-r--r--parse.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/parse.cxx b/parse.cxx
index 96d9a5d4..0eba81bb 100644
--- a/parse.cxx
+++ b/parse.cxx
@@ -77,6 +77,16 @@ tt2str(token_type tt)
}
ostream&
+operator << (ostream& o, const source_loc& loc)
+{
+ o << loc.file << ":"
+ << loc.line << ":"
+ << loc.column;
+
+ return o;
+}
+
+ostream&
operator << (ostream& o, const token& t)
{
o << tt2str(t.type);
@@ -93,9 +103,7 @@ operator << (ostream& o, const token& t)
}
o << " at "
- << t.location.file << ":"
- << t.location.line << ":"
- << t.location.column;
+ << t.location;
return o;
}