clayborg added a comment.

There is no requirement that data be aligned when stored in a buffer that 
DataExtractor points to, so this patch doesn't seem correct. Since GetData() 
calls can return unaligned pointers, the usual way to make this work is to to 
make a local variable and do a memcpy into that local variable. See the 
ReadSwapInt32() function to see how it is done for integers. Then we need to 
swap the bytes depending on the byte size. So maybe a function that can do byte 
swapping for any sized data can be made. Then we can call it from the Get<T> 
function.  More comments inline.


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83256/new/

https://reviews.llvm.org/D83256



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

Reply via email to