[Lldb-commits] [lldb] r205259 - <rdar://problem/16424592>
Enrico Granata
egranata at apple.com
Mon Mar 31 16:02:25 PDT 2014
Author: enrico
Date: Mon Mar 31 18:02:25 2014
New Revision: 205259
URL: http://llvm.org/viewvc/llvm-project?rev=205259&view=rev
Log:
<rdar://problem/16424592>
For some reason, the libc++ vector<bool> data formatter was essentially a costly no-up, doing everything required of it, except actually generating the child values!
This restores its functionality
Modified:
lldb/trunk/include/lldb/Core/ValueObject.h
lldb/trunk/source/Core/ValueObject.cpp
lldb/trunk/source/DataFormatters/LibCxx.cpp
Modified: lldb/trunk/include/lldb/Core/ValueObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObject.h?rev=205259&r1=205258&r2=205259&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObject.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObject.h Mon Mar 31 18:02:25 2014
@@ -762,7 +762,7 @@ public:
static lldb::ValueObjectSP
CreateValueObjectFromData (const char* name,
- DataExtractor& data,
+ const DataExtractor& data,
const ExecutionContext& exe_ctx,
ClangASTType type);
Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=205259&r1=205258&r2=205259&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Mon Mar 31 18:02:25 2014
@@ -3882,7 +3882,7 @@ ValueObject::CreateValueObjectFromAddres
lldb::ValueObjectSP
ValueObject::CreateValueObjectFromData (const char* name,
- DataExtractor& data,
+ const DataExtractor& data,
const ExecutionContext& exe_ctx,
ClangASTType type)
{
Modified: lldb/trunk/source/DataFormatters/LibCxx.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/LibCxx.cpp?rev=205259&r1=205258&r2=205259&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/LibCxx.cpp (original)
+++ lldb/trunk/source/DataFormatters/LibCxx.cpp Mon Mar 31 18:02:25 2014
@@ -139,11 +139,11 @@ lldb_private::formatters::LibcxxVectorBo
return ValueObjectSP();
}
bool bit_set = ((byte & mask) != 0);
- ValueObjectSP retval_sp;
DataBufferSP buffer_sp(new DataBufferHeap(m_bool_type.GetByteSize(),0));
if (bit_set && buffer_sp && buffer_sp->GetBytes())
*(buffer_sp->GetBytes()) = 1; // regardless of endianness, anything non-zero is true
StreamString name; name.Printf("[%" PRIu64 "]", (uint64_t)idx);
+ ValueObjectSP retval_sp(ValueObject::CreateValueObjectFromData(name.GetData(), DataExtractor(buffer_sp, process_sp->GetByteOrder(), process_sp->GetAddressByteSize()), m_exe_ctx_ref, m_bool_type));
if (retval_sp)
m_children[idx] = retval_sp;
return retval_sp;
@@ -166,8 +166,6 @@ lldb_private::formatters::LibcxxVectorBo
ValueObjectSP valobj_sp = m_backend.GetSP();
if (!valobj_sp)
return false;
- if (!valobj_sp)
- return false;
m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();
ValueObjectSP size_sp(valobj_sp->GetChildMemberWithName(ConstString("__size_"), true));
if (!size_sp)
More information about the lldb-commits
mailing list