Displaying 2 results from an estimated 2 matches for "callinst1".
Did you mean:
callinst
2011 Jul 26
4
[LLVMdev] How to get the return address on the stack on LLVM
..., InsPt);
CallInst will get the return address and it works.
While, in the epilogue of the function, due to the canary has been
inserted. I write the similar code:
ConstantInt* ci2 =
llvm::ConstantInt::get(Type::getInt32Ty(RI->getContext()), 1);
Value* Args3[] = {ci2};
CallInst* callInst1 =
CallInst::Create(Intrinsic::getDeclaration(M,
Intrinsic::returnaddress),
&Args3[0], array_endof(Args3), "Caaall Return Address", BB);
But it does not work this time. I cannot get the return address.
What is problem? How can I get the return address? Thank you!...
2011 Jul 26
0
[LLVMdev] How to get the return address on the stack on LLVM
...the epilogue of the function, due to the canary has been
>>> inserted. I write the similar code:
>>>
>>> ConstantInt* ci2 =
>>> llvm::ConstantInt::get(Type::getInt32Ty(RI->getContext()), 1);
>>> Value* Args3[] = {ci2};
>>> CallInst* callInst1 =
>>> CallInst::Create(Intrinsic::getDeclaration(M,
>>> Intrinsic::returnaddress),
>>> &Args3[0], array_endof(Args3), "Caaall Return Address", BB);
>>
>> This code generates a call to llvm.returnaddress(1). This returns the
>> program coun...