Skip to content

[RemoteInspection] Change RemoteAbsolutePointer (NFC) #82325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adrian-prantl
Copy link
Contributor

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 MetadataReader.

Addresses parts of rdar://146273066.
rdar://153687085

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
@adrian-prantl
Copy link
Contributor Author

test with swiftlang/llvm-project#10865
@swift-ci test

@@ -66,32 +66,26 @@ class RemoteAbsolutePointer {
/// The symbol name that the pointer refers to. Empty if the value is absolute.
std::string Symbol;
/// The offset from the symbol, or the resolved remote address if \c Symbol is empty.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update this comment to reflect the new variable?

@@ -1871,7 +1871,7 @@ class TypeRefBuilder {
if (auto symbol = OpaquePointerReader(
remote::RemoteAddress(adjustedProtocolDescriptorTarget),
PointerSize)) {
if (!symbol->getSymbol().empty()) {
if (!symbol->getSymbol().empty() && symbol->getOffset() == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why must the offset be 0 in this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants