什么是Pc物质化?
What is Pc Materialization?
我正在使用一个名为Intel Pin的二进制仪器工具。然而,当我检查Pin附带的部分示例时,我遇到了这个奇怪的术语。以下是相关部分:
VOID CallTrace(TRACE trace, INS ins)
{
if (!KnobTraceCalls)
return;
if (INS_IsCall(ins) && !INS_IsDirectBranchOrCall(ins))
{
// Indirect call
string s = "Call " + FormatAddress(INS_Address(ins), TRACE_Rtn(trace));
s += " -> ";
INS_InsertCall(ins, IPOINT_BEFORE, AFUNPTR(EmitIndirectCall), IARG_THREAD_ID,
IARG_PTR, new string(s), IARG_BRANCH_TARGET_ADDR,
IARG_G_ARG0_CALLER, IARG_G_ARG1_CALLER, IARG_END);
}
else if (INS_IsDirectBranchOrCall(ins))
{
// Is this a tail call?
RTN sourceRtn = TRACE_Rtn(trace);
RTN destRtn = RTN_FindByAddress(INS_DirectBranchOrCallTargetAddress(ins));
if (INS_IsCall(ins) // conventional call
|| sourceRtn != destRtn // tail call
)
{
BOOL tailcall = !INS_IsCall(ins);
string s = "";
if (tailcall)
{
s += "Tailcall ";
}
else
{
if( INS_IsProcedureCall(ins) )
s += "Call ";
else
{
s += "PcMaterialization ";
tailcall=1;
}
}
//s += INS_Mnemonic(ins) + " ";
s += FormatAddress(INS_Address(ins), TRACE_Rtn(trace));
s += " -> ";
ADDRINT target = INS_DirectBranchOrCallTargetAddress(ins);
s += FormatAddress(target, RTN_FindByAddress(target));
INS_InsertCall(ins, IPOINT_BEFORE, AFUNPTR(EmitDirectCall),
IARG_THREAD_ID, IARG_PTR, new string(s), IARG_BOOL, tailcall,
IARG_G_ARG0_CALLER, IARG_G_ARG1_CALLER, IARG_END);
}
}
else if (INS_IsRet(ins))
{
RTN rtn = TRACE_Rtn(trace);
#if defined(TARGET_LINUX) && defined(TARGET_IA32)
// if( RTN_Name(rtn) == "_dl_debug_state") return;
if( RTN_Valid(rtn) && RTN_Name(rtn) == "_dl_runtime_resolve") return;
#endif
string tracestring = "Return " + FormatAddress(INS_Address(ins), rtn);
INS_InsertCall(ins, IPOINT_BEFORE, AFUNPTR(EmitReturn),
IARG_THREAD_ID, IARG_PTR, new string(tracestring), IARG_G_RESULT0, IARG_END);
}
}
该方法确定指令实际在做什么(直接调用,间接调用,尾部调用,返回和未知的Pc具体化)。
这是完整的代码。
那么这到底是什么意思呢?
BOOL LEVEL_CORE::INS_IsPcMaterialization (INS INS)
的回报:如果这是对下一条指令的调用,则为True,这是实现指令指针
的习惯用法。检查
相关文章:
- EvtExportLogneneneba API正在将远程计算机的事件日志保存到远程PC本身.如何将其保存到主机
- 如何通过Conan和CMake找到用于pkg配置的.pc文件
- PC中的程序和PHONE中的本机描述应用程序之间的数据连接
- 由于PC显示设置的更改,Qt小部件被部分剪裁
- 如何在带有 gdb GUI 前端的 ARM gdbserver 的 PC 上执行远程 gdb 会话?
- 网站和C++程序在同一台 Linux PC 上的通信
- 在另一台 PC 上执行程序时加载 SDL2 共享库时出错
- 通过USB在PC和Arduino之间进行串行通信
- 利用Mbed库建立STM32与PC机的串行USB通信
- 这个片段中关于 n 在 pc[i] 中的表示发生了什么
- 通过TCP连接到Wi-Fi上的0.0.0.0,而侦听器PC有活动的Wi-Fi,以太网没有'不起作用
- Visual C++ wxWidgets应用程序仅适用于我的PC
- 在Visual Studio中包括用于其他PC的库
- 将以太网 (UDP) 帧发送到其他 PC
- Android USB 附件模式无法使用 libusb 与主机 PC 一起读/写
- PC 林特,错误 613 和 "complicated" 如果
- Pc Lint,如何使用 init() 抑制类的 err 613(可能使用空 ponter)
- PC 棉绒并检查可能的空点
- 是否可以拦截/检测关闭 PC 并首先执行操作的请求?
- 什么是Pc物质化?