Hi Bill, all,
We are trying to upgrade from Dyninst-9.2.0 to Dyninst-9.3.2 -
forced really because of Power 8 related Dyninst aborts with 9.2.0
that we hope are fixed in the newer version.
We have a snippet of code that gets line number information, that
now does not compile with 9.3.2, but does with 9.2.0.
The snippet of code is:
ÂÂ 428ÂÂÂ
ÂÂ 429ÂÂÂ ÂÂÂ for(unsigned i = 0; i< mods.size();i++) {
ÂÂ 430ÂÂÂ
ÂÂ 431ÂÂÂ ÂÂÂ LineInformation *lineInformation =
mods[i]->getLineInformation();
ÂÂ 432ÂÂÂ ÂÂÂ if(lineInformation) {
ÂÂ 433ÂÂÂ ÂÂÂ ÂÂÂ LineInformation::const_iterator iter =
lineInformation->begin();
ÂÂ 434ÂÂÂ ÂÂÂ ÂÂÂ for(;iter!=lineInformation->end();iter++) {
ÂÂ 435ÂÂÂ ÂÂÂ ÂÂÂ const std::pair<Offset, Offset> range =
iter->first;
ÂÂ 436ÂÂÂ ÂÂÂ ÂÂÂ LineNoTuple line = iter->second;
ÂÂ 437ÂÂÂ ÂÂÂ ÂÂÂ KrellInstitute::Core::Address b(range.first);
ÂÂ 438ÂÂÂ ÂÂÂ ÂÂÂ KrellInstitute::Core::Address e(range.second);
ÂÂ 439ÂÂÂ // DEBUG
ÂÂ 440ÂÂÂ #ifndef NDEBUG
ÂÂ 441ÂÂÂ ÂÂÂ ÂÂÂ if(is_debug_symtabapi_symbols_enabled) {
ÂÂ 442ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ output <<
"SymtabAPISymbols::getAllSymbols: ADDING STATEMENT " << b
<< ":" << e
ÂÂ 443ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <<" " << line.first << ":"
<< line.second << std::endl;
ÂÂ 444ÂÂÂ ÂÂÂ ÂÂÂ }
ÂÂ 445ÂÂÂ #endif
ÂÂ 446ÂÂÂ ÂÂÂ ÂÂÂ
st.addStatement(b,e,line.first,line.second,line.column);
The compile errors:
home/jeg/cbtf-krell/core/src/SymtabAPISymbols.cpp: In member
function âvoid
KrellInstitute::Core::SymtabAPISymbols::getAllSymbols(const
KrellInstitute::Core::LinkedObjectEntry&,
KrellInstitute::Core::SymbolTable&)â:
/home/jeg/cbtf-krell/core/src/SymtabAPISymbols.cpp:435:49: error:
request for member âfirstâ in
â*((boost::dereferenceable<boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::index_node_base<Dyninst::SymtabAPI::Statement*,
std::allocator<Dyninst::SymtabAPI::Statement*> > > >
> >, Dyninst::SymtabAPI::Statement* const*,
boost::decrementable<boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::index_node_base<Dyninst::SymtabAPI::Statement*,
std::allocator<Dyninst::SymtabAPI::Statement*> > > >
> >, boost::iterator<std::bidirectional_iterator_tag,
Dyninst::SymtabAPI::Statement*, long int,
Dyninst::SymtabAPI::Statement* const*,
Dyninst::SymtabAPI::Statement* const&> > >*)(&
iter))->boost::dereferenceable<T, P,
B>::operator-><boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::index_node_base<Dyninst::SymtabAPI::Statement*,
std::allocator<Dyninst::SymtabAPI::Statement*> > > >
> >, Dyninst::SymtabAPI::Statement* const*,
boost::decrementable<boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::index_node_base<Dyninst::SymtabAPI::Statement*,
std::allocator<Dyninst::SymtabAPI::Statement*> > > >
> >, boost::iterator<std::bidirectional_iterator_tag,
Dyninst::SymtabAPI::Statement*, long int,
Dyninst::SymtabAPI::Statement* const*,
Dyninst::SymtabAPI::Statement* const&> > >()â, which is
of pointer type âDyninst::SymtabAPI::Statement* constâ (maybe you
meant to use â->â ?)
ÂÂ const std::pair<Offset, Offset> range = iter->first;
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^
/home/jeg/cbtf-krell/core/src/SymtabAPISymbols.cpp:436:28: error:
request for member âsecondâ in
â*((boost::dereferenceable<boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::index_node_base<Dyninst::SymtabAPI::Statement*,
std::allocator<Dyninst::SymtabAPI::Statement*> > > >
> >, Dyninst::SymtabAPI::Statement* const*,
boost::decrementable<boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::index_node_base<Dyninst::SymtabAPI::Statement*,
std::allocator<Dyninst::SymtabAPI::Statement*> > > >
> >, boost::iterator<std::bidirectional_iterator_tag,
Dyninst::SymtabAPI::Statement*, long int,
Dyninst::SymtabAPI::Statement* const*,
Dyninst::SymtabAPI::Statement* const&> > >*)(&
iter))->boost::dereferenceable<T, P,
B>::operator-><boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::index_node_base<Dyninst::SymtabAPI::Statement*,
std::allocator<Dyninst::SymtabAPI::Statement*> > > >
> >, Dyninst::SymtabAPI::Statement* const*,
boost::decrementable<boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::index_node_base<Dyninst::SymtabAPI::Statement*,
std::allocator<Dyninst::SymtabAPI::Statement*> > > >
> >, boost::iterator<std::bidirectional_iterator_tag,
Dyninst::SymtabAPI::Statement*, long int,
Dyninst::SymtabAPI::Statement* const*,
Dyninst::SymtabAPI::Statement* const&> > >()â, which is
of pointer type âDyninst::SymtabAPI::Statement* constâ (maybe you
meant to use â->â ?)
ÂÂ LineNoTuple line = iter->second;
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ^
The documentation in symtabAPI/doc/symtab-text.txt around
line 1117 agrees with he source we are currently using to get
lineInformation.
// Get the Line Information for module foo.
LineInformation *info = mod->getLineInformation();
//Iterate over the line information
LineInformation::const_iterator iter;
for( iter = info->begin(); iter != info->end(); iter++)
{
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ // First component represents the address
range for the line
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ const std::pair<Offset, Offset>
addrRange = iter->first;
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ //Second component gives information about
the line itself.
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ LineNoTuple lt = iter->second;
}
Is there a new section of documentation that describes how to get
the address range and line number tuple from the module class?
Thanks much for your time.
Jim G
|
|