File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -376,8 +376,7 @@ def parse() -> argparse.Namespace:
376376 help = "output intermediate information" )
377377 analyzecmd .add_argument (
378378 "--save_asm" ,
379- default = "yes" ,
380- choices = ["yes" , "no" ],
379+ action = "store_true" ,
381380 help = 'save asm listing in analysis directory' )
382381 analyzecmd .add_argument (
383382 "--save_asm_cfg_info" ,
@@ -1362,6 +1361,10 @@ def parse() -> argparse.Namespace:
13621361 "--save_asm" ,
13631362 action = "store_true" ,
13641363 help = "save the assembly file" )
1364+ relationalprepare .add_argument (
1365+ "--collect_diagnostics" ,
1366+ action = "store_true" ,
1367+ help = "save diagnostic information in diagnostics log" )
13651368 relationalprepare .add_argument (
13661369 "--hints" ,
13671370 nargs = "*" ,
Original file line number Diff line number Diff line change @@ -396,7 +396,7 @@ def analyzecmd(args: argparse.Namespace) -> NoReturn:
396396 doextract : bool = args .extract
397397 verbose : bool = args .verbose
398398 collectdiagnostics : bool = args .collect_diagnostics
399- save_asm : str = args .save_asm
399+ save_asm : bool = args .save_asm
400400 save_asm_cfg_info : bool = args .save_asm_cfg_info
401401 thumb : List [str ] = args .thumb
402402 preamble_cutoff : int = args .preamble_cutoff
@@ -549,7 +549,6 @@ def analyzecmd(args: argparse.Namespace) -> NoReturn:
549549 verbose = verbose ,
550550 collectdiagnostics = collectdiagnostics ,
551551 preamble_cutoff = preamble_cutoff ,
552- save_asm = save_asm ,
553552 save_asm_cfg_info = save_asm_cfg_info )
554553 except subprocess .CalledProcessError as e :
555554 print_error (str (e .output ))
@@ -584,6 +583,7 @@ def analyzecmd(args: argparse.Namespace) -> NoReturn:
584583 analysisrepeats = analysisrepeats ,
585584 iterations = iterations ,
586585 verbose = verbose ,
586+ save_asm = save_asm ,
587587 construct_all_functions = construct_all_functions ,
588588 collectdiagnostics = collectdiagnostics ,
589589 preamble_cutoff = preamble_cutoff )
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ def relational_prepare_command(args: argparse.Namespace) -> NoReturn:
153153 xpatchresults : Optional [str ] = args .patch_results_file
154154 xprint : bool = not args .json
155155 xssa : bool = args .ssa
156+ collectdiagnostics = args .collect_diagnostics
156157 xconstruct_all_functions : bool = args .construct_all_functions
157158 loglevel : str = args .loglevel
158159 logfilename : Optional [str ] = args .logfilename
@@ -241,6 +242,9 @@ def relational_prepare_command(args: argparse.Namespace) -> NoReturn:
241242 lines .append (" - New code inserted in the following memory regions:" )
242243 for (x , y ) in xcomparison .newcode :
243244 lines .append (" * From " + x + " to " + y )
245+ if len (xcomparison .messages ) > 0 :
246+ lines .append ("\n Messages:" )
247+ lines .append ("\n " .join (xcomparison .messages ))
244248 lines .append ("=" * 80 )
245249 lines .append (
246250 "||" + (str (datetime .datetime .now ()) + " " ).rjust (76 ) + "||" )
@@ -300,12 +304,13 @@ def relational_prepare_command(args: argparse.Namespace) -> NoReturn:
300304 fns_include = fns_include ,
301305 fns_exclude = fns_exclude ,
302306 use_ssa = xssa ,
303- thumb = True )
307+ thumb = xcomparison . is_thumb )
304308
305309 try :
306310 am .analyze (
307311 iterations = 10 ,
308312 save_asm = xsave_asm ,
313+ collectdiagnostics = collectdiagnostics ,
309314 construct_all_functions = xconstruct_all_functions )
310315 except subprocess .CalledProcessError as e :
311316 print (e .output )
You can’t perform that action at this time.
0 commit comments