mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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
This commit is contained in:
@@ -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