Skip to content

Return high address masks correctly in Process (#78379) #7983

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

Conversation

jasonmolenda
Copy link

In https://reviews.llvm.org/D151292 I added the ability to track address masks separately for high and low memory addresses, a capability of AArch64. I did my testing with manual address mask settings (via target.process.highmem-virtual-addressable-bits) but didn't have a real corefile that included this metadata and required it.

My intention is that when the high address mask isn't specified, by the user (via the setting) or the Process plugin, we fall back to using the low address mask. The low and high address mask is the same for almost all environments.

But the patch I wrote never uses the Process plugin high address mask if it was set, e.g. from corefile metadata. This patch corrects that.

I also have an old patch in Phabractor that was approved to add FixAddress methods to SBProcess; I need to pick that patch up and finish it (I wanted to add an enum to specify which mask is being requested iirc), so I can do address masks tests in API tests.

rdar://120926000
(cherry picked from commit 54d8193)

In https://reviews.llvm.org/D151292 I added the ability to track address
masks separately for high and low memory addresses, a capability of
AArch64. I did my testing with manual address mask settings (via
target.process.highmem-virtual-addressable-bits) but didn't have a real
corefile that included this metadata and required it.

My intention is that when the high address mask isn't specified, by the
user (via the setting) or the Process plugin, we fall back to using the
low address mask. The low and high address mask is the same for almost
all environments.

But the patch I wrote never uses the Process plugin high address mask if
it was set, e.g. from corefile metadata. This patch corrects that.

I also have an old patch in Phabractor that was approved to add
FixAddress methods to SBProcess; I need to pick that patch up and finish
it (I wanted to add an enum to specify which mask is being requested
iirc), so I can do address masks tests in API tests.

rdar://120926000
(cherry picked from commit 54d8193)
@jasonmolenda
Copy link
Author

@swift-ci test

@jasonmolenda jasonmolenda merged commit b1ebed5 into swiftlang:stable/20230725 Jan 17, 2024
@jasonmolenda jasonmolenda deleted the r120926000-correctly-use-high-memory-process-plugin-address-masks branch January 17, 2024 16:36
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.

1 participant