summaryrefslogtreecommitdiffstats
path: root/staptree.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2010-04-07 16:41:41 -0700
committerJosh Stone <jistone@redhat.com>2010-04-07 16:46:57 -0700
commit1af1e62d9f67237277dd771a0cb78fa6b069742d (patch)
tree7a168a6caf1649dfe2ea470d43972c65619a06ad /staptree.cxx
parentea1e477a78969d44aeea51cfc3cbd2e8ed96cfe4 (diff)
downloadsystemtap-steved-1af1e62d9f67237277dd771a0cb78fa6b069742d.tar.gz
systemtap-steved-1af1e62d9f67237277dd771a0cb78fa6b069742d.tar.xz
systemtap-steved-1af1e62d9f67237277dd771a0cb78fa6b069742d.zip
Clean up and clarify semantic_error chaining
I consolidated the copy-construction that every target_symbol::chain caller was doing. I also removed the comments that target_symbol errors might be chained due to function wildcards, because it's not true -- each derived instance gets a deep_copy of the probe body. However, @cast can still chain since it may try multiple modules to resolve the casting dereference.
Diffstat (limited to 'staptree.cxx')
-rw-r--r--staptree.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/staptree.cxx b/staptree.cxx
index 4e57ac18..f7ce128e 100644
--- a/staptree.cxx
+++ b/staptree.cxx
@@ -224,8 +224,11 @@ target_symbol::assert_no_components(const std::string& tapset)
}
-void target_symbol::chain (semantic_error *e)
+void target_symbol::chain (const semantic_error &er)
{
+ semantic_error* e = new semantic_error(er);
+ if (!e->tok1)
+ e->tok1 = this->tok;
assert (e->chain == 0);
e->chain = this->saved_conversion_error;
this->saved_conversion_error = e;