本文整理汇总了C++中Symtab::getAllModules方法的典型用法代码示例。如果您正苦于以下问题:C++ Symtab::getAllModules方法的具体用法?C++ Symtab::getAllModules怎么用?C++ Symtab::getAllModules使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symtab
的用法示例。
在下文中一共展示了Symtab::getAllModules方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: image_range
//.........这里部分代码省略.........
if(is_debug_symtabapi_symbols_detailed_enabled) {
output << "SymtabAPISymbols::getSymbols: ADDING FUNCTION " << fname
<< " " << frange
<< " pc:" << *ai
<< " adjusted pc:" << theAddr
<< std::endl;
}
#endif
//st.addFunction(begin+base,end+base,fname);
st.addFunction(begin,end,base,fname);
// Record the function begin addresses, This allows the
// cli and gui to focus on or display the first
// statement of a function.
// The function begin addresses will be processed later
// for statement info and added to our statements.
function_begin_addresses.insert(begin);
break;
}
}
}
#ifndef NDEBUG
if(is_debug_symtabapi_symbols_detailed_enabled) {
std::cerr << output.str();
output.clear();
}
#endif
std::vector <Module *>mods;
AddressRange module_range;
std::string module_name;
if(symtab && !symtab->getAllModules(mods)) {
std::cerr << "SymtabAPISymbols::getSymbols: getAllModules unable to get all modules "
<< Symtab::printError(Symtab::getLastSymtabError()).c_str()
<< std::endl;
} else {
// DEBUG
#ifndef NDEBUG
if(is_debug_symtabapi_symbols_detailed_enabled) {
for(unsigned i = 0; i< mods.size();i++){
module_range =
AddressRange(mods[i]->addr(),
mods[i]->addr() + symtab->imageLength());
module_name = mods[i]->fullName();
std::cerr << "SymtabAPISymbols::getSymbols: getAllModules for " << mods[i]->fullName()
<< " Range " << module_range
<< std::endl;
}
}
#endif
}
// DEBUG
#ifndef NDEBUG
if(is_debug_symtabapi_symbols_enabled) {
std::cerr << "SymtabAPISymbols::getSymbols: image_offset:" << image_offset
<< " image_length:" << image_length
<< " image_range:" << image_range << std::endl;
std::cerr << "USING BASE OFFSET " << base << std::endl;
}
#endif