From dce614153ff57684a3e655df86517def2f7bf8b5 Mon Sep 17 00:00:00 2001 From: an7s <an7s@git.zephyr-software.com> Date: Fri, 28 Apr 2017 19:34:57 +0000 Subject: [PATCH] Pass options to STARS/IDA Former-commit-id: 425ee42389871991eafe3793adad931e230bb692 --- tools/do_idapro.sh | 13 ++++++++----- tools/ps_analyze.sh | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/do_idapro.sh b/tools/do_idapro.sh index 8a107ae1a..64b36660d 100755 --- a/tools/do_idapro.sh +++ b/tools/do_idapro.sh @@ -4,6 +4,7 @@ analyze_file() { file=$1 target_name=$2 + stars_options=$3 # # This line is added to turn off screen output to display @@ -11,7 +12,7 @@ analyze_file() rc=1 if [ ! -z "$IDA_PRO_SERVER_HOST" ]; then echo "STARS (Remote on ${IDA_PRO_SERVER_HOST}) Analyzing $file target is: $target_name" - $PEASOUP_UMBRELLA_DIR/IdaProServer/SMP-analyze.sh $file + $PEASOUP_UMBRELLA_DIR/IdaProServer/SMP-analyze.sh $file $stars_options rc=$? if [ ! $rc -eq 0 ]; then @@ -25,12 +26,12 @@ analyze_file() case "$IDAROOT" in *idapro5* ) echo "IDA 5.* detected." - $SMPSA_HOME/SMP-analyze.sh $file + $SMPSA_HOME/SMP-analyze.sh $file $stars_options ;; *idapro6*|*idaproCur*) # only works on IDA 6.0+ echo "IDA 6.* detected." - screen -D -L -ln -m -a -T xterm sh -x $SMPSA_HOME/SMP-analyze.sh $file + screen -D -L -ln -m -a -T xterm sh -x $SMPSA_HOME/SMP-analyze.sh $file $stars_options ;; *) echo Cannot detect IDA version: $IDAROOT @@ -62,13 +63,15 @@ else TARGET_NAME=a.ncexe fi -analyze_file a.ncexe $TARGET_NAME +shift + +analyze_file a.ncexe $TARGET_NAME $@ if [ -d shared_objects ]; then cd shared_objects for i in `cat ../shared_libs`; do - analyze_file $i $i + analyze_file $i $i $@ done cd - diff --git a/tools/ps_analyze.sh b/tools/ps_analyze.sh index 83fcb38df..7c2b02973 100755 --- a/tools/ps_analyze.sh +++ b/tools/ps_analyze.sh @@ -956,7 +956,7 @@ perform_step gather_libraries mandatory $PEASOUP_HOME/tools/do_gatherlibs.sh $st # # Running IDA Pro static analysis phase ... # -perform_step meds_static mandatory $PEASOUP_HOME/tools/do_idapro.sh $name +perform_step meds_static mandatory $PEASOUP_HOME/tools/do_idapro.sh $name $step_options_meds_static touch a.ncexe.annot cp a.ncexe.annot a.ncexe.annot.full # this check is extraneous now. -- GitLab