Skip to content

Commit 5e21d81

Browse files
authored
Merge pull request #3892 from augusto2112/use-correct-metadata-filecache-check
[lldb] Use readMetadataFromFileCacheEnabled to check if the file-cach…
2 parents 8b0209a + b631e67 commit 5e21d81

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/LLDBMemoryReader.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ LLDBMemoryReader::resolvePointer(swift::remote::RemoteAddress address,
170170
// from the file-cache optimization.
171171
swift::remote::RemoteAbsolutePointer process_pointer("", readValue);
172172

173+
if (!readMetadataFromFileCacheEnabled())
174+
return process_pointer;
175+
173176
auto &target = m_process.GetTarget();
174177
Address addr;
175178
if (!target.ResolveLoadAddress(readValue, addr)) {
@@ -395,7 +398,7 @@ llvm::Optional<Address>
395398
LLDBMemoryReader::resolveRemoteAddress(uint64_t address) const {
396399
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES));
397400

398-
if (!m_process.GetTarget().GetSwiftReadMetadataFromFileCache())
401+
if (!readMetadataFromFileCacheEnabled())
399402
return Address(address);
400403

401404
// If the address contains our mask, this is an image we registered.

0 commit comments

Comments
 (0)