c++ - 如何使用 RTN_FindByName 查找函数?
问题描述
我正在努力寻找一个mul(float,float)
我尝试使用的原型函数,RTN_FindByName
但输出仍然是空的。
VOID Arg1Before(CHAR * name, ADDRINT size)
{
TraceFile << name << "(" << size << ")" << endl;
}
VOID MulAfter(ADDRINT ret)
{
TraceFile << " returns " << ret << endl;
}
VOID Image(IMG img, VOID *v)
{
// Instrument the mul() and div() functions. Print the input argument
// of each mul() or div(), and the return value of mul().
//
// Find the mul() function.
RTN mulRtn = RTN_FindByName(img, MUL);
if (RTN_Valid(mulRtn))
{
RTN_Open(mulRtn);
// Instrument mul() to print the input argument value and the return value.
RTN_InsertCall(mulRtn, IPOINT_BEFORE, (AFUNPTR)Arg1Before,
IARG_ADDRINT, MUL,
IARG_FUNCARG_ENTRYPOINT_VALUE, 0,
IARG_END);
RTN_InsertCall(mulRtn, IPOINT_AFTER, (AFUNPTR)MulAfter,
IARG_FUNCRET_EXITPOINT_VALUE, IARG_END);
RTN_Close(mulRtn);
}
}
那里有MUL
一个常数,它是"mul"。显然,我已经包含了 pin.H。问题是我的 traceFile 仍然是空的
解决方案
推荐阅读
- google-cloud-firestore - Firestore 登录授权错误 400 无效请求
- html - 将鼠标悬停在某些对象和 div 类上时,如何阻止自定义鼠标光标恢复为默认值?(HTML、CSS)
- node.js - 蒙古数据库。JWT:如何使用 TypeScript 创建 JWT
- extjs - 我可以将 Ext.toolbar.Toolbar 拆分为 2 列吗
- pattern-matching - imagamagick 在调查中找到“基准标记”
- typescript - gulp serve 显示 [tsc] typescript version: 3.3.4000 而 package.json 有 "typescript": "^4.0.3"
- spring - 来自bodyValue的WebClient URI模板变量?
- azure-data-factory-2 - Web Activity 在 Azure 数据工厂中无休止地运行
- html - 将文本字符串从网站复制到 Excel VBA
- c# - 在数据库表的所有列和行中搜索文本