forked from OSchip/llvm-project
Made sure that ValueObjectVariable actually
updates itself before it tries to set its own data. Otherwise it has no idea where to put the data value. <rdar://problem/15846476> llvm-svn: 199533
This commit is contained in:
parent
661f35b0c5
commit
6826d22784
|
@ -328,6 +328,12 @@ ValueObjectVariable::GetLocationAsCString ()
|
||||||
bool
|
bool
|
||||||
ValueObjectVariable::SetValueFromCString (const char *value_str, Error& error)
|
ValueObjectVariable::SetValueFromCString (const char *value_str, Error& error)
|
||||||
{
|
{
|
||||||
|
if (!UpdateValueIfNeeded())
|
||||||
|
{
|
||||||
|
error.SetErrorString("unable to update value before writing");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_resolved_value.GetContextType() == Value::eContextTypeRegisterInfo)
|
if (m_resolved_value.GetContextType() == Value::eContextTypeRegisterInfo)
|
||||||
{
|
{
|
||||||
RegisterInfo *reg_info = m_resolved_value.GetRegisterInfo();
|
RegisterInfo *reg_info = m_resolved_value.GetRegisterInfo();
|
||||||
|
@ -360,6 +366,12 @@ ValueObjectVariable::SetValueFromCString (const char *value_str, Error& error)
|
||||||
bool
|
bool
|
||||||
ValueObjectVariable::SetData (DataExtractor &data, Error &error)
|
ValueObjectVariable::SetData (DataExtractor &data, Error &error)
|
||||||
{
|
{
|
||||||
|
if (!UpdateValueIfNeeded())
|
||||||
|
{
|
||||||
|
error.SetErrorString("unable to update value before writing");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_resolved_value.GetContextType() == Value::eContextTypeRegisterInfo)
|
if (m_resolved_value.GetContextType() == Value::eContextTypeRegisterInfo)
|
||||||
{
|
{
|
||||||
RegisterInfo *reg_info = m_resolved_value.GetRegisterInfo();
|
RegisterInfo *reg_info = m_resolved_value.GetRegisterInfo();
|
||||||
|
|
Loading…
Reference in New Issue