mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[RemoteInspection] Change RemoteAbsolutePointer (NFC)
This patch changes RemoteAbsolutePointer to store both the symbol and the resolved address. This allows us to retire some ugly workarounds to deal with non-symbolic addresses and it fixes code paths that would need these workarounds, but haven't implemented them yet (i.e., the pack shape handling in the symbolicReferenceResolver in MetadatyaReader. Addresses parts of rdar://146273066. rdar://153687085 (cherry picked from commit9381a54c67) (cherry picked from commita6eafcb311)
This commit is contained in:
committed by
Augusto Noronha
parent
1dd4a993eb
commit
bfb026cb9e
@@ -147,7 +147,7 @@ public:
|
||||
virtual RemoteAbsolutePointer resolvePointer(RemoteAddress address,
|
||||
uint64_t readValue) {
|
||||
// Default implementation returns the read value as is.
|
||||
return RemoteAbsolutePointer("", readValue);
|
||||
return RemoteAbsolutePointer(RemoteAddress(readValue));
|
||||
}
|
||||
|
||||
/// Performs the inverse operation of \ref resolvePointer.
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
virtual RemoteAbsolutePointer getSymbol(RemoteAddress address) {
|
||||
if (auto symbol = resolvePointerAsSymbol(address))
|
||||
return *symbol;
|
||||
return RemoteAbsolutePointer("", address.getAddressData());
|
||||
return RemoteAbsolutePointer(address);
|
||||
}
|
||||
|
||||
/// Lookup a dynamic symbol name (ie dynamic loader binding) for the given
|
||||
|
||||
Reference in New Issue
Block a user