mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 09:31:59 +08:00
Modified the expression parser to only try to
write to registers if they were modified in the expression. This eliminates spurious errors if the register can't be written to but the expression didn't write to it anyway. Also improved error handling for the materializer to make "couldn't materialize struct" errors more informative. <rdar://problem/14322579> llvm-svn: 186228
This commit is contained in:
@@ -1164,6 +1164,8 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
m_register_contents.reset(new DataBufferHeap(register_data.GetDataStart(), register_data.GetByteSize()));
|
||||
|
||||
Error write_error;
|
||||
|
||||
map.WriteMemory(load_addr, register_data.GetDataStart(), register_data.GetByteSize(), write_error);
|
||||
@@ -1213,6 +1215,16 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if (!memcmp(register_data.GetDataStart(), m_register_contents->GetBytes(), register_data.GetByteSize()))
|
||||
{
|
||||
// No write required, and in particular we avoid errors if the register wasn't writable
|
||||
|
||||
m_register_contents.reset();
|
||||
return;
|
||||
}
|
||||
|
||||
m_register_contents.reset();
|
||||
|
||||
RegisterValue register_value (const_cast<uint8_t*>(register_data.GetDataStart()), register_data.GetByteSize(), register_data.GetByteOrder());
|
||||
|
||||
if (!reg_context_sp->WriteRegister(&m_register_info, register_value))
|
||||
@@ -1262,6 +1274,7 @@ public:
|
||||
}
|
||||
private:
|
||||
RegisterInfo m_register_info;
|
||||
lldb::DataBufferSP m_register_contents;
|
||||
};
|
||||
|
||||
uint32_t
|
||||
|
||||
Reference in New Issue
Block a user