本文整理汇总了C++中core::Context::image方法的典型用法代码示例。如果您正苦于以下问题:C++ Context::image方法的具体用法?C++ Context::image怎么用?C++ Context::image使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core::Context
的用法示例。
在下文中一共展示了Context::image方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
void X86MasterAnalyzer::detectCallingConvention(core::Context &context, const core::ir::calling::CalleeId &calleeId) const {
auto architecture = context.image()->architecture();
auto setConvention = [&](const char *name) {
context.conventions()->setConvention(calleeId, architecture->getCallingConvention(QLatin1String(name)));
};
switch (architecture->bitness()) {
case 16:
setConvention("cdecl16");
break;
case 32:
setConvention("cdecl32");
break;
case 64:
setConvention("amd64");
break;
}
}
示例2: switch
void X86MasterAnalyzer::detectCallingConvention(core::Context &context, const core::ir::calling::CalleeId &calleeId) const {
const auto &platform = context.image()->platform();
auto architecture = platform.architecture();
auto setConvention = [&](const char *name) {
context.conventions()->setConvention(calleeId, architecture->getCallingConvention(QLatin1String(name)));
};
switch (architecture->bitness()) {
case 16:
setConvention("cdecl16");
break;
case 32:
setConvention("cdecl32");
break;
case 64:
if (platform.operatingSystem() == core::image::Platform::Windows) {
setConvention("microsoft64");
} else {
setConvention("amd64");
}
break;
}
}