-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. #90663
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
[lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. #90663
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4e80000
[lldb][DWARF] Delay struct/class/union definition DIE searching when …
ZequanWu 751a58d
fix format
ZequanWu c0a539e
address comments
ZequanWu 515c85d
Address comments
ZequanWu 40b87f0
address comments
ZequanWu 6086993
Merge branch 'main' into lldb-record-decl-delay
ZequanWu 0481675
add a test
ZequanWu 4f2fbfb
Use CHECK instead of CHECK-NEXT
ZequanWu c7edf15
address comments
ZequanWu 3414ce2
Update test: remove -gsimple-template-names
ZequanWu a8d45fb
Fix an oversight that I was updating the UniqueDWARFASTType object wh…
ZequanWu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
379 changes: 209 additions & 170 deletions
379
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
Large diffs are not rendered by default.
Oops, something went wrong.
197 changes: 88 additions & 109 deletions
197
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Test definition DIE searching is delayed until complete type is required. | ||
|
||
# RUN: split-file %s %t | ||
# RUN: %clangxx_host %t/main.cpp %t/t1_def.cpp -g -gsimple-template-names -o %t.out | ||
# RUN: %lldb -b %t.out -s %t/lldb.cmd | FileCheck %s | ||
|
||
# CHECK: (lldb) p v1 | ||
# CHECK-NEXT: DWARFASTParserClang::ParseTypeFromDWARF{{.*}}DW_TAG_structure_type (DW_TAG_structure_type) name = 't2' | ||
labath marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# CHECK-NEXT: DWARFASTParserClang::ParseTypeFromDWARF{{.*}}DW_TAG_structure_type (DW_TAG_structure_type) name = 't1' | ||
# CHECK-NEXT: DWARFASTParserClang::ParseTypeFromDWARF{{.*}}DW_TAG_base_type (DW_TAG_base_type) name = 'int' | ||
# CHECK-NEXT: DW_TAG_structure_type (DW_TAG_structure_type) 't2' resolving forward declaration... | ||
# CHECK-NEXT: (t2<t1<int> >) {} | ||
# CHECK-NEXT: (lldb) p v2 | ||
# CHECK-NEXT: DWARFASTParserClang::ParseTypeFromDWARF{{.*}}DW_TAG_structure_type (DW_TAG_structure_type) name = 't1' | ||
# CHECK-NEXT: DWARFASTParserClang::ParseTypeFromDWARF{{.*}}DW_TAG_base_type (DW_TAG_base_type) name = 'int' | ||
# CHECK-NEXT: DW_TAG_structure_type (DW_TAG_structure_type) 't1' resolving forward declaration... | ||
# CHECK-NEXT: (t1<int>) {} | ||
|
||
#--- lldb.cmd | ||
log enable dwarf comp | ||
p v1 | ||
p v2 | ||
|
||
#--- template.h | ||
template<typename T> | ||
struct t1 { | ||
}; | ||
template<typename T> | ||
struct t2 { | ||
}; | ||
|
||
#--- main.cpp | ||
#include "template.h" | ||
t2<t1<int>> v1; // this CU doesn't have definition DIE for t1<int>, but only declaration DIE for it. | ||
int main() { | ||
} | ||
|
||
#--- t1_def.cpp | ||
#include "template.h" | ||
t1<int> v2; // this CU contains definition DIE for t1<int>. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.