[Lldb-commits] [PATCH] D124409: Filter non-external static members from SBType::GetFieldAtIndex.
Sigurður Ásgeirsson via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 25 11:03:14 PDT 2022
siggi-alpheus created this revision.
siggi-alpheus added a reviewer: labath.
siggi-alpheus added a project: LLDB.
Herald added subscribers: JDevlieghere, arphaman.
Herald added a reviewer: shafik.
Herald added a project: All.
siggi-alpheus requested review of this revision.
Herald added a subscriber: lldb-commits.
See issue 55040 <https://github.com/llvm/llvm-project/issues/55040> where static members of classes declared in the anonymous namespace are incorrectly returned as member fields from lldb::SBType::GetFieldAtIndex(). It appears that attrs.member_byte_offset contains a sentinel value for members that don't have a DW_AT_data_member_location.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124409
Files:
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2669,7 +2669,7 @@
attrs.accessibility = eAccessNone;
// Handle static members
- if (attrs.is_external && attrs.member_byte_offset == UINT32_MAX) {
+ if (attrs.member_byte_offset == UINT32_MAX) {
Type *var_type = die.ResolveTypeUID(attrs.encoding_form.Reference());
if (var_type) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124409.424975.patch
Type: text/x-patch
Size: 575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220425/b9351191/attachment.bin>
More information about the lldb-commits
mailing list