else
exp = gen_mapped_saved_return(repl, e->sym_name());
+ // Propagate the DWARF type to the expression in the return probe.
+ if (repl->type_details && !exp->type_details)
+ exp->type_details = repl->type_details;
+
// Provide the variable to our parent so it can be used as a
// substitute for the target symbol.
provide (exp);
--- /dev/null
+#! stap -p2
+
+probe kernel.function("schedule_tail").return ?
+{
+ // Test the type propagated from a value saved at entry, with an error
+ // (semok/autocast11.stp makes sure this normally works)
+ mm = $prev->mm
+ println(mm->no_such_member)
+}
+
+probe process("stap").function("main").return ?
+{
+ // NB: if the access above fails as it should, we won't even get here, but
+ // this is still useful to give --runtime=dyninst something to test.
+ a = $argv
+ println(a->no_such_member)
+}
--- /dev/null
+#! stap -p2
+
+probe kernel.function("schedule_tail").return ?
+{
+ // Test the type propagated from a value saved at entry
+ mm = $prev->mm
+ println(mm->mmap)
+}
+
+probe process("stap").function("main").return ?
+{
+ a = $argv
+ println((a)[0])
+}