本文整理汇总了C++中ObjectFile::GetSP方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectFile::GetSP方法的具体用法?C++ ObjectFile::GetSP怎么用?C++ ObjectFile::GetSP使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectFile
的用法示例。
在下文中一共展示了ObjectFile::GetSP方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SymbolVendor
//----------------------------------------------------------------------
// FindPlugin
//
// Platforms can register a callback to use when creating symbol
// vendors to allow for complex debug information file setups, and to
// also allow for finding separate debug information files.
//----------------------------------------------------------------------
SymbolVendor*
SymbolVendor::FindPlugin (Module* module)
{
std::auto_ptr<SymbolVendor> instance_ap;
//----------------------------------------------------------------------
// We currently only have one debug symbol parser...
//----------------------------------------------------------------------
SymbolVendorCreateInstance create_callback;
for (uint32_t idx = 0; (create_callback = PluginManager::GetSymbolVendorCreateCallbackAtIndex(idx)) != NULL; ++idx)
{
instance_ap.reset(create_callback(module));
if (instance_ap.get())
{
// TODO: make sure this symbol vendor is what we want. We
// currently are just returning the first one we find, but
// we may want to call this function only when we have our
// main executable module and then give all symbol vendor
// plug-ins a chance to compete for who wins.
return instance_ap.release();
}
}
// The default implementation just tries to create debug information using the
// file representation for the module.
instance_ap.reset(new SymbolVendor(module));
if (instance_ap.get())
{
ObjectFile *objfile = module->GetObjectFile();
if (objfile)
instance_ap->AddSymbolFileRepresentation(objfile->GetSP());
}
return instance_ap.release();
}