From c72aa911bf91607626427dac0e00ea0c751a22ba Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 16 Mar 2010 11:11:26 -0700 Subject: PR10831: Remember derived "aliases" in the probe chain SDT and label probes are not really final probe types themselves, but rather they get translated into some other final type. This patch preserves this relationship as if SDT and label probes were dynamically generated aliases. * elaborate.cxx (probe::create_alias): New, fake an alias_derived_probe. * tapsets.cxx (query_label): Append the label name as an alias. (sdt_query::handle_query_module): Let convert_location do the alias. (sdt_query::convert_location): Translate the location using an alias. * main.cxx (printscript): Elaborate the derivation debug dump. --- elaborate.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'elaborate.cxx') diff --git a/elaborate.cxx b/elaborate.cxx index 11d6142b..3a0e6dd9 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -517,6 +517,19 @@ private: const probe_alias *alias; // Used to check for recursion }; +probe* +probe::create_alias(probe_point* l, probe_point* a) +{ + vector aliases(1, a); + probe_alias* p = new probe_alias(aliases); + p->tok = tok; + p->locations.push_back(l); + p->body = body; + p->privileged = privileged; + p->epilogue_style = false; + return new alias_derived_probe(this, l, p); +} + struct alias_expansion_builder -- cgit