From 28f569c22b5a4ec666be5ccdf26fd194d3643c29 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 27 Mar 2009 12:07:49 -0400 Subject: initialize skip_badvars=0. rererenag developers in session.h to do so in the future --- session.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'session.h') diff --git a/session.h b/session.h index cbbae6b2..aeeeacdf 100644 --- a/session.h +++ b/session.h @@ -74,8 +74,9 @@ struct statistic_decl struct systemtap_session { systemtap_session (); - // NB: new POD members likely need to be explicitly cleared in the ctor. - // See elaborate.cxx. + // NB: It is very important for all of the above (and below) fields + // to be cleared in the systemtap_session ctor (elaborate.cxx) + // and/or main.cxx(main). // command line args std::vector include_path; @@ -112,6 +113,10 @@ struct systemtap_session bool need_uprobes; bool load_only; // flight recorder mode + // NB: It is very important for all of the above (and below) fields + // to be cleared in the systemtap_session ctor (elaborate.cxx) + // and/or main.cxx(main). + // Cache data bool use_cache; std::string cache_path; @@ -128,6 +133,10 @@ struct systemtap_session // Skip bad $ vars bool skip_badvars; + // NB: It is very important for all of the above (and below) fields + // to be cleared in the systemtap_session ctor (elaborate.cxx) + // and/or main.cxx(main). + // temporary directory for module builds etc. // hazardous - it is "rm -rf"'d at exit std::string tmpdir; @@ -172,8 +181,10 @@ struct systemtap_session hrtimer_derived_probe_group* hrtimer_derived_probes; perfmon_derived_probe_group* perfmon_derived_probes; procfs_derived_probe_group* procfs_derived_probes; + // NB: It is very important for all of the above (and below) fields - // to be cleared in the systemtap_session ctor (elaborate.cxx). + // to be cleared in the systemtap_session ctor (elaborate.cxx) + // and/or main.cxx(main). // unparser data translator_output* op; @@ -189,6 +200,10 @@ struct systemtap_session std::set unwindsym_modules; struct module_cache* module_cache; + // NB: It is very important for all of the above (and below) fields + // to be cleared in the systemtap_session ctor (elaborate.cxx) + // and/or main.cxx(main). + std::set seen_errors; std::set seen_warnings; unsigned num_errors () { return seen_errors.size(); } @@ -200,7 +215,9 @@ struct systemtap_session void print_error_source (std::ostream&, std::string&, const token* tok); void print_warning (const std::string& w, const token* tok = 0); - // reNB: new POD members likely need to be explicitly cleared in the ctor. + // NB: It is very important for all of the above (and below) fields + // to be cleared in the systemtap_session ctor (elaborate.cxx) + // and/or main.cxx(main). }; -- cgit