diff options
author | Yannik Enss <Yannik.Enss@rohde-schwarz.com> | 2019-05-29 14:19:14 +0200 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2019-06-05 16:35:00 +0000 |
commit | 54db60f4e5d3827fad600bad1cace34249047700 (patch) | |
tree | d04942680b77a5abb856d204e04d28dac133e3c5 /tools/wireshark_gen.py | |
parent | 54cccedfbec1a8e8a699317923002a0e7d44cfda (diff) |
idl2wrs: add debug command line parameter
convert the "DEBUG" constant to a command line parameter
Change-Id: I7f873d85fa053cb9298bd03444125d0160ef4640
Reviewed-on: https://code.wireshark.org/review/33456
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'tools/wireshark_gen.py')
-rwxr-xr-x | tools/wireshark_gen.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/wireshark_gen.py b/tools/wireshark_gen.py index d2d837a2d5..324238bafd 100755 --- a/tools/wireshark_gen.py +++ b/tools/wireshark_gen.py @@ -115,13 +115,6 @@ import tempfile class wireshark_gen_C: - - # - # Turn DEBUG stuff on/off - # - - DEBUG = 0 - # # Some string constants for our templates # @@ -147,7 +140,9 @@ class wireshark_gen_C: # Constructor # - def __init__(self, st, protocol_name, dissector_name ,description): + def __init__(self, st, protocol_name, dissector_name ,description, debug=False): + self.DEBUG = debug + self.st = output.Stream(tempfile.TemporaryFile(),4) # for first pass only self.st_save = st # where 2nd pass should go |