else
{
pf->raw_components += "return";
- pf->raw_components += "=%#x ";
+ pf->raw_components += "=%#x";
pf->args.push_back(texp);
}
}
else
{
// non-.return probe: support $$parms, $$vars, $$locals
+ bool first = true;
Dwarf_Die result;
if (dwarf_child (&scopes[0], &result) == 0)
do
const char *diename = dwarf_diename (&result);
if (! diename) continue;
+ if (! first)
+ pf->raw_components += " ";
+ pf->raw_components += diename;
+
tsym->tok = e->tok;
tsym->base_name = "$";
tsym->base_name += diename;
}
}
- pf->raw_components += diename;
- pf->raw_components += "=? ";
+ pf->raw_components += "=?";
}
else
{
- pf->raw_components += diename;
- pf->raw_components += "=%#x ";
+ pf->raw_components += "=%#x";
pf->args.push_back(texp);
}
+ first = false;
}
while (dwarf_siblingof (&result, &result) == 0);
}
spawn stap $srcdir/$subdir/uprobes.stp -w -c "./jennie 1 2 3 4"
set ok 0
expect {
- -re {^process[^\r\n]*jennie[^\r\n]*main[^\r\n]*argc=0x[1-5][^\r\n]*\r\n} { incr ok; exp_continue }
- -re {^process[^\r\n]*jennie[^\r\n]*main[^\r\n]*return=0x0[^\r\n]*\r\n} { incr ok; exp_continue }
+ -re {^process[^\r\n]+jennie[^\r\n]+main[^\r\n]+arg[cv]=0x[0-9a-f]+\ +arg[cv]=0x[0-9a-f]+\r\n} { incr ok; exp_continue }
+ -re {^process[^\r\n]+jennie[^\r\n]+main[^\r\n]+return=0x0\r\n} { incr ok; exp_continue }
-timeout 30
timeout { }
eof { }
set test "vars"
# grab C statement that $$vars yields
-set cmd [concat stap -p3 -e {"probe kernel.statement(\"bio_copy_user@fs/bio.c+1\") \{print (\$\$vars)\}"} | grep {"printf.*="} | sed -e {"s/^.*MAXSTRINGLEN, \"//"} -e {s/.\".*$//}]
+set cmd [concat stap -p3 -e {"probe kernel.statement(\"bio_copy_user@fs/bio.c+1\") \{print (\$\$vars)\}"} | grep {"printf.*="} | sed -e {"s/^.*MAXSTRINGLEN, \"//"} -e {s/\".*$//}]
catch {eval exec $cmd} vars
# grab C statement that $$parms yields