summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authorRajan Arora <rarora@redhat.com>2009-03-11 18:44:21 -0400
committerRajan Arora <rarora@redhat.com>2009-03-11 18:58:30 -0400
commit3bd0d4df7ccfd9afe7771441b26d8baaaf180e29 (patch)
treeb8195f2cb1b61dee52acd701a47723abb7ecb59c /main.cxx
parente248aea9a04dd0d3c4e066afdca52176aaf9a536 (diff)
downloadsystemtap-steved-3bd0d4df7ccfd9afe7771441b26d8baaaf180e29.tar.gz
systemtap-steved-3bd0d4df7ccfd9afe7771441b26d8baaaf180e29.tar.xz
systemtap-steved-3bd0d4df7ccfd9afe7771441b26d8baaaf180e29.zip
PR 7071: Optional $context variables fix
* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Substitute erroneous target symbol with literal 0 if session level flag, skip_badvars is set. * session.h (struct systemtap_session): New flag: skip_badvars. * main.cxx: Command line argument --skip-badvars added. * stap.1.in: Entry for new option --skip-badvars. * NEWS: Added blurb for new option now available. * testsuite/semok/badvar.stp: Test case to check added functionality.
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.cxx b/main.cxx
index b494ba2b..890f65bc 100644
--- a/main.cxx
+++ b/main.cxx
@@ -134,6 +134,8 @@ usage (systemtap_session& s, int exitcode)
#endif
// Formerly present --ignore-{vmlinux,dwarf} options are for testsuite use
// only, and don't belong in the eyesight of a plain user.
+ << " --skip-badvars" << endl
+ << " overlook context of bad $ variables" << endl
<< endl
;
@@ -431,12 +433,14 @@ main (int argc, char * const argv [])
#define LONG_OPT_IGNORE_VMLINUX 3
#define LONG_OPT_IGNORE_DWARF 4
#define LONG_OPT_VERBOSE_PASS 5
+#define LONG_OPT_SKIP_BADVARS 6
// NB: also see find_hash(), usage(), switch stmt below, stap.1 man page
static struct option long_options[] = {
{ "kelf", 0, &long_opt, LONG_OPT_KELF },
{ "kmap", 2, &long_opt, LONG_OPT_KMAP },
{ "ignore-vmlinux", 0, &long_opt, LONG_OPT_IGNORE_VMLINUX },
{ "ignore-dwarf", 0, &long_opt, LONG_OPT_IGNORE_DWARF },
+ { "skip-badvars", 0, &long_opt, LONG_OPT_SKIP_BADVARS },
{ "vp", 1, &long_opt, LONG_OPT_VERBOSE_PASS },
{ NULL, 0, NULL, 0 }
};
@@ -698,6 +702,9 @@ main (int argc, char * const argv [])
// NB: we don't do this: s.last_pass = strlen(optarg);
break;
}
+ case LONG_OPT_SKIP_BADVARS:
+ s.skip_badvars = true;
+ break;
default:
cerr << "Internal error parsing command arguments." << endl;
usage(s, 1);