Skip to content

Commit f89131d

Browse files
authored
Merge pull request #85878 from augusto2112/fix-private-disc-main
[RemoteInspection] Read ContextDescriptor from symbol if available
2 parents 58f661c + e3c67c9 commit f89131d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/swift/Remote/MetadataReader.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,6 +2674,18 @@ class MetadataReader {
26742674
return nullptr;
26752675
}
26762676

2677+
// Check if the Reader can provide a symbol for this descriptor, and if it
2678+
// can, use that instead.
2679+
if (auto remoteAbsolutePointer =
2680+
Reader->resolvePointerAsSymbol(descriptor.getRemoteAddress())) {
2681+
auto symbol = remoteAbsolutePointer->getSymbol();
2682+
if (!symbol.empty()) {
2683+
if (auto demangledSymbol = buildContextManglingForSymbol(symbol, dem)) {
2684+
return demangledSymbol;
2685+
}
2686+
}
2687+
}
2688+
26772689
// Read the parent descriptor.
26782690
auto parentDescriptorResult = readParentContextDescriptor(descriptor);
26792691

0 commit comments

Comments
 (0)