From 2508b230c643707830bfc491c1606fe6d81bc92d Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 18 Oct 2005 12:40:59 +0000 Subject: 2005-10-18 Frank Ch. Eigler PR 1482 cont'd. * translator.cxx (emit_module_init): Set aside a variable for detailed probe point id. * tapsets.cxx (emit_registrations): Use it. (add_probe_point): Correct synthesized probe-point typo. --- tapsets.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index c174db2f..5fcef4aa 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -2330,7 +2330,7 @@ dwarf_derived_probe::add_probe_point(string const & funcname, string fn_or_stmt; if (q.has_function_str || q.has_function_num) fn_or_stmt = "function"; - if (q.has_inline_str || q.has_inline_num) + else if (q.has_inline_str || q.has_inline_num) fn_or_stmt = "inline"; else fn_or_stmt = "statement"; @@ -2552,7 +2552,10 @@ dwarf_derived_probe::emit_registrations (translator_output* o, o->newline() << "rc = register_kprobe (&(" << probe_name << "));"; } - o->newline() << "if (unlikely (rc)) break;"; + o->newline() << "if (unlikely (rc)) {"; + o->newline(1) << "probe_point = " << string_array_name (probenum) << "[i];"; + o->newline() << "break;"; + o->newline(-1) << "}"; o->newline(-1) << "}"; // if one failed, must roll back completed registations for this probe -- cgit