-
Notifications
You must be signed in to change notification settings - Fork 344
[lldb] Make LLDBMemoryReader::resolvePointer strip the pointer #4958
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
[lldb] Make LLDBMemoryReader::resolvePointer strip the pointer #4958
Conversation
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionally, this looks fine! One question inline.
@@ -84,6 +88,10 @@ llvm::Optional<Address> resolveRemoteAddressFromSymbolObjectFile(uint64_t addres | |||
llvm::Optional<uint64_t> m_local_buffer; | |||
uint64_t m_local_buffer_size = 0; | |||
|
|||
llvm::Optional<std::function<swift::remote::RemoteAbsolutePointer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be a layering violation if we just passed the pointer to the reflection context instead of the lambda? Otherwise, does it have to be an Optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be a layering violation if we just passed the pointer to the reflection context instead of the lambda?
You mean call the function directly? MemoryReader
doesn't know about ReflectionContext
, but ReflectionContext
know about MemoryReader
. The reason I'm using a lambda is to keep MemoryReader
unaware of ReflectionContext
.
Otherwise, does it have to be an Optional?
It actually doesn't, not sure what my reasoning was for it to be optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that LLDBMemoryReader could know about it, but I don't mind the function pointer either.
0210ea8
to
c240d28
Compare
@swift-ci test |
In order to know if the pointer we're dealing with is mapped by LLDBMemoryReader, we need to strip it first. rdar://94239864
c240d28
to
8e6684a
Compare
@swift-ci test |
In order to know if the pointer we're dealing with is mapped by
LLDBMemoryReader, we need to strip it first.
rdar://94239864