Log in

View Full Version : IDA script


bart
September 17th, 2002, 09:45
I wrote this script to remove align x from deadlisting, now when its executed, it comes into infinite loop, what am i doing wrong?


#include <idc.idc>

// noalign(0x4bd000,0x5a1cd0);

// remove align x from deadlisting
static noalign(from,to)
{
auto ea,i,j,x;

for ( i = from; i < to; i++)
{
ea = i;

ea = FindText(ea,SEARCH_DOWN | SEARCH_NEXT,0,0,"align ";

if (ea != BADADDR)
{
MakeUnkn(ea,0);
Message("%08lX: align x\n",ea);
}

}
}

bart
September 18th, 2002, 11:45
Fixed

#include <idc.idc>

// noalign(0x4bd000,0x5a1cd0);

// remove align x from deadlisting
static noalign(from,to)
{
auto ea,i,j,x;

ea = from;

while ( ea <= to && ea != BADADDR)
{

ea = FindText(ea,SEARCH_DOWN | SEARCH_NEXT,0,0,"align ";

MakeUnkn(ea,0);
Message("%08lX: founded align x\n",ea);

}


}