std::string Isa::GetFullName() const { std::stringstream full_name; full_name << GetVendor() << ":" << GetArchitecture() << ":" << GetMajorVersion() << ":" << GetMinorVersion() << ":" << GetStepping(); return full_name.str(); }
void Medusa::AnalyzeAsync(Address const& rAddr) { auto pCell = GetCell(rAddr); if (pCell == nullptr) return; auto spArch = GetArchitecture(pCell->GetArchitectureTag()); if (!spArch) return; boost::thread AnlzThread(&Medusa::Analyze, this, spArch, rAddr); }
MultiCell const* Medusa::GetMultiCell(Address const& rAddr) const { MultiCell const* pMultiCell = m_Database.RetrieveMultiCell(rAddr); if (pMultiCell == nullptr) return nullptr; auto spArch = GetArchitecture(m_DefaultArchitectureTag); if (!spArch) return nullptr; spArch->FormatMultiCell(m_Database, m_FileBinStrm, rAddr, const_cast<MultiCell&>(*pMultiCell)); return pMultiCell; }
Cell const* Medusa::GetCell(Address const& rAddr) const { boost::lock_guard<MutexType> Lock(m_Mutex); Cell const* pCell = m_Database.RetrieveCell(rAddr); if (pCell == nullptr) return nullptr; auto spArch = GetArchitecture(pCell->GetArchitectureTag()); if (!spArch) return nullptr; spArch->FormatCell(m_Database, m_FileBinStrm, rAddr, const_cast<Cell&>(*pCell)); /* LATER: Do smth better */ return pCell; }
Cell* Medusa::GetCell(Address const& rAddr) { boost::lock_guard<MutexType> Lock(m_Mutex); Cell* pCell = m_Database.RetrieveCell(rAddr); if (pCell == nullptr) return nullptr; auto spArch = GetArchitecture(pCell->GetArchitectureTag()); if (!spArch) return nullptr; spArch->FormatCell(m_Database, m_FileBinStrm, rAddr, *pCell); return pCell; }