[Lldb-commits] [PATCH] D29078: This patch implements a command to access and manipulate the Intel(R) MPX Boundary Tables.
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 25 11:30:01 PST 2017
clayborg added inline comments.
================
Comment at: tools/intel-mpx/IntelMPXTablePlugin.cpp:151
+ //
+ bd_entry--;
+
----------------
clayborg wrote:
> There is indeed a bug in SBData::SetData():
>
> ```
> void SBData::SetData(lldb::SBError &error, const void *buf, size_t size,
> lldb::ByteOrder endian, uint8_t addr_size) {
> if (!m_opaque_sp.get())
> m_opaque_sp.reset(new DataExtractor(buf, size, endian, addr_size));
> else
> m_opaque_sp->SetData(buf, size, endian);
> ```
>
> Note that if "m_opaque_sp" already exists, it doesn't set the address byte size.
>
> I will fix this and check it in, then things should work for you.
Actually if you can fix this with your patch that might be faster. llvm.org seems to be unreachable for me right now.
Just change the void SBData::SetData(...) function from:
```
if (!m_opaque_sp.get())
m_opaque_sp.reset(new DataExtractor(buf, size, endian, addr_size));
else
m_opaque_sp->SetData(buf, size, endian);
```
To:
```
if (!m_opaque_sp.get())
m_opaque_sp.reset(new DataExtractor(buf, size, endian, addr_size));
else
{
m_opaque_sp->SetData(buf, size, endian);
m_opaque_sp->SetAddressByteSize(addr_size);
}
```
https://reviews.llvm.org/D29078
More information about the lldb-commits
mailing list