77 #include <include/hpctoolkit-config.h> 110 #if defined(HAVE_HPC_GNUBINUTILS) 111 if (!bfdSymTab) {
return; }
114 if (bfd_get_flavour(abfd) == bfd_target_elf_flavour) {
115 bfd_forall_dbg_funcinfo_fn_t callback =
118 bfd_elf_forall_dbg_funcinfo(abfd, bfdSymTab, callback,
this);
151 std::ostringstream os;
160 os <<
"{ Dbg::LM: \n";
162 os <<
"(" << hex << it->first << dec <<
" --> " << it->second <<
") ";
163 it->second->dump(os);
166 os <<
"(" << it->first <<
" --> " << it->second <<
") ";
167 it->second->dump(os);
187 void* parent,
void* funcinfo)
189 #if defined(HAVE_HPC_GNUBINUTILS) 195 bfd_vma begVMA, endVMA;
196 const char* name, *filenm;
197 unsigned int begLine;
198 bfd_forall_dbg_funcinfo_get_decl_info(funcinfo, &name, &filenm, &begLine);
199 bfd_forall_dbg_funcinfo_get_vma_bounds(funcinfo, &begVMA, &endVMA);
200 if (!name) { name =
""; }
201 if (!filenm) { filenm =
""; }
217 bfd_forall_dbg_funcinfo_get_vma_bounds(parent, &begVMA, &endVMA);
221 DIAG_DevMsg(10,
"BinUtil::Dbg::LM::bfd_dbgInfoCallback:\n" 249 std::pair<iterator, bool> fnd =
252 Dbg::Proc* map_pinfo = fnd.first->second;
258 (*lminfo)[pinfo->
begVMA] = tokeep;
260 DIAG_Msg(5,
"Multiple DWARF descriptors for the same procedure (VMA):\nkeeping: " << tokeep->
toString() <<
"deleting: " << todel->
toString());
264 else if (!pinfo->
filenm.empty()) {
265 std::pair<iterator1, bool> fnd =
266 lminfo->
insert1(std::make_pair(pinfo->
name, pinfo));
268 Dbg::Proc* map_pinfo = fnd.first->second;
275 (*lminfo)[pinfo->
name] = tokeep;
277 DIAG_Msg(5,
"Multiple DWARF descriptors for the same procedure (name):\nkeeping: " << tokeep->
toString() <<
"deleting: " << todel->
toString());
My1_t::const_iterator const_iterator1
std::string toString() const
static RealPathMgr & singleton()
bool realpath(std::string &pathNm) const
std::string toString() const
std::pair< iterator1, bool > insert1(const value_type1 &x)
#define DIAG_DevMsg(level,...)
static int bfd_dbgInfoCallback(void *callback_obj, void *parent, void *funcinfo)
#define DIAG_Msg(level,...)
std::ostream & dump(std::ostream &os) const
My_t::const_iterator const_iterator
void read(bfd *abfd, asymbol **bfdSymTab)
std::pair< iterator, bool > insert(const value_type &x)