]> sourceware.org Git - systemtap.git/commitdiff
Support -L for nodebuginfo sdt.
authorStan Cox <scox@redhat.com>
Wed, 28 Jul 2010 16:59:35 +0000 (12:59 -0400)
committerStan Cox <scox@redhat.com>
Wed, 28 Jul 2010 16:59:35 +0000 (12:59 -0400)
* tapsets.cxx (uprobe_derived_probe::getargs): New.
(uprobe_derived_probe::saveargs): New.
(uprobe_derived_probe::args): New.

* sdt_misc.exp: Change test 6 to test -L.

tapsets.cxx
testsuite/systemtap.base/sdt_misc.exp

index 99840dc2f48d3c20b57e84fe33d04b794085b332..d7b5fda3e988b5c15d540efbb3066ea24b04d5f3 100644 (file)
@@ -453,6 +453,10 @@ struct uprobe_derived_probe: public dwarf_derived_probe
 
   void emit_unprivileged_assertion (translator_output*);
   void print_dupe_stamp(ostream& o) { print_dupe_stamp_unprivileged_process_owner (o); }
+  void getargs(std::list<std::string> &arg_set) const;
+  void saveargs(int nargs);
+private:
+  list<string> args;
 };
 
 struct dwarf_derived_probe_group: public derived_probe_group
@@ -5109,6 +5113,7 @@ sdt_query::handle_query_module()
              uprobe_derived_probe* p =
                new uprobe_derived_probe ("", "", 0, q.module_val, section,
                                          q.statement_num_val, reloc_addr, q, 0);
+             p->saveargs (arg_count);
              results.push_back (p);
            }
         }
@@ -5945,6 +5950,22 @@ uprobe_derived_probe::join_group (systemtap_session& s)
 }
 
 
+void
+uprobe_derived_probe::getargs(std::list<std::string> &arg_set) const
+{
+  dwarf_derived_probe::getargs(arg_set);
+  arg_set.insert(arg_set.end(), args.begin(), args.end());
+}
+
+
+void
+uprobe_derived_probe::saveargs(int nargs)
+{
+  for (int i = 1; i <= nargs; i++)
+    args.push_back("$arg" + lex_cast (i) + ":long");
+}
+
+
 void
 uprobe_derived_probe::emit_unprivileged_assertion (translator_output* o)
 {
index 0e0c9b1658ad8b1189a2678e306723213adce580..d2d1a4163e484e67a6a7b13dadaa69a0606674c1 100644 (file)
@@ -476,11 +476,14 @@ if {$ok == 4 && $ko == 0} {
 # 6. Test .mark probe wildcard matching
 
 set ok 0
-verbose -log "spawn $stap_path -l \"process(\"./sdt_types.x\").mark(\"*\")"
-spawn $stap_path -l "process(\"./sdt_types.x\").mark(\"*\")"
+verbose -log "spawn $stap_path -L \"process(\"./sdt_types.x\").mark(\"*\")"
+spawn $stap_path -L "process(\"./sdt_types.x\").mark(\"*\")"
 
 expect {
     -timeout 180
+    -re {mark\(\"[a-z_]+\"\) .arg1:long .arg2:long .arg3:long .arg4:long .arg5:long .arg6:long .arg7:long .arg8:long\n} { incr ok; exp_continue }
+    -re {mark\(\"[a-z_]+\"\) .arg1:long .arg2:long\n} { incr ok; exp_continue }
+    -re {mark\(\"[a-z_]+\"\) .arg1:long\n} { incr ok; exp_continue }
     -re {mark\(\"[a-z_]+\"\)} { incr ok; exp_continue }
     timeout { fail "$test (timeout)" }
     eof { }
This page took 0.053795 seconds and 5 git commands to generate.