SegmentInfo::generateName: move to BinaryFile.cpp

This commit is contained in:
Alessandro Di Federico
2021-05-30 08:25:34 +02:00
parent 1359bd967d
commit c8ff9cde04
3 changed files with 11 additions and 11 deletions
+10
View File
@@ -2030,3 +2030,13 @@ BinaryFile::nameForAddress(MetaAddress Address, uint64_t Size) const {
Address.dump(Result);
return Result.str();
}
std::string SegmentInfo::generateName() const {
// Create name from start and size
std::stringstream NameStream;
NameStream << "o_" << (IsReadable ? "r" : "") << (IsWriteable ? "w" : "")
<< (IsExecutable ? "x" : "") << "_0x" << std::hex
<< StartVirtualAddress.address();
return NameStream.str();
}