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
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);
}
}
}
+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)
{
# 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 { }