refactoring command line options for debugging

Reviewed By: jeremydubreil

Differential Revision: D2737005

fb-gh-sync-id: 26433df
master
Sam Blackshear 9 years ago committed by facebook-github-bot-1
parent b729c93dd5
commit 53167d98cd

@ -78,6 +78,9 @@ def prepare_build(args):
if args.no_filtering: if args.no_filtering:
infer_options.append('--no-filtering') infer_options.append('--no-filtering')
if args.debug_exceptions:
infer_options += ['--debug-exceptions', '--no-filtering']
if args.infer_out is not None: if args.infer_out is not None:
infer_options += ['--out', args.infer_out] infer_options += ['--out', args.infer_out]

@ -75,8 +75,11 @@ base_group.add_argument('-ic', '--changed-only',
action=ConfirmIncrementalAction, action=ConfirmIncrementalAction,
help='''Same as -i, but does not analyze help='''Same as -i, but does not analyze
dependencies of changed procedures.''') dependencies of changed procedures.''')
base_group.add_argument('--debug-exceptions', action='store_true',
help='''Generate lightweight debugging information:
just print the internal exceptions during analysis''')
base_group.add_argument('-g', '--debug', action='store_true', base_group.add_argument('-g', '--debug', action='store_true',
help='Generate extra debugging information') help='Generate all debugging information')
base_group.add_argument('-a', '--analyzer', base_group.add_argument('-a', '--analyzer',
help='Select the analyzer within: {0}'.format( help='Select the analyzer within: {0}'.format(
', '.join(config.ANALYZERS)), ', '.join(config.ANALYZERS)),
@ -142,10 +145,6 @@ infer_group.add_argument('--ml_buckets',
'buckets are cf (Core Foundation), ' 'buckets are cf (Core Foundation), '
'arc, narc (No arc), cpp, unknown_origin') 'arc, narc (No arc), cpp, unknown_origin')
infer_group.add_argument('-nt', '--notest', action='store_true',
dest='notest',
help='Prints output of symbolic execution')
infer_group.add_argument('-npb', '--no-progress-bar', action='store_true', infer_group.add_argument('-npb', '--no-progress-bar', action='store_true',
help='Do not show a progress bar in the analysis') help='Do not show a progress bar in the analysis')
@ -363,9 +362,6 @@ class Infer:
if self.args.ml_buckets: if self.args.ml_buckets:
infer_options += ['-ml_buckets', self.args.ml_buckets] infer_options += ['-ml_buckets', self.args.ml_buckets]
if self.args.notest:
infer_options += ['-notest']
if self.args.no_progress_bar: if self.args.no_progress_bar:
infer_options += ['-no_progress_bar'] infer_options += ['-no_progress_bar']
@ -377,8 +373,13 @@ class Infer:
'-print_types', '-print_types',
'-trace_error', '-trace_error',
'-print_buckets', '-print_buckets',
# '-notest', '-notest'
] ]
self.args.no_filtering = True
elif self.args.debug_exceptions:
infer_options.append('-developer_mode')
self.args.no_filtering = True
if self.args.incremental: if self.args.incremental:
if self.args.changed_only: if self.args.changed_only:

@ -158,6 +158,8 @@ class BuckAnalyzer:
capture_cmd += ['--out', self.args.infer_out] capture_cmd += ['--out', self.args.infer_out]
if self.args.debug: if self.args.debug:
capture_cmd.append('-g') capture_cmd.append('-g')
if self.args.debug_exceptions:
capture_cmd.append('--debug-exceptions')
if self.args.no_filtering: if self.args.no_filtering:
capture_cmd.append('--no-filtering') capture_cmd.append('--no-filtering')
if self.args.verbose: if self.args.verbose:

Loading…
Cancel
Save