mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
SegmentInfo::generateName: move to BinaryFile.cpp
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user