From fcff848ec9185300024200b1d8323607f4434377 Mon Sep 17 00:00:00 2001 From: hunt Date: Thu, 12 Oct 2006 18:30:24 +0000 Subject: 2006-10-12 Martin Hunt * translate.cxx (emit_common_header): Add a kretprobe_instance pointer to struct context. (emit_symbol_data): Include absolute symbols. * tapsets.cxx (emit_common_header): Initialize the kprobe instance pointer to 0; (emit_probe_entries): Set kretprobe instance pointer if appropriate. --- tapsets.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index d2d4b9c2..0fe16115 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -164,6 +164,7 @@ derived_probe::emit_common_header (translator_output* o) o->newline() << "c->last_error = 0;"; o->newline() << "c->nesting = 0;"; o->newline() << "c->regs = 0;"; + o->newline() << "c->pi = 0;"; o->newline() << "c->actioncount = 0;"; o->newline() << "return c;"; o->newline(-1) << "}"; @@ -3616,6 +3617,8 @@ dwarf_derived_probe::emit_probe_entries (translator_output* o) << "[ (probe_instance - &(" << probe_array << "[0]))];"; emit_probe_prologue (o, "STAP_SESSION_RUNNING"); o->newline() << "c->regs = regs;"; + if (has_return) + o->newline() << "c->pi = probe_instance;"; // NB: locals are initialized by probe function itself o->newline() << name << " (c);"; -- cgit