summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2008-08-13 11:56:16 -0400
committerDave Brolley <brolley@redhat.com>2008-08-13 11:56:16 -0400
commit5da0b3b2512ad912a845ff0bab34263cbb4a1dfc (patch)
treed8765d5e69768980b8259e64b4122dcf9c8c452f /tapsets.cxx
parent7f7720519a6848403d91cc90269a04bade0dac2e (diff)
parentb01369baab6f5bd6887e99ad44048197e0d38c04 (diff)
downloadsystemtap-steved-5da0b3b2512ad912a845ff0bab34263cbb4a1dfc.tar.gz
systemtap-steved-5da0b3b2512ad912a845ff0bab34263cbb4a1dfc.tar.xz
systemtap-steved-5da0b3b2512ad912a845ff0bab34263cbb4a1dfc.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Conflicts: ChangeLog testsuite/ChangeLog
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 6dcd2c00..664dfb1f 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -5931,8 +5931,25 @@ struct utrace_builder: public derived_probe_builder
else if (has_null_param (parameters, TOK_END))
flags = UDPF_END;
- // If we have a path, we need to validate it.
- if (has_path)
+ // Validate pid.
+ if (has_pid)
+ {
+ // We can't probe 'init' (pid 1).
+ if (pid < 2)
+ throw semantic_error ("process pid must be greater than 1",
+ location->tok);
+ }
+ // If we have a path whose value is "*", this means to probe
+ // everything. Convert this to a pid-based probe.
+ else if (has_path && path == "*")
+ {
+ has_path = false;
+ path.clear();
+ has_pid = true;
+ pid = 0;
+ }
+ // If we have a regular path, we need to validate it.
+ else if (has_path)
{
string::size_type start_pos, end_pos;
string component;