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



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to