Merge pull request #27388 from jckarter/reflection-remove-start-addresses

swift-reflection-dump: Virtualize logical-to-physical address mapping.
This commit is contained in:
Joe Groff
2019-09-27 14:09:22 -07:00
committed by GitHub
6 changed files with 56 additions and 54 deletions

View File

@@ -237,18 +237,13 @@ public:
ReflStrMdSec.first == nullptr)
return false;
auto LocalStartAddress = reinterpret_cast<uint64_t>(SectBuf.get());
auto RemoteStartAddress = static_cast<uint64_t>(RangeStart);
ReflectionInfo info = {
{FieldMdSec.first, FieldMdSec.second},
{AssocTySec.first, AssocTySec.second},
{BuiltinTySec.first, BuiltinTySec.second},
{CaptureSec.first, CaptureSec.second},
{TypeRefMdSec.first, TypeRefMdSec.second},
{ReflStrMdSec.first, ReflStrMdSec.second},
LocalStartAddress,
RemoteStartAddress};
{ReflStrMdSec.first, ReflStrMdSec.second}};
this->addReflectionInfo(info);
@@ -346,19 +341,13 @@ public:
ReflStrMdSec.first == nullptr)
return false;
auto LocalStartAddress = reinterpret_cast<uintptr_t>(DOSHdrBuf.get());
auto RemoteStartAddress =
static_cast<uintptr_t>(ImageStart.getAddressData());
ReflectionInfo Info = {
{FieldMdSec.first, FieldMdSec.second},
{AssocTySec.first, AssocTySec.second},
{BuiltinTySec.first, BuiltinTySec.second},
{CaptureSec.first, CaptureSec.second},
{TypeRefMdSec.first, TypeRefMdSec.second},
{ReflStrMdSec.first, ReflStrMdSec.second},
LocalStartAddress,
RemoteStartAddress};
{ReflStrMdSec.first, ReflStrMdSec.second}};
this->addReflectionInfo(Info);
return true;
}
@@ -466,19 +455,13 @@ public:
ReflStrMdSec.first == nullptr)
return false;
auto LocalStartAddress = reinterpret_cast<uint64_t>(Buf.get());
auto RemoteStartAddress =
static_cast<uint64_t>(ImageStart.getAddressData());
ReflectionInfo info = {
{FieldMdSec.first, FieldMdSec.second},
{AssocTySec.first, AssocTySec.second},
{BuiltinTySec.first, BuiltinTySec.second},
{CaptureSec.first, CaptureSec.second},
{TypeRefMdSec.first, TypeRefMdSec.second},
{ReflStrMdSec.first, ReflStrMdSec.second},
LocalStartAddress,
RemoteStartAddress};
{ReflStrMdSec.first, ReflStrMdSec.second}};
this->addReflectionInfo(info);