diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | tapsets.cxx | 3 | ||||
-rw-r--r-- | translate.cxx | 6 |
3 files changed, 19 insertions, 2 deletions
@@ -1,3 +1,15 @@ +2006-10-12 Martin Hunt <hunt@redhat.com> + + * 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. + + 2006-10-11 David Smith <dsmith@redhat.com> * tapsets.cxx (in_kprobes_function): New function that looks up 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);"; diff --git a/translate.cxx b/translate.cxx index 2dd144db..2111eee1 100644 --- a/translate.cxx +++ b/translate.cxx @@ -823,6 +823,7 @@ c_unparser::emit_common_header () // See c_unparser::visit_statement() o->newline() << "const char *last_stmt;"; o->newline() << "struct pt_regs *regs;"; + o->newline() << "struct kretprobe_instance *pi;"; o->newline() << "union {"; o->indent(1); @@ -3679,7 +3680,7 @@ emit_symbol_data (systemtap_session& s) // excessive penalty of i18n code in some glibc/coreutils versions. string sorted_kallsyms = s.tmpdir + "/symbols.sorted"; - string sortcmd = "grep \" [tT] \" /proc/kallsyms | "; + string sortcmd = "grep \" [AtT] \" /proc/kallsyms | "; sortcmd += "sort "; #if __LP64__ @@ -3717,7 +3718,7 @@ emit_symbol_data (systemtap_session& s) } // NB: kallsyms includes some duplicate addresses - if ((type == "t" || type == "T") && lastaddr != addr) + if ((type == "t" || type == "T" || type == "A") && lastaddr != addr) { kallsyms_out << " { 0x" << addr << ", " << "\"" << sym << "\", " @@ -3872,6 +3873,7 @@ translate_pass (systemtap_session& s) } rc |= emit_symbol_data (s); + s.op->line() << "\n"; delete s.op; |