[Lldb-commits] [lldb] r257603 - Silence an incorrect dwarf parsing warning

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 13 06:58:48 PST 2016

Author: tberghammer
Date: Wed Jan 13 08:58:48 2016
New Revision: 257603

URL: http://llvm.org/viewvc/llvm-project?rev=257603&view=rev
Silence an incorrect dwarf parsing warning

We have a check what warns if the offset of a class member is greater
then or equal to the size of the class. The warning is valid in most
case but it is invalid when the last data member is a 0 size array
because in this case the member offset can be equal to the class size
(subject to alignment limitations).

This CL fixis LLDB to not print out a warning in this special case.


Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=257603&r1=257602&r2=257603&view=diff
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Wed Jan 13 08:58:48 2016
@@ -2928,7 +2928,7 @@ DWARFASTParserClang::ParseChildMembers (
                                         if (member_byte_offset >= parent_byte_size)
-                                            if (member_array_size != 1)
+                                            if (member_array_size != 1 && (member_array_size != 0 || member_byte_offset > parent_byte_size))
                                                 module_sp->ReportError ("0x%8.8" PRIx64 ": DW_TAG_member '%s' refers to type 0x%8.8" PRIx64 " which extends beyond the bounds of 0x%8.8" PRIx64,

More information about the lldb-commits mailing list