[Lldb-commits] [lldb] r233179 - Fix StdVBoolImplementation to handle large vectors

Tamas Berghammer tberghammer at google.com
Wed Mar 25 03:59:12 PDT 2015


Author: tberghammer
Date: Wed Mar 25 05:59:12 2015
New Revision: 233179

URL: http://llvm.org/viewvc/llvm-project?rev=233179&view=rev
Log:
Fix StdVBoolImplementation to handle large vectors

The previous implementation only read out the first element of the
underlying storage array. Because of it only the first 32 (on x86) or
the first 64 (on x86_64) element was displayed.

Differential revision: http://reviews.llvm.org/D8585

Modified:
    lldb/trunk/examples/synthetic/gnu_libstdcpp.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py

Modified: lldb/trunk/examples/synthetic/gnu_libstdcpp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/synthetic/gnu_libstdcpp.py?rev=233179&r1=233178&r2=233179&view=diff
==============================================================================
--- lldb/trunk/examples/synthetic/gnu_libstdcpp.py (original)
+++ lldb/trunk/examples/synthetic/gnu_libstdcpp.py Wed Mar 25 05:59:12 2015
@@ -233,8 +233,9 @@ class StdVectorSynthProvider:
 				return None
 			byte_offset = index / 8
 			bit_offset = index % 8
-			data = self.start_p.GetPointeeData()
-			bit = data.GetUnsignedInt8(lldb.SBError(), byte_offset) & (1 << bit_offset)
+			element_size = self.start_p.GetType().GetPointeeType().GetByteSize()
+			data = self.start_p.GetPointeeData(byte_offset / element_size)
+			bit = data.GetUnsignedInt8(lldb.SBError(), byte_offset % element_size) & (1 << bit_offset)
 			if bit != 0:
 				value_expr = "(bool)true"
 			else:

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py?rev=233179&r1=233178&r2=233179&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py Wed Mar 25 05:59:12 2015
@@ -24,7 +24,6 @@ class StdVBoolDataFormatterTestCase(Test
     @dwarf_test
     @skipIfWindows # http://llvm.org/pr21800
     @skipIfDarwin
-    @expectedFailurei386 #xfail to get buildbot green, failing config: i386 binary running on ubuntu 14.04 x86_64
     def test_with_dwarf_and_run_command(self):
         """Test data formatter commands."""
         self.buildDwarf()





More information about the lldb-commits mailing list