diff --git a/SMP-analyze.sh b/SMP-analyze.sh index 6cc83fdf17d28e526daf9919f187e5bfbd1874fa..6f1bcc619312d516b3a4108160d796173020418f 100755 --- a/SMP-analyze.sh +++ b/SMP-analyze.sh @@ -31,7 +31,7 @@ export PATH=$PATH:$IDADIR export IDALOG=$1.log export IDALOG_SILENT=1 # Extract the code addresses with objdump. -objdump -d --prefix-addresses $1 | grep "^[0-9]" > $1.SMPobjdump +$PS_OBJDUMP -d --prefix-addresses $1 | grep "^[0-9]" > $1.SMPobjdump # Extract the exception-handling function target addresses. dwarfdump -F $1 | grep "^<" | cut --delimiter="<" --field=3 | cut --delimiter=":" --field=1 | cut --bytes 4-10 > $1.eh_frame_addrs @@ -51,14 +51,17 @@ fi # determine if this binary in question is 32-bit or 64-bit. -file $1|grep -q "32-bit" >/dev/null 2>&1 -res=$? -if [ $res = 1 ]; then - myidal=idal64 - rm -f `basename $1 .ncexe`.i64 -else - myidal=idal -fi +#file $1|grep -q "32-bit" >/dev/null 2>&1 +#res=$? +#if [ $res = 1 ]; then +# myidal=idal64 +# rm -f `basename $1 .ncexe`.i64 +#else +# myidal=idal +#fi + +# we can always use idal64, as it analyzes 32-bit binaries just fine. May use a bit more space, but isn't typically a problem. +myidal=idal64 # # if TVHEADLESS is set, call idal on the idapro server diff --git a/src/base/SMPStaticAnalyzer.cpp b/src/base/SMPStaticAnalyzer.cpp index e39b887148ba08880362dd2a08b9518693f05285..0ed16b32a4e7c9202e3876f3b94a96fcac56f443 100644 --- a/src/base/SMPStaticAnalyzer.cpp +++ b/src/base/SMPStaticAnalyzer.cpp @@ -373,7 +373,7 @@ static int idaapi idp_callback(void *, int event_id, va_list va) { // Handle Cyber Grand Challenge project variant of ELF. #define STARS_CGC_FILETYPE 16705 if ((inf.filetype != f_ELF) && (inf.filetype != f_PE) && (inf.filetype != STARS_CGC_FILETYPE)) { - error("Executable format must be PE or ELF."); + error("Executable format must be PE, ELF or CGC."); return 0; } IDAP_run(0);