[RemoteInspection] Add a hook to process addresses before converting

them to hex strings when creating anonymous context descriptors. This
aims to solve a problem when LLDB reads reflection metadata directly
from local binary files instead of downloading them from in-process
memory.

LLDB's MemoryReader implements this to convert the file address into
an in-process address, so mangled names created from instance metadata
can be matched with the field info data read from the local files.

rdar://152743797
(cherry picked from commit 540df142d7)
This commit is contained in:
Adrian Prantl
2025-06-06 15:10:15 -07:00
parent 6e9d97e273
commit 957d042e1e
2 changed files with 10 additions and 1 deletions

View File

@@ -150,6 +150,13 @@ public:
return RemoteAbsolutePointer("", readValue);
}
/// Performs the inverse operation of \ref resolvePointer.
/// A use-case for this is to turn file addresses into in-process addresses.
virtual std::optional<RemoteAddress>
resolveRemoteAddress(RemoteAddress address) const {
return std::nullopt;
}
virtual std::optional<RemoteAbsolutePointer>
resolvePointerAsSymbol(RemoteAddress address) {
return std::nullopt;