Skip to content

Commit

Permalink
Switch to ssh-style verbosity CLI flags (#222)
Browse files Browse the repository at this point in the history
* switch to ssh-style verbosity CLI flags

* add register logging to level 4
  • Loading branch information
japesinator committed May 4, 2017
1 parent 538dfea commit 93f9d77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions manticore/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def parse_arguments():
parser = argparse.ArgumentParser(description='Symbolically analyze a program')
parser.add_argument('--workspace', type=str, default=None,
help='A folder name for temporaries and results. (default mcore_?????)')
parser.add_argument('--verbose', action='store_true', help='Enable debug mode.')
parser.add_argument('-v', action='count', default=1, help='Specify verbosity level from -v to -vvvv')
parser.add_argument('--profile', action='store_true', help='Enable profiling mode.')

parser.add_argument('--buffer', type=str, help='Specify buffer to make symbolic')
Expand Down Expand Up @@ -106,10 +106,7 @@ def main():
if args.assertions:
m.load_assertions(args.assertions)

if args.verbose:
m.verbosity = 4
else:
m.verbosity = 1
m.verbosity = args.v

logger.info('Loading program: {}'.format(args.programs))
logger.info('Workspace: {}'.format(m.workspace))
Expand Down
4 changes: 2 additions & 2 deletions manticore/manticore.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ def verbosity(self, setting):
[('MAIN', logging.INFO), ('EXECUTOR', logging.INFO)],
[('MAIN', logging.INFO), ('EXECUTOR', logging.DEBUG), ('MODEL', logging.DEBUG)],
[('MAIN', logging.INFO), ('EXECUTOR', logging.DEBUG), ('MODEL', logging.DEBUG), ('MEMORY', logging.DEBUG), ('CPU', logging.DEBUG)],
[('MAIN', logging.INFO), ('EXECUTOR', logging.DEBUG), ('MODEL', logging.DEBUG), ('MEMORY', logging.DEBUG), ('CPU', logging.DEBUG)],
[('MAIN', logging.INFO), ('EXECUTOR', logging.DEBUG), ('MODEL', logging.DEBUG), ('MEMORY', logging.DEBUG), ('CPU', logging.DEBUG), ('SMT', logging.DEBUG), ('REGISTERS', logging.DEBUG)]]
[('MAIN', logging.INFO), ('EXECUTOR', logging.DEBUG), ('MODEL', logging.DEBUG), ('MEMORY', logging.DEBUG), ('CPU', logging.DEBUG), ('REGISTERS', logging.DEBUG)],
[('MAIN', logging.INFO), ('EXECUTOR', logging.DEBUG), ('MODEL', logging.DEBUG), ('MEMORY', logging.DEBUG), ('CPU', logging.DEBUG), ('REGISTERS', logging.DEBUG), ('SMT', logging.DEBUG)]]
# Takes a value and ensures it's in a certain range
def clamp(val, minimum, maximum):
return sorted((minimum, val, maximum))[1]
Expand Down

0 comments on commit 93f9d77

Please sign in to comment.