ValueObjectRegister type value objects should obey the format in ValueAsCString.

<rdar://problem/10719481>

llvm-svn: 148494
This commit is contained in:
Jim Ingham 2012-01-19 21:10:56 +00:00
parent 4b53e188c1
commit 6657d09e8b
1 changed files with 10 additions and 1 deletions

View File

@ -1080,8 +1080,17 @@ ValueObject::GetValueAsCString ()
const RegisterInfo *reg_info = m_value.GetRegisterInfo(); const RegisterInfo *reg_info = m_value.GetRegisterInfo();
if (reg_info) if (reg_info)
{ {
lldb::Format my_format = GetFormat();
if (m_format == lldb::eFormatDefault)
{
if (m_last_value_format)
my_format = m_last_value_format->GetFormat();
else
my_format = reg_info->format;
}
StreamString reg_sstr; StreamString reg_sstr;
m_data.Dump(&reg_sstr, 0, reg_info->format, reg_info->byte_size, 1, UINT32_MAX, LLDB_INVALID_ADDRESS, 0, 0, GetExecutionContextScope()); m_data.Dump(&reg_sstr, 0, my_format, reg_info->byte_size, 1, UINT32_MAX, LLDB_INVALID_ADDRESS, 0, 0, GetExecutionContextScope());
m_value_str.swap(reg_sstr.GetString()); m_value_str.swap(reg_sstr.GetString());
} }
} }