[Lldb-commits] [lldb] r191005 - Assert that only reg- or word-sized values are byte swapped

Ed Maste emaste at freebsd.org
Thu Sep 19 13:19:12 PDT 2013


I left out part of the commit message for r191005:

> Byte swapping  will happen when cross debugging of big endian-targets
> (e.g. MIPS, PPC) on a little-endian host (x86).  Register- or word-
> sized data copies need to be swapped, but calls to ExtractBytes or
> CopyByteOrderedData that would invoke the swapping case

... for larger copies ...

> are presumably
> in error.

The current cases do (or need to do) something like:
m_data.CopyByteOrderedData(..., m_data.GetByteOrder());

Instead of having to pass in the source byte order I'd like to add a
CopyData method that just omits the byte order parameter, and use that
in the cases where endianness does not apply.  It looks like this is
the case for many of ExtractBytes and CopyByteOrderedData's callers.

+    lldb::offset_t
+    CopyData (lldb::offset_t offset,
+              lldb::offset_t length,
+              void *dst) const;



More information about the lldb-commits mailing list