[Lldb-commits] [lldb] r236447 - [ValueObject] Do not return address of eValueTypeHostAddress values.
Siva Chandra
sivachandra at google.com
Mon May 4 12:43:34 PDT 2015
Author: sivachandra
Date: Mon May 4 14:43:34 2015
New Revision: 236447
URL: http://llvm.org/viewvc/llvm-project?rev=236447&view=rev
Log:
[ValueObject] Do not return address of eValueTypeHostAddress values.
Summary:
This fixes TestRegisterVariables for clang and hence it is enabled in this commit.
Test Plan: dotest.py -C clang -p TestRegisterVariables
Reviewers: clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D9421
Modified:
lldb/trunk/source/Core/ValueObject.cpp
lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py
Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=236447&r1=236446&r2=236447&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Mon May 4 14:43:34 2015
@@ -1821,13 +1821,14 @@ ValueObject::GetAddressOf (bool scalar_i
case Value::eValueTypeLoadAddress:
case Value::eValueTypeFileAddress:
- case Value::eValueTypeHostAddress:
{
if(address_type)
*address_type = m_value.GetValueAddressType ();
return m_value.GetScalar().ULongLong(LLDB_INVALID_ADDRESS);
}
break;
+ case Value::eValueTypeHostAddress:
+ break;
}
if (address_type)
*address_type = eAddressTypeInvalid;
@@ -3785,7 +3786,7 @@ ValueObject::AddressOf (Error &error)
const bool scalar_is_load_address = false;
addr_t addr = GetAddressOf (scalar_is_load_address, &address_type);
error.Clear();
- if (addr != LLDB_INVALID_ADDRESS)
+ if (addr != LLDB_INVALID_ADDRESS && address_type != eAddressTypeHost)
{
switch (address_type)
{
@@ -3799,7 +3800,6 @@ ValueObject::AddressOf (Error &error)
case eAddressTypeFile:
case eAddressTypeLoad:
- case eAddressTypeHost:
{
ClangASTType clang_type = GetClangType();
if (clang_type)
@@ -3816,6 +3816,8 @@ ValueObject::AddressOf (Error &error)
}
}
break;
+ default:
+ break;
}
}
else
Modified: lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py?rev=236447&r1=236446&r2=236447&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py (original)
+++ lldb/trunk/test/lang/c/register_variables/TestRegisterVariables.py Mon May 4 14:43:34 2015
@@ -17,7 +17,6 @@ class RegisterVariableTestCase(TestBase)
self.buildDsym()
self.const_variable()
- @expectedFailureClang
@dwarf_test
@expectedFailureGcc #xfail to get buildbot green, test failed with gcc4.8.2
def test_with_dwarf_and_run_command(self):
More information about the lldb-commits
mailing list