[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 commit 9381a54c67)
(cherry picked from commit a6eafcb311)
This commit is contained in:
Adrian Prantl
2025-06-17 16:57:19 -07:00
committed by Augusto Noronha
parent 1dd4a993eb
commit bfb026cb9e
6 changed files with 46 additions and 70 deletions

View File

@@ -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