Hi,
i figured out that I have to use SetFixup(...) to partly solve my register problem. However this function doesn't work, I can set everything with SetFixup(...) except the target which is the most important for me :(
When I do
SetFixup(a,FIXUP_OFF32,0,0x100,0);
and check it in IDA View with Ctrl+R I see always 0xFFFFFFFFFFFFFFFF as target.
Does anybody have a solution for that?
@aeppert: do you use the SetFixup in your PPC script as well?
attached is my script.
regards,
bodz
#include <idc.idc>
static main()
{
auto a;
auto d;
auto ea;
auto start,end;
auto out;
auto codeline;
auto target;
auto offset;
//ea=AskAddr(0x00,"Bitte eine Adresse aus der Funktion angeben");
ea=SelStart();
start=GetFunctionAttr(ea,FUNCATTR_START);
end=GetFunctionAttr(ea,FUNCATTR_END);
for (a=start;a<end;a=a+4)
{
d=GetOpType(a,1);
if (d==4)
{
codeline=GetDisasm(a);
if(strstr(codeline,"(%r13)")!=-1)
{
offset=GetOpnd(a,1);
out=ltoa(offset,16);
Message("\n");
Message(out);
target = (0x4017f0+offset);
out=ltoa(target,16);
Message(" ");
Message(out);
SetFixup(a,FIXUP_OFF32,0,target,0);
}
}
}
//AnalyzeArea(start,end);
Message("\n");
}







