From 7b48cfd87500d38a816e8ac7d980072879a50aca Mon Sep 17 00:00:00 2001 From: George Hotz Date: Thu, 27 Aug 2015 22:55:14 +0000 Subject: [PATCH] clean up the args for static --- middleware/qira.py | 11 ++++------- static2/static2.py | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/middleware/qira.py b/middleware/qira.py index 2f8d6afa..703f9f29 100755 --- a/middleware/qira.py +++ b/middleware/qira.py @@ -26,8 +26,8 @@ if __name__ == '__main__': parser.add_argument("--host", metavar="HOST", help="listen address for web interface and socat. "+qira_config.HOST+" by default", default=qira_config.HOST) parser.add_argument("--web-port", metavar="PORT", help="listen port for web interface. 3002 by default", type=int, default=qira_config.WEB_PORT) parser.add_argument("--socat-port", metavar="PORT", help="listen port for socat. 4000 by default", type=int, default=qira_config.SOCAT_PORT) - parser.add_argument('-S', help="enable static2", action="store_true") - parser.add_argument("--static-engine", metavar="STATIC_ENGINE", help="static engine to use with static2 (builtin or r2)", nargs="?") + parser.add_argument('-S', '--static', help="enable static2", action="store_true") + parser.add_argument("--engine", help="static engine to use with static2 (builtin or r2)", default="builtin") #capstone flag in qira_config for now # parse arguments, first try @@ -65,13 +65,10 @@ if __name__ == '__main__': if args.tracelibraries: qira_config.TRACE_LIBRARIES = True - if args.S: + if args.static: print "*** using static" qira_config.WITH_STATIC = True - if args.static_engine: - print "*** using static engine", args.static_engine - qira_config.WITH_STATIC = True - qira_config.STATIC_ENGINE = args.static_engine + qira_config.STATIC_ENGINE = args.engine if args.flush_cache: print "*** flushing caches" os.system("rm -rfv /tmp/qira*") diff --git a/static2/static2.py b/static2/static2.py index cd4b5733..561a665e 100755 --- a/static2/static2.py +++ b/static2/static2.py @@ -211,7 +211,7 @@ class Static: def process(self): self.analyzer.analyze_functions(self) - if self.debug >= 1: + if self.debug >= 0: print "*** found %d functions" % len(self['functions'])