Skip to content

Create new CAS Blocks to represent missing DWARF sections #8576

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

Merged
merged 14 commits into from
Apr 22, 2024

Conversation

rastogishubham
Copy link

@rastogishubham rastogishubham commented Apr 15, 2024

This patch adds support for representing any missing DWARF sections as their own unique CAS Blocks, namely:

apple_objc
apple_namepsac
apple_types
apple_names
debug_names
debug_line_str
debug_rnglist
debug_loc
debug_ranges
debug_loclists
debug_str_offsets

@rastogishubham
Copy link
Author

@swift-ci please test llvm

@rastogishubham rastogishubham force-pushed the NewCASBlocks branch 2 times, most recently from 72a755a to 363b8f0 Compare April 16, 2024 23:51
In MCCAS we use MCCASBuilder::mergeMCFragmentContents to merge the
contents of DWARF sections before doing optimizations on them for
deduplication, while most sections only use MCDataFragments, some other
sections can use other kinds of fragments, make sure we support all
MCEncodedFragmentWithContents types.
@rastogishubham
Copy link
Author

@swift-ci please test llvm

MCCAS DWARF section materialization and creation can have a lot of
redundant code for most sections, this patch introduces some functions
to reduce the code duplication.
MCCAS has an ability to have different block types for different data,
this patch introduces DebugStrOffsetsRef and
DebugStringOffsetsSectionRef to represent the debug_str_offsets section
in DWARF5.
MCCAS has an ability to have different block types for different data,
this patch introduces DebugLoclistsRef and DebugLoclistsSectionRef to
represent the debug_loclists section in DWARF5.
MCCAS has an ability to have different block types for different data,
this patch introduces DebugRangesRef and DebugRangesSectionRef to
represent the debug_ranges section in DWARF4.
MCCAS has an ability to have different block types for different data,
this patch introduces DebugLocRef and DebugLocSectionRef to represent
the debug_str_loc section in DWARF4.
MCCAS has an ability to have different block types for different data,
this patch introduces DebugRangelistsRef and DebugRangelistsSectionRef
to represent the debug_rnglist section in DWARF5.
MCCAS has an ability to have different block types for different data,
this patch introduces DebugLineStrRef and DebugLineStrSectionRef to
represent the debug_line_str section in DWARF5.
MCCAS has an ability to have different block types for different data,
this patch introduces DebugNamesRef and DebugNamesSectionRef
to represent the debug_names section in DWARF5.
MCCAS has an ability to have different block types for different data,
this patch introduces DebugAppleNamesRef and DebugAppleNamesSectionRef
to represent the apple_names section in DWARF4.
MCCAS has an ability to have different block types for different data,
this patch introduces AppleTypesRef and AppleTypesSectionRef to
represent the apple_types section in DWARF4.
MCCAS has an ability to have different block types for different data,
this patch introduces AppleNamespaceRef and AppleNamespaceSectionRef to
represent the apple_namepsac section in DWARF4.
MCCAS has an ability to have different block types for different data,
this patch introduces AppleObjCRef and AppleObjCSectionRef to represent
the apple_objc section in DWARF4.
Copy link

@felipepiovezan felipepiovezan left a comment

Choose a reason for hiding this comment

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

LGTM!

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