From 35d4ab18d5d333ffcac436ea174beb7201275c65 Mon Sep 17 00:00:00 2001 From: fche Date: Fri, 21 Apr 2006 19:51:43 +0000 Subject: 2006-04-21 Frank Ch. Eigler PR 953 * elaborate.h (derived_probe): Add field "name". Stop passing "probe index" to other emit_* calls. (emit_probe_context_vars): New member function. * elaborate.cxx (derived_probe ctor): Generate unique name. * translate.cxx (*): Adapt to index->name. (emit_probe): Realize that probe locals only occur at nesting=0. * tapsets.cxx (*derived_probe::emit_*): Adapt to index->name. (mark_var_expanding_copy_visitor): New class to process $argN. (mark_derived_probe ctor): Call it. (mark_derived_probe::emit_probe_context_vars): Do it. * buildrun.cxx (compile_pass): Add more optional gcc verbosity. Add CFLAGS += -freorder-blocks. * testsuite/buildok/marker.stp: New test. --- elaborate.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'elaborate.cxx') diff --git a/elaborate.cxx b/elaborate.cxx index ea394f94..3db165d4 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -39,9 +39,13 @@ lex_cast(IN const & in) // ------------------------------------------------------------------------ +unsigned derived_probe::last_probeidx = 0; + derived_probe::derived_probe (probe *p): base (p) { + this->name = string ("probe_") + lex_cast(last_probeidx ++); + if (p) { this->locations = p->locations; @@ -54,8 +58,11 @@ derived_probe::derived_probe (probe *p): derived_probe::derived_probe (probe *p, probe_point *l): base (p) { + this->name = string ("probe_") + lex_cast(last_probeidx ++); + if (l) this->locations.push_back (l); + if (p) { this->tok = p->tok; -- cgit