forked from OSchip/llvm-project
bug fix in SBValue::CreateValueFromAddress() where using the resulting VO as a pointer would crash LLDB ; minor improvements in dynamic formatters lookup
llvm-svn: 136743
This commit is contained in:
parent
3c14505164
commit
d8b5fce230
|
@ -457,6 +457,7 @@ SBValue::CreateValueFromAddress(const char* name, lldb::addr_t address, const SB
|
||||||
GetTarget().GetProcess().GetAddressByteSize()));
|
GetTarget().GetProcess().GetAddressByteSize()));
|
||||||
|
|
||||||
result_valobj_sp->SetName(ConstString(name));
|
result_valobj_sp->SetName(ConstString(name));
|
||||||
|
result_valobj_sp->GetValue().SetValueType(Value::eValueTypeLoadAddress);
|
||||||
result = SBValue(result_valobj_sp);
|
result = SBValue(result_valobj_sp);
|
||||||
}
|
}
|
||||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||||
|
|
|
@ -77,7 +77,7 @@ ValueObject::ValueObject (ValueObject &parent) :
|
||||||
m_deref_valobj(NULL),
|
m_deref_valobj(NULL),
|
||||||
m_format (eFormatDefault),
|
m_format (eFormatDefault),
|
||||||
m_last_format_mgr_revision(0),
|
m_last_format_mgr_revision(0),
|
||||||
m_last_format_mgr_dynamic(lldb::eNoDynamicValues),
|
m_last_format_mgr_dynamic(parent.m_last_format_mgr_dynamic),
|
||||||
m_last_summary_format(),
|
m_last_summary_format(),
|
||||||
m_forced_summary_format(),
|
m_forced_summary_format(),
|
||||||
m_last_value_format(),
|
m_last_value_format(),
|
||||||
|
@ -532,7 +532,7 @@ ValueObject::CreateChildAtIndex (uint32_t idx, bool synthetic_array_member, int3
|
||||||
const char *
|
const char *
|
||||||
ValueObject::GetSummaryAsCString ()
|
ValueObject::GetSummaryAsCString ()
|
||||||
{
|
{
|
||||||
if (UpdateValueIfNeeded (m_last_format_mgr_dynamic, true))
|
if (UpdateValueIfNeeded (true))
|
||||||
{
|
{
|
||||||
if (m_summary_str.empty())
|
if (m_summary_str.empty())
|
||||||
{
|
{
|
||||||
|
@ -788,7 +788,7 @@ const char *
|
||||||
ValueObject::GetObjectDescription ()
|
ValueObject::GetObjectDescription ()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!UpdateValueIfNeeded (m_last_format_mgr_dynamic, true))
|
if (!UpdateValueIfNeeded (true))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!m_object_desc_str.empty())
|
if (!m_object_desc_str.empty())
|
||||||
|
|
|
@ -40,6 +40,7 @@ ValueObjectDynamicValue::ValueObjectDynamicValue (ValueObject &parent, lldb::Dyn
|
||||||
m_type_sp(),
|
m_type_sp(),
|
||||||
m_use_dynamic (use_dynamic)
|
m_use_dynamic (use_dynamic)
|
||||||
{
|
{
|
||||||
|
m_last_format_mgr_dynamic = use_dynamic;
|
||||||
SetName (parent.GetName());
|
SetName (parent.GetName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ ValueObjectSynthetic::GetClangType ()
|
||||||
ConstString
|
ConstString
|
||||||
ValueObjectSynthetic::GetTypeName()
|
ValueObjectSynthetic::GetTypeName()
|
||||||
{
|
{
|
||||||
const bool success = UpdateValueIfNeeded();
|
const bool success = UpdateValueIfNeeded(false);
|
||||||
if (success && m_type_sp)
|
if (success && m_type_sp)
|
||||||
return ClangASTType::GetConstTypeName (GetClangType());
|
return ClangASTType::GetConstTypeName (GetClangType());
|
||||||
else
|
else
|
||||||
|
@ -90,7 +90,7 @@ ValueObjectSynthetic::GetClangAST ()
|
||||||
size_t
|
size_t
|
||||||
ValueObjectSynthetic::GetByteSize()
|
ValueObjectSynthetic::GetByteSize()
|
||||||
{
|
{
|
||||||
const bool success = UpdateValueIfNeeded();
|
const bool success = UpdateValueIfNeeded(false);
|
||||||
if (success && m_type_sp)
|
if (success && m_type_sp)
|
||||||
return m_value.GetValueByteSize(GetClangAST(), NULL);
|
return m_value.GetValueByteSize(GetClangAST(), NULL);
|
||||||
else
|
else
|
||||||
|
@ -109,7 +109,7 @@ ValueObjectSynthetic::UpdateValue ()
|
||||||
SetValueIsValid (false);
|
SetValueIsValid (false);
|
||||||
m_error.Clear();
|
m_error.Clear();
|
||||||
|
|
||||||
if (!m_parent->UpdateValueIfNeeded())
|
if (!m_parent->UpdateValueIfNeeded(false))
|
||||||
{
|
{
|
||||||
// our parent could not update.. as we are meaningless without a parent, just stop
|
// our parent could not update.. as we are meaningless without a parent, just stop
|
||||||
if (m_error.Success() && m_parent->GetError().Fail())
|
if (m_error.Success() && m_parent->GetError().Fail())
|
||||||
|
|
Loading…
Reference in New Issue