summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authorgraydon <graydon>2005-07-29 01:47:56 +0000
committergraydon <graydon>2005-07-29 01:47:56 +0000
commit77de5e9eca19f041e85681439f41ea35d30a37c9 (patch)
tree0d4ec2f749ace9659df8f1082f1a8a8e2797e148 /elaborate.cxx
parentb2d5d95caa573e486b6503406b688da824cd20a9 (diff)
downloadsystemtap-steved-77de5e9eca19f041e85681439f41ea35d30a37c9.tar.gz
systemtap-steved-77de5e9eca19f041e85681439f41ea35d30a37c9.tar.xz
systemtap-steved-77de5e9eca19f041e85681439f41ea35d30a37c9.zip
2005-07-28 Graydon Hoare <graydon@redhat.com>
* elaborate.cxx (derived_probe::derived_probe): Accept NULL probe. * staptree.cxx (provide, require): Move from here... * staptree.h: to here, and virtualize deep-copy methods. * translate.cxx (c_unparser::emit_common_header): Include loc2c-runtime.h * tapsets.cxx (dwflpp::iterate_over_modules): Use new, faster getmodules loop. (dwflpp::literal_stmt_for_local): New method, call loc2c. (var_expanding_copy_visitor): New struct which expands $-vars. (dwarf_derived_probe): Rebuild this->body using var expander. (query_function): Refactor logic a bit for speed. * loc2c.{c,h}: Copies (with minor changes) of Roland's work from elfutils CVS. * Makefile.am (AM_CFLAGS): Set to elfutils-style. (stap_SOURCES): Add loc2c.c. * Makefile.in: Regenerate. 2005-07-28 Graydon Hoare <graydon@redhat.com> * loc2c-runtime.h: New file from elfutils CVS.
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/elaborate.cxx b/elaborate.cxx
index ca5237df..76c5b39c 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -38,9 +38,12 @@ using namespace std;
derived_probe::derived_probe (probe *p):
base (p)
{
- this->locations = p->locations;
- this->tok = p->tok;
- this->body = deep_copy_visitor::deep_copy(p->body);
+ if (p)
+ {
+ this->locations = p->locations;
+ this->tok = p->tok;
+ this->body = deep_copy_visitor::deep_copy(p->body);
+ }
}
@@ -48,8 +51,11 @@ derived_probe::derived_probe (probe *p, probe_point *l):
base (p)
{
this->locations.push_back (l);
- this->tok = p->tok;
- this->body = deep_copy_visitor::deep_copy(p->body);
+ if (p)
+ {
+ this->tok = p->tok;
+ this->body = deep_copy_visitor::deep_copy(p->body);
+ }
}
// ------------------------------------------------------------------------