summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authorfche <fche>2005-09-28 21:23:12 +0000
committerfche <fche>2005-09-28 21:23:12 +0000
commited10c6397cc27ad161c7fcd5242c38efd89dc5ee (patch)
tree26eb4a7e8d7176e93e6bcde03599c8e96abc7828 /main.cxx
parente0d31311729955985b3142c1c7d08cf461192469 (diff)
downloadsystemtap-steved-ed10c6397cc27ad161c7fcd5242c38efd89dc5ee.tar.gz
systemtap-steved-ed10c6397cc27ad161c7fcd5242c38efd89dc5ee.tar.xz
systemtap-steved-ed10c6397cc27ad161c7fcd5242c38efd89dc5ee.zip
2005-09-28 Frank Ch. Eigler <fche@elastic.org>
PR 1182. * main.cxx (main): Support -D macro-setting option. * stap.1.in: Document it and related macros. * buildrun.cxx (compile_pass): Emit macro definitions. * translate.cxx (translate_pass): Guard limit macros with #ifdef. Eliminate MAXCONCURRENCY macro. * elaborate.h (systemtap_session): Add "macros" field. * parse.cxx (parse_if_statement): Clear "elseblock" if needed. 2005-09-28 Frank Ch. Eigler <fche@elastic.org> PR 1182. * systemtap.samples/control_limits.*: New test.
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.cxx b/main.cxx
index dcdf67f5..860e18b0 100644
--- a/main.cxx
+++ b/main.cxx
@@ -71,6 +71,7 @@ usage (systemtap_session& s)
for (unsigned i=0; i<s.include_path.size(); i++)
clog << " " << s.include_path[i] << endl;
clog
+ << " -D NM=VAL emit macro definition into generated C code" << endl
<< " -R DIR look in DIR for runtime, instead of" << endl
<< " " << s.runtime_path << endl
// << " -r RELEASE use kernel RELEASE, instead of" << endl
@@ -135,7 +136,7 @@ main (int argc, char * const argv [])
while (true)
{
- int grc = getopt (argc, argv, "hVvp:I:e:o:tR:r:m:kgc:x:");
+ int grc = getopt (argc, argv, "hVvp:I:e:o:tR:r:m:kgc:x:D:");
if (grc < 0)
break;
switch (grc)
@@ -204,6 +205,10 @@ main (int argc, char * const argv [])
s.target_pid = atoi(optarg);
break;
+ case 'D':
+ s.macros.push_back (string (optarg));
+ break;
+
case 'h':
default:
usage (s);