-
Notifications
You must be signed in to change notification settings - Fork 341
[lldb] Read swift metadata from symbol rich binary #3960
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] Read swift metadata from symbol rich binary #3960
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.
I think this looks great!
@@ -10,6 +10,9 @@ let Definition = "target_experimental" in { | |||
def SwiftUseReflectionSymbols : Property<"swift-use-reflection-symbols", "Boolean">, | |||
Global, DefaultTrue, | |||
Desc<"if true, optimize the loading of Swift reflection metadata by making use of available symbols.">; | |||
def SwiftReadMetadataFromDSYM: Property<"swift-read-metadata-from-dsym", "Boolean">, |
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.
It's great that you made this switchable, but dsymutil only copies reflection metadata if the linker has stripped it, so there's little risk in pessimizing existing workflows with this feature.
@@ -77,6 +87,10 @@ class LLDBMemoryReader : public swift::remote::MemoryReader { | |||
/// module's virtual address space. | |||
std::vector<std::pair<uint64_t, lldb::ModuleSP>> m_range_module_map; | |||
|
|||
/// The set of modules where we should read memory from the symbol file's | |||
/// object file instead of the main object file. | |||
std::unordered_set<lldb::ModuleSP> m_modules_with_metadata_in_symbol_obj_file; |
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 would use an llvm::DenseSet<>
but that's more out of habit.
7ad05b5
to
c41767a
Compare
@swift-ci test |
c41767a
to
fd3b104
Compare
In cases where Swift metadata is present in the symbol rich binary, read swift metadata from it instead of from the main binary or the process. This patch essentially re-uses the functionality implemented to read metadata from the file-cache to achieve this.
fd3b104
to
983632d
Compare
In cases where Swift metadata is present in the symbol rich binary, read
swift metadata from it instead of from the main binary or the process.
This patch essentially re-uses the functionality implemented to read
metadata from the file-cache to achieve this.