hanchenye-llvm-project/lldb/unittests
Bryan Chan 01319e93ab Avoid an assertion failure when a bit field is extracted from a value of the same size.
Summary: One of the cases handled by ValueObjectChild::UpdateValue() uses the entire width of the parent's scalar value as the size of the child, and extracts the child by calling Scalar::ExtractBitfield(). This seems valid but APInt::trunc(), APInt::sext() and APInt::zext() assert that the bit field must not have the same size as the parent scalar. Replacing those calls with sextOrTrunc(), zextOrTrunc(), sextOrSelf() and zextOrSelf() fixes the assertion failures.

Reviewers: uweigand, labath

Subscribers: labath, lldb-commits

Differential Revision: http://reviews.llvm.org/D20355

llvm-svn: 270062
2016-05-19 13:51:20 +00:00
..
Core Avoid an assertion failure when a bit field is extracted from a value of the same size. 2016-05-19 13:51:20 +00:00
Editline Fix a bunch of signedness warnings in unittests 2016-03-11 09:00:23 +00:00
Expression Fix build for go parser unittest. 2015-11-03 22:46:37 +00:00
Host Revert "Add a read_full_buffer argument to ConnectionFileDescriptor::Read" 2016-05-03 14:07:41 +00:00
Interpreter
ScriptInterpreter Initialize the Python script interpreter lazily (i.e. not at debugger startup) 2016-04-12 18:23:18 +00:00
Symbol Add some unit tests for ClangASTContext. 2016-04-01 23:20:35 +00:00
SymbolFile Fix SymbolFilePDBTests.cpp 2016-05-10 13:46:22 +00:00
Utility Add a new task pool class to LLDB 2015-10-20 12:42:05 +00:00
CMakeLists.txt Add some unit tests for ClangASTContext. 2016-04-01 23:20:35 +00:00
gtest_common.h