Displaying 2 results from an estimated 2 matches for "replacement_funct".
2016 Jun 21
3
function call replacement
...inst_end(F); i != e; ++i) {
Instruction *I = &*i;
if (!I) {
errs() << "error: null pointer instruction\n";
break;
} else if (isMyFunctionCall(I, TLI)) {
errs() << "found a call to the function to replace\n";
res = true;
replacement_function(I);
} else {
errs() << "default: trash instruction\n";
}
}
return res;
}
The problem is that after the first replacement, the iterator becomes a
null pointer. With the break instruction the program is correctly
instrumented for the first call (about that: what...
2016 Jun 20
3
function call replacement
Hi everyone,
I am trying to replace the call of a certain function with a call to
another function. It would for example replace the following:
%call = tail call noalias i8* @func(i64 10)
by
%call = tail call noalias i8* @other_func(i64 10)
I managed to declare other_func correctly but I am having troubles to
understand how I should proceed to do the replacement.
I tried to use