[Lldb-commits] [lldb] r124643 - in /lldb/trunk: include/lldb/ include/lldb/Core/ include/lldb/Host/ include/lldb/Symbol/ source/API/ source/Commands/ source/Core/ source/Expression/ source/Host/common/ source/Host/macosx/ source/Interpreter/ source/Plugins/DynamicLoader/MacOSX-DYLD/ source/Plugins/ObjectContainer/BSD-Archive/ source/Plugins/ObjectContainer/Universal-Mach-O/ source/Plugins/ObjectFile/Mach-O/ source/Plugins/Process/MacOSX-User/source/ source/Plugins/Process/MacOSX-User/source/MacOSX/ source/Plugins/Proce...
Greg Clayton
gclayton at apple.com
Mon Jan 31 17:31:41 PST 2011
Author: gclayton
Date: Mon Jan 31 19:31:41 2011
New Revision: 124643
URL: http://llvm.org/viewvc/llvm-project?rev=124643&view=rev
Log:
Endian patch from Kirk Beitz that allows better cross platform building.
Modified:
lldb/trunk/include/lldb/Core/Communication.h
lldb/trunk/include/lldb/Host/Endian.h
lldb/trunk/include/lldb/Symbol/ObjectContainer.h
lldb/trunk/include/lldb/Symbol/ObjectFile.h
lldb/trunk/include/lldb/lldb-enumerations.h
lldb/trunk/source/API/SBTarget.cpp
lldb/trunk/source/Commands/CommandObjectFrame.cpp
lldb/trunk/source/Commands/CommandObjectProcess.cpp
lldb/trunk/source/Commands/CommandObjectThread.cpp
lldb/trunk/source/Core/Address.cpp
lldb/trunk/source/Core/Communication.cpp
lldb/trunk/source/Core/DataExtractor.cpp
lldb/trunk/source/Core/EmulateInstruction.cpp
lldb/trunk/source/Core/Event.cpp
lldb/trunk/source/Core/Scalar.cpp
lldb/trunk/source/Core/Stream.cpp
lldb/trunk/source/Core/Value.cpp
lldb/trunk/source/Core/ValueObject.cpp
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
lldb/trunk/source/Expression/ClangUserExpression.cpp
lldb/trunk/source/Expression/DWARFExpression.cpp
lldb/trunk/source/Host/common/Host.cpp
lldb/trunk/source/Host/macosx/Symbols.cpp
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp
lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp
lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_arm.cpp
lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_i386.cpp
lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_x86_64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Target/RegisterContext.cpp
lldb/trunk/source/Target/Thread.cpp
Modified: lldb/trunk/include/lldb/Core/Communication.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Communication.h?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Communication.h (original)
+++ lldb/trunk/include/lldb/Core/Communication.h Mon Jan 31 19:31:41 2011
@@ -19,9 +19,7 @@
#include "lldb/lldb-private.h"
#include "lldb/Core/Broadcaster.h"
#include "lldb/Core/Error.h"
-#include "lldb/Host/Host.h"
#include "lldb/Host/Mutex.h"
-#include "lldb/Host/Predicate.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
Modified: lldb/trunk/include/lldb/Host/Endian.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Endian.h?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Endian.h (original)
+++ lldb/trunk/include/lldb/Host/Endian.h Mon Jan 31 19:31:41 2011
@@ -10,10 +10,24 @@
#ifndef liblldb_host_endian_h_
#define liblldb_host_endian_h_
-// TODO: come up with a more lldb specific solution instead of relying on
-// macosx <machine/endian.h>....
+#include <lldb-enumerations.h>
-#include <machine/endian.h>
+namespace lldb {
+
+namespace endian {
+
+ static union EndianTest
+ {
+ uint32_t num;
+ uint8_t bytes[sizeof(uint32_t)];
+ } const endianTest = { (uint16_t)0x01020304 };
+
+ inline ByteOrder InlHostByteOrder() { return (ByteOrder)endianTest.bytes[0]; }
+
+// ByteOrder const InlHostByteOrder = (ByteOrder)endianTest.bytes[0];
+}
+
+}
#endif // liblldb_host_endian_h_
Modified: lldb/trunk/include/lldb/Symbol/ObjectContainer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ObjectContainer.h?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ObjectContainer.h (original)
+++ lldb/trunk/include/lldb/Symbol/ObjectContainer.h Mon Jan 31 19:31:41 2011
@@ -20,6 +20,7 @@
#include "lldb/Core/FileSpec.h"
#include "lldb/Core/ModuleChild.h"
#include "lldb/Core/PluginInterface.h"
+#include "lldb/Host/Endian.h"
namespace lldb_private {
@@ -55,7 +56,7 @@
m_file (), // This file can be different than the module's file spec
m_offset (offset),
m_length (length),
- m_data (headerDataSP, lldb::eByteOrderHost, 4)
+ m_data (headerDataSP, lldb::endian::InlHostByteOrder(), 4)
{
if (file)
m_file = *file;
Modified: lldb/trunk/include/lldb/Symbol/ObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ObjectFile.h?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ObjectFile.h (original)
+++ lldb/trunk/include/lldb/Symbol/ObjectFile.h Mon Jan 31 19:31:41 2011
@@ -15,6 +15,7 @@
#include "lldb/Core/FileSpec.h"
#include "lldb/Core/ModuleChild.h"
#include "lldb/Core/PluginInterface.h"
+#include "lldb/Host/Endian.h"
#include "lldb/Symbol/Symtab.h"
#include "lldb/Symbol/UnwindTable.h"
@@ -67,7 +68,7 @@
m_file (), // This file could be different from the original module's file
m_offset (offset),
m_length (length),
- m_data (headerDataSP, lldb::eByteOrderHost, 4),
+ m_data (headerDataSP, lldb::endian::InlHostByteOrder(), 4),
m_unwind_table (*this)
{
if (file_spec_ptr)
Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Mon Jan 31 19:31:41 2011
@@ -10,12 +10,6 @@
#ifndef LLDB_enumerations_h_
#define LLDB_enumerations_h_
-#if !defined (__APPLE__)
-
-#include <endian.h>
-
-#endif
-
namespace lldb {
//----------------------------------------------------------------------
@@ -86,41 +80,9 @@
typedef enum ByteOrder
{
eByteOrderInvalid = 0,
- eByteOrderLittle = 1234,
- eByteOrderBig = 4321,
- eByteOrderPDP = 3412,
-
-#if defined (__APPLE__)
-
-// On Mac OS X there are preprocessor defines automatically defined
-// for the byte order that we can rely on.
-
-#if defined (__LITTLE_ENDIAN__)
- eByteOrderHost = eByteOrderLittle
-#elif defined (__BIG_ENDIAN__)
- eByteOrderHost = eByteOrderBig
-#elif defined (__PDP_ENDIAN__)
- eByteOrderHost = eByteOrderPDP
-#else
-#error unable to detect endianness
-#endif
-
-#else
-
-// On linux we rely upon the defines in <endian.h>
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- eByteOrderHost = eByteOrderLittle
-#elif __BYTE_ORDER == __BIG_ENDIAN
- eByteOrderHost = eByteOrderBig
-#elif __BYTE_ORDER == __PDP_ENDIAN
- eByteOrderHost = eByteOrderPDP
-#else
-#error unable to detect endianness
-#endif
-
-#endif
-
+ eByteOrderBig = 1,
+ eByteOrderPDP = 2,
+ eByteOrderLittle = 4,
} ByteOrder;
//----------------------------------------------------------------------
Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Mon Jan 31 19:31:41 2011
@@ -30,6 +30,7 @@
#include "lldb/Core/RegularExpression.h"
#include "lldb/Core/SearchFilter.h"
#include "lldb/Core/STLUtils.h"
+#include "lldb/Host/Host.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/TargetList.h"
Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Mon Jan 31 19:31:41 2011
@@ -20,6 +20,7 @@
#include "lldb/Core/Value.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Core/ValueObjectVariable.h"
+#include "lldb/Host/Host.h"
#include "lldb/Interpreter/Args.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Mon Jan 31 19:31:41 2011
@@ -19,6 +19,7 @@
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "./CommandObjectThread.h"
+#include "lldb/Host/Host.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Mon Jan 31 19:31:41 2011
@@ -17,6 +17,8 @@
#include "lldb/Core/State.h"
#include "lldb/Core/SourceManager.h"
+#include "lldb/Host/Host.h"
+
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
Modified: lldb/trunk/source/Core/Address.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Mon Jan 31 19:31:41 2011
@@ -171,7 +171,7 @@
buf[k_buf_len] = '\0'; // NULL terminate
// Byte order and address size don't matter for C string dumping..
- DataExtractor data (buf, sizeof(buf), eByteOrderHost, 4);
+ DataExtractor data (buf, sizeof(buf), lldb::endian::InlHostByteOrder(), 4);
size_t total_len = 0;
size_t bytes_read;
Address curr_address(address);
Modified: lldb/trunk/source/Core/Communication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Communication.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Core/Communication.cpp (original)
+++ lldb/trunk/source/Core/Communication.cpp Mon Jan 31 19:31:41 2011
@@ -17,6 +17,7 @@
#include "lldb/Core/Log.h"
#include "lldb/Core/Timer.h"
#include "lldb/Core/Event.h"
+#include "lldb/Host/Host.h"
#include <string.h>
using namespace lldb;
Modified: lldb/trunk/source/Core/DataExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DataExtractor.cpp Mon Jan 31 19:31:41 2011
@@ -22,6 +22,7 @@
#include "lldb/Core/StreamString.h"
#include "lldb/Core/UUID.h"
#include "lldb/Core/dwarf.h"
+#include "lldb/Host/Endian.h"
using namespace lldb;
using namespace lldb_private;
@@ -67,7 +68,7 @@
DataExtractor::DataExtractor () :
m_start (NULL),
m_end (NULL),
- m_byte_order(eByteOrderHost),
+ m_byte_order(lldb::endian::InlHostByteOrder()),
m_addr_size (4),
m_data_sp ()
{
@@ -160,7 +161,7 @@
{
m_start = NULL;
m_end = NULL;
- m_byte_order = eByteOrderHost;
+ m_byte_order = lldb::endian::InlHostByteOrder();
m_addr_size = 4;
m_data_sp.reset();
}
@@ -460,7 +461,7 @@
register uint32_t offset = *offset_ptr;
if ( ValidOffsetForDataOfSize(offset, sizeof(val)) )
{
- if (m_byte_order != eByteOrderHost)
+ if (m_byte_order != lldb::endian::InlHostByteOrder())
val = ReadSwapInt16(m_start, offset);
else
val = ReadInt16 (m_start, offset);
@@ -474,7 +475,7 @@
uint16_t
DataExtractor::GetU16_unchecked (uint32_t *offset_ptr) const
{
- uint16_t val = (m_byte_order == eByteOrderHost) ?
+ uint16_t val = (m_byte_order == lldb::endian::InlHostByteOrder()) ?
ReadInt16 (m_start, *offset_ptr) :
ReadSwapInt16(m_start, *offset_ptr);
*offset_ptr += sizeof(val);
@@ -484,7 +485,7 @@
uint32_t
DataExtractor::GetU32_unchecked (uint32_t *offset_ptr) const
{
- uint32_t val = (m_byte_order == eByteOrderHost) ?
+ uint32_t val = (m_byte_order == lldb::endian::InlHostByteOrder()) ?
ReadInt32 (m_start, *offset_ptr) :
ReadSwapInt32 (m_start, *offset_ptr);
*offset_ptr += sizeof(val);
@@ -494,7 +495,7 @@
uint64_t
DataExtractor::GetU64_unchecked (uint32_t *offset_ptr) const
{
- uint64_t val = (m_byte_order == eByteOrderHost) ?
+ uint64_t val = (m_byte_order == lldb::endian::InlHostByteOrder()) ?
ReadInt64 (m_start, *offset_ptr) :
ReadSwapInt64 (m_start, *offset_ptr);
*offset_ptr += sizeof(val);
@@ -522,7 +523,7 @@
{
uint16_t *value_ptr;
uint16_t *end = dst + count;
- if (m_byte_order != eByteOrderHost)
+ if (m_byte_order != lldb::endian::InlHostByteOrder())
{
for (value_ptr = dst; value_ptr < end; ++value_ptr, offset += value_size)
*value_ptr = ReadSwapInt16 (m_start, offset);
@@ -555,7 +556,7 @@
if ( ValidOffsetForDataOfSize(offset, sizeof(val)) )
{
- if (m_byte_order != eByteOrderHost)
+ if (m_byte_order != lldb::endian::InlHostByteOrder())
val = ReadSwapInt32 (m_start, offset);
else
val = ReadInt32 (m_start, offset);
@@ -586,7 +587,7 @@
{
uint32_t *value_ptr;
uint32_t *end = dst + count;
- if (m_byte_order != eByteOrderHost)
+ if (m_byte_order != lldb::endian::InlHostByteOrder())
{
for (value_ptr = dst; value_ptr < end; ++value_ptr, offset += value_size)
*value_ptr = ReadSwapInt32 (m_start, offset);
@@ -619,7 +620,7 @@
register uint32_t offset = *offset_ptr;
if ( ValidOffsetForDataOfSize(offset, sizeof(val)) )
{
- if (m_byte_order != eByteOrderHost)
+ if (m_byte_order != lldb::endian::InlHostByteOrder())
val = ReadSwapInt64 (m_start, offset);
else
val = ReadInt64 (m_start, offset);
@@ -648,7 +649,7 @@
{
uint64_t *value_ptr;
uint64_t *end = dst + count;
- if (m_byte_order != eByteOrderHost)
+ if (m_byte_order != lldb::endian::InlHostByteOrder())
{
for (value_ptr = dst; value_ptr < end; ++value_ptr, offset += value_size)
*value_ptr = ReadSwapInt64 (m_start, offset);
@@ -776,7 +777,7 @@
if (src_data)
{
- if (m_byte_order != eByteOrderHost)
+ if (m_byte_order != lldb::endian::InlHostByteOrder())
{
uint8_t *dst_data = (uint8_t *)&val;
for (int i=0; i<sizeof(float_type); ++i)
@@ -802,7 +803,7 @@
if (src_data)
{
- if (m_byte_order != eByteOrderHost)
+ if (m_byte_order != lldb::endian::InlHostByteOrder())
{
uint8_t *dst_data = (uint8_t *)&val;
for (int i=0; i<sizeof(float_type); ++i)
@@ -829,7 +830,7 @@
if (src_data)
{
- if (m_byte_order != eByteOrderHost)
+ if (m_byte_order != lldb::endian::InlHostByteOrder())
{
uint8_t *dst_data = (uint8_t *)&val;
for (int i=0; i<sizeof(float_type); ++i)
Modified: lldb/trunk/source/Core/EmulateInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/EmulateInstruction.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Core/EmulateInstruction.cpp (original)
+++ lldb/trunk/source/Core/EmulateInstruction.cpp Mon Jan 31 19:31:41 2011
@@ -11,6 +11,7 @@
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/StreamString.h"
+#include "lldb/Host/Endian.h"
using namespace lldb;
using namespace lldb_private;
@@ -25,7 +26,7 @@
ReadRegister read_reg_callback,
WriteRegister write_reg_callback
) :
- m_byte_order (lldb::eByteOrderHost),
+ m_byte_order (endian::InlHostByteOrder()),
m_addr_byte_size (sizeof (void *)),
m_baton (baton),
m_read_mem_callback (read_mem_callback),
Modified: lldb/trunk/source/Core/Event.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Event.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Core/Event.cpp (original)
+++ lldb/trunk/source/Core/Event.cpp Mon Jan 31 19:31:41 2011
@@ -17,6 +17,7 @@
#include "lldb/Core/Log.h"
#include "lldb/Core/State.h"
#include "lldb/Core/Stream.h"
+#include "lldb/Host/Endian.h"
#include "lldb/Target/Process.h"
#include <algorithm>
@@ -129,7 +130,7 @@
else if (m_bytes.size() > 0)
{
DataExtractor data;
- data.SetData(&m_bytes[0], m_bytes.size(), eByteOrderHost);
+ data.SetData(&m_bytes[0], m_bytes.size(), lldb::endian::InlHostByteOrder());
data.Dump(s, 0, eFormatBytes, 1, m_bytes.size(), 32, LLDB_INVALID_ADDRESS, 0, 0);
}
}
Modified: lldb/trunk/source/Core/Scalar.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Core/Scalar.cpp (original)
+++ lldb/trunk/source/Core/Scalar.cpp Mon Jan 31 19:31:41 2011
@@ -15,6 +15,7 @@
#include "lldb/Core/Error.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/DataExtractor.h"
+#include "lldb/Host/Endian.h"
using namespace lldb;
using namespace lldb_private;
@@ -134,25 +135,25 @@
{
if (limit_byte_size < byte_size)
{
- if (eByteOrderHost == eByteOrderLittle)
+ if (lldb::endian::InlHostByteOrder() == eByteOrderLittle)
{
// On little endian systems if we want fewer bytes from the
// current type we just specify fewer bytes since the LSByte
// is first...
- data.SetData((uint8_t*)&m_data, limit_byte_size, eByteOrderHost);
+ data.SetData((uint8_t*)&m_data, limit_byte_size, lldb::endian::InlHostByteOrder());
}
- else if (eByteOrderHost == eByteOrderBig)
+ else if (lldb::endian::InlHostByteOrder() == eByteOrderBig)
{
// On big endian systems if we want fewer bytes from the
// current type have to advance our initial byte pointer and
// trim down the number of bytes since the MSByte is first
- data.SetData(((uint8_t*)&m_data) + byte_size - limit_byte_size, limit_byte_size, eByteOrderHost);
+ data.SetData(((uint8_t*)&m_data) + byte_size - limit_byte_size, limit_byte_size, lldb::endian::InlHostByteOrder());
}
}
else
{
// We want all of the data
- data.SetData((uint8_t*)&m_data, byte_size, eByteOrderHost);
+ data.SetData((uint8_t*)&m_data, byte_size, lldb::endian::InlHostByteOrder());
}
return true;
}
Modified: lldb/trunk/source/Core/Stream.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Stream.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Core/Stream.cpp (original)
+++ lldb/trunk/source/Core/Stream.cpp Mon Jan 31 19:31:41 2011
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "lldb/Core/Stream.h"
+#include "lldb/Host/Endian.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -26,7 +27,7 @@
Stream::Stream () :
m_flags (0),
m_addr_size (4),
- m_byte_order (eByteOrderHost),
+ m_byte_order (lldb::endian::InlHostByteOrder()),
m_indent_level(0)
{
}
@@ -628,7 +629,7 @@
int
Stream::PutPointer (void *ptr)
{
- return PutRawBytes (&ptr, sizeof(ptr), eByteOrderHost, eByteOrderHost);
+ return PutRawBytes (&ptr, sizeof(ptr), lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder());
}
int
@@ -637,7 +638,7 @@
if (byte_order == eByteOrderInvalid)
byte_order = m_byte_order;
- return PutRawBytes (&f, sizeof(f), eByteOrderHost, byte_order);
+ return PutRawBytes (&f, sizeof(f), lldb::endian::InlHostByteOrder(), byte_order);
}
int
@@ -646,7 +647,7 @@
if (byte_order == eByteOrderInvalid)
byte_order = m_byte_order;
- return PutRawBytes (&d, sizeof(d), eByteOrderHost, byte_order);
+ return PutRawBytes (&d, sizeof(d), lldb::endian::InlHostByteOrder(), byte_order);
}
int
@@ -655,7 +656,7 @@
if (byte_order == eByteOrderInvalid)
byte_order = m_byte_order;
- return PutRawBytes (&ld, sizeof(ld), eByteOrderHost, byte_order);
+ return PutRawBytes (&ld, sizeof(ld), lldb::endian::InlHostByteOrder(), byte_order);
}
int
@@ -739,21 +740,21 @@
s->PutHex8(0x12);
s->PutChar(' ');
- s->PutHex16(0x3456, eByteOrderHost);
+ s->PutHex16(0x3456, lldb::endian::InlHostByteOrder());
s->PutChar(' ');
s->PutHex16(0x3456, eByteOrderBig);
s->PutChar(' ');
s->PutHex16(0x3456, eByteOrderLittle);
s->PutChar(' ');
- s->PutHex32(0x789abcde, eByteOrderHost);
+ s->PutHex32(0x789abcde, lldb::endian::InlHostByteOrder());
s->PutChar(' ');
s->PutHex32(0x789abcde, eByteOrderBig);
s->PutChar(' ');
s->PutHex32(0x789abcde, eByteOrderLittle);
s->PutChar(' ');
- s->PutHex64(0x1122334455667788ull, eByteOrderHost);
+ s->PutHex64(0x1122334455667788ull, lldb::endian::InlHostByteOrder());
s->PutChar(' ');
s->PutHex64(0x1122334455667788ull, eByteOrderBig);
s->PutChar(' ');
Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Mon Jan 31 19:31:41 2011
@@ -522,7 +522,7 @@
break;
case eValueTypeScalar:
- data.SetByteOrder (eByteOrderHost);
+ data.SetByteOrder (lldb::endian::InlHostByteOrder());
data.SetAddressByteSize(sizeof(void *));
if (m_value.GetData (data))
return error; // Success;
@@ -603,7 +603,7 @@
case eValueTypeHostAddress:
address = m_value.ULongLong(LLDB_INVALID_ADDRESS);
- data.SetByteOrder(eByteOrderHost);
+ data.SetByteOrder(lldb::endian::InlHostByteOrder());
data.SetAddressByteSize(sizeof(void *));
address_type = eAddressTypeHost;
break;
Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Mon Jan 31 19:31:41 2011
@@ -24,6 +24,8 @@
#include "lldb/Core/ValueObjectConstResult.h"
#include "lldb/Core/ValueObjectList.h"
+#include "lldb/Host/Endian.h"
+
#include "lldb/Symbol/ClangASTType.h"
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/Type.h"
@@ -460,7 +462,7 @@
if (cstr_len > 0)
{
data_buffer.resize(cstr_len);
- data.SetData (&data_buffer.front(), data_buffer.size(), eByteOrderHost);
+ data.SetData (&data_buffer.front(), data_buffer.size(), lldb::endian::InlHostByteOrder());
bytes_read = process->ReadMemory (cstr_address, &data_buffer.front(), cstr_len, error);
if (bytes_read > 0)
{
@@ -486,7 +488,7 @@
sstr << '"';
- data.SetData (&data_buffer.front(), data_buffer.size(), eByteOrderHost);
+ data.SetData (&data_buffer.front(), data_buffer.size(), endian::InlHostByteOrder());
while ((bytes_read = process->ReadMemory (cstr_address, &data_buffer.front(), k_max_buf_size, error)) > 0)
{
size_t len = strlen(&data_buffer.front());
@@ -796,7 +798,7 @@
{
// We are decoding a float into host byte order below, so make
// sure m_data knows what it contains.
- m_data.SetByteOrder(eByteOrderHost);
+ m_data.SetByteOrder(lldb::endian::InlHostByteOrder());
const size_t converted_byte_size = ClangASTContext::ConvertStringToFloatValue (
GetClangAST(),
GetClangType(),
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Mon Jan 31 19:31:41 2011
@@ -23,6 +23,7 @@
#include "lldb/Core/ValueObjectConstResult.h"
#include "lldb/Expression/ClangASTSource.h"
#include "lldb/Expression/ClangPersistentVariables.h"
+#include "lldb/Host/Endian.h"
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/ClangNamespaceDecl.h"
#include "lldb/Symbol/CompileUnit.h"
@@ -861,13 +862,13 @@
case 4:
{
uint32_t address32 = address & 0xffffffffll;
- str.PutRawBytes(&address32, sizeof(address32), eByteOrderHost, eByteOrderInvalid);
+ str.PutRawBytes(&address32, sizeof(address32), endian::InlHostByteOrder(), eByteOrderInvalid);
}
break;
case 8:
{
uint64_t address64 = address;
- str.PutRawBytes(&address64, sizeof(address64), eByteOrderHost, eByteOrderInvalid);
+ str.PutRawBytes(&address64, sizeof(address64), endian::InlHostByteOrder(), eByteOrderInvalid);
}
break;
}
Modified: lldb/trunk/source/Expression/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangUserExpression.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangUserExpression.cpp (original)
+++ lldb/trunk/source/Expression/ClangUserExpression.cpp Mon Jan 31 19:31:41 2011
@@ -275,7 +275,7 @@
//
m_dwarf_opcodes.reset(new StreamString);
- m_dwarf_opcodes->SetByteOrder (lldb::eByteOrderHost);
+ m_dwarf_opcodes->SetByteOrder (lldb::endian::InlHostByteOrder());
m_dwarf_opcodes->GetFlags ().Set (Stream::eBinary);
m_local_variables.reset(new ClangExpressionVariableList());
Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Mon Jan 31 19:31:41 2011
@@ -21,7 +21,7 @@
#include "lldb/Expression/ClangExpressionDeclMap.h"
#include "lldb/Expression/ClangExpressionVariable.h"
-#include "lldb/Host/Host.h"
+#include "lldb/Host/Endian.h"
#include "lldb/lldb-private-log.h"
@@ -2272,7 +2272,7 @@
tmp = stack.back();
stack.pop_back();
Value::ContextType context_type = stack.back().GetContextType();
- StreamString new_value(Stream::eBinary, 4, eByteOrderHost);
+ StreamString new_value(Stream::eBinary, 4, lldb::endian::InlHostByteOrder());
switch (context_type)
{
case Value::eContextTypeClangType:
@@ -2316,7 +2316,7 @@
}
break;
case Value::eValueTypeHostAddress:
- if (exe_ctx->process->GetByteOrder() != Host::GetByteOrder())
+ if (exe_ctx->process->GetByteOrder() != lldb::endian::InlHostByteOrder())
{
if (error_ptr)
error_ptr->SetErrorStringWithFormat ("Copy of composite types between incompatible byte orders is unimplemented");
@@ -2341,7 +2341,7 @@
switch (target_value_type)
{
case Value::eValueTypeLoadAddress:
- if (exe_ctx->process->GetByteOrder() != Host::GetByteOrder())
+ if (exe_ctx->process->GetByteOrder() != lldb::endian::InlHostByteOrder())
{
if (error_ptr)
error_ptr->SetErrorStringWithFormat ("Copy of composite types between incompatible byte orders is unimplemented");
Modified: lldb/trunk/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Host.cpp (original)
+++ lldb/trunk/source/Host/common/Host.cpp Mon Jan 31 19:31:41 2011
@@ -14,6 +14,7 @@
#include "lldb/Core/FileSpec.h"
#include "lldb/Core/Log.h"
#include "lldb/Core/StreamString.h"
+#include "lldb/Host/Endian.h"
#include "lldb/Host/Mutex.h"
#include <dlfcn.h>
@@ -214,26 +215,6 @@
return ::getpagesize();
}
-//------------------------------------------------------------------
-// Returns true if the host system is Big Endian.
-//------------------------------------------------------------------
-ByteOrder
-Host::GetByteOrder ()
-{
- union EndianTest
- {
- uint32_t num;
- uint8_t bytes[sizeof(uint32_t)];
- } endian = { (uint16_t)0x11223344 };
- switch (endian.bytes[0])
- {
- case 0x11: return eByteOrderLittle;
- case 0x44: return eByteOrderBig;
- case 0x33: return eByteOrderPDP;
- }
- return eByteOrderInvalid;
-}
-
const ArchSpec &
Host::GetArchitecture ()
{
Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Mon Jan 31 19:31:41 2011
@@ -24,6 +24,7 @@
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/Timer.h"
#include "lldb/Core/UUID.h"
+#include "lldb/Host/Endian.h"
#include "Host/macosx/cfcpp/CFCReleaser.h"
#include "mach/machine.h"
@@ -53,8 +54,8 @@
{
assert(magic == HeaderMagic32 || magic == HeaderMagic32Swapped || magic == HeaderMagic64 || magic == HeaderMagic64Swapped);
if (magic == HeaderMagic32 || magic == HeaderMagic64)
- data.SetByteOrder (eByteOrderHost);
- else if (eByteOrderHost == eByteOrderBig)
+ data.SetByteOrder (lldb::endian::InlHostByteOrder());
+ else if (lldb::endian::InlHostByteOrder() == eByteOrderBig)
data.SetByteOrder (eByteOrderLittle);
else
data.SetByteOrder (eByteOrderBig);
Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Jan 31 19:31:41 2011
@@ -43,6 +43,7 @@
#include "lldb/Core/InputReader.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/Timer.h"
+#include "lldb/Host/Host.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/TargetList.h"
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Mon Jan 31 19:31:41 2011
@@ -785,7 +785,7 @@
::memset (header, 0, sizeof(header));
// Get the magic byte unswapped so we can figure out what we are dealing with
- DataExtractor data(header_bytes.GetBytes(), header_bytes.GetByteSize(), eByteOrderHost, 4);
+ DataExtractor data(header_bytes.GetBytes(), header_bytes.GetByteSize(), lldb::endian::InlHostByteOrder(), 4);
header->magic = data.GetU32(&offset);
lldb::addr_t load_cmd_addr = addr;
data.SetByteOrder(DynamicLoaderMacOSXDYLD::GetByteOrderFromMagic(header->magic));
Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h Mon Jan 31 19:31:41 2011
@@ -154,11 +154,11 @@
{
case llvm::MachO::HeaderMagic32:
case llvm::MachO::HeaderMagic64:
- return lldb::eByteOrderHost;
+ return lldb::endian::InlHostByteOrder();
case llvm::MachO::HeaderMagic32Swapped:
case llvm::MachO::HeaderMagic64Swapped:
- if (lldb::eByteOrderHost == lldb::eByteOrderBig)
+ if (lldb::endian::InlHostByteOrder() == lldb::eByteOrderBig)
return lldb::eByteOrderLittle;
else
return lldb::eByteOrderBig;
@@ -274,11 +274,11 @@
{
case llvm::MachO::HeaderMagic32: // MH_MAGIC
case llvm::MachO::HeaderMagic64: // MH_MAGIC_64
- return lldb::eByteOrderHost;
+ return lldb::endian::InlHostByteOrder();
case llvm::MachO::HeaderMagic32Swapped: // MH_CIGAM
case llvm::MachO::HeaderMagic64Swapped: // MH_CIGAM_64
- if (lldb::eByteOrderHost == lldb::eByteOrderLittle)
+ if (lldb::endian::InlHostByteOrder() == lldb::eByteOrderLittle)
return lldb::eByteOrderBig;
else
return lldb::eByteOrderLittle;
@@ -286,7 +286,7 @@
assert (!"invalid header.magic value");
break;
}
- return lldb::eByteOrderHost;
+ return lldb::endian::InlHostByteOrder();
}
const Segment *
Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp Mon Jan 31 19:31:41 2011
@@ -288,7 +288,7 @@
bool
ObjectContainerBSDArchive::MagicBytesMatch (DataBufferSP& dataSP)
{
- DataExtractor data(dataSP, eByteOrderHost, 4);
+ DataExtractor data(dataSP, lldb::endian::InlHostByteOrder(), 4);
uint32_t offset = 0;
const char* armag = (const char* )data.PeekData (offset, sizeof(ar_hdr));
if (armag && ::strncmp(armag, ARMAG, SARMAG) == 0)
Modified: lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp Mon Jan 31 19:31:41 2011
@@ -73,7 +73,7 @@
bool
ObjectContainerUniversalMachO::MagicBytesMatch (DataBufferSP& dataSP)
{
- DataExtractor data(dataSP, eByteOrderHost, 4);
+ DataExtractor data(dataSP, lldb::endian::InlHostByteOrder(), 4);
uint32_t offset = 0;
uint32_t magic = data.GetU32(&offset);
return magic == UniversalMagic || magic == UniversalMagicSwapped;
Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Mon Jan 31 19:31:41 2011
@@ -93,7 +93,7 @@
bool
ObjectFileMachO::MagicBytesMatch (DataBufferSP& dataSP)
{
- DataExtractor data(dataSP, eByteOrderHost, 4);
+ DataExtractor data(dataSP, lldb::endian::InlHostByteOrder(), 4);
uint32_t offset = 0;
uint32_t magic = data.GetU32(&offset);
return MachHeaderSizeFromMagic(magic) != 0;
@@ -123,31 +123,31 @@
lldb_private::Mutex::Locker locker(m_mutex);
bool can_parse = false;
uint32_t offset = 0;
- m_data.SetByteOrder (eByteOrderHost);
+ m_data.SetByteOrder (lldb::endian::InlHostByteOrder());
// Leave magic in the original byte order
m_header.magic = m_data.GetU32(&offset);
switch (m_header.magic)
{
case HeaderMagic32:
- m_data.SetByteOrder (eByteOrderHost);
+ m_data.SetByteOrder (lldb::endian::InlHostByteOrder());
m_data.SetAddressByteSize(4);
can_parse = true;
break;
case HeaderMagic64:
- m_data.SetByteOrder (eByteOrderHost);
+ m_data.SetByteOrder (lldb::endian::InlHostByteOrder());
m_data.SetAddressByteSize(8);
can_parse = true;
break;
case HeaderMagic32Swapped:
- m_data.SetByteOrder(eByteOrderHost == eByteOrderBig ? eByteOrderLittle : eByteOrderBig);
+ m_data.SetByteOrder(lldb::endian::InlHostByteOrder() == eByteOrderBig ? eByteOrderLittle : eByteOrderBig);
m_data.SetAddressByteSize(4);
can_parse = true;
break;
case HeaderMagic64Swapped:
- m_data.SetByteOrder(eByteOrderHost == eByteOrderBig ? eByteOrderLittle : eByteOrderBig);
+ m_data.SetByteOrder(lldb::endian::InlHostByteOrder() == eByteOrderBig ? eByteOrderLittle : eByteOrderBig);
m_data.SetAddressByteSize(8);
can_parse = true;
break;
@@ -652,7 +652,7 @@
assert (symtab_data_sp->GetByteSize()/nlist_size >= symtab_load_command.nsyms);
- if (endian != eByteOrderHost)
+ if (endian != lldb::endian::InlHostByteOrder())
{
// ...
assert (!"UNIMPLEMENTED: Swap all nlist entries");
Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/MacOSX/MachTask.cpp Mon Jan 31 19:31:41 2011
@@ -21,6 +21,7 @@
#endif
+#include "lldb/Host/Endian.h"
#include "lldb/Host/Host.h"
#include "lldb/Core/DataExtractor.h"
@@ -165,7 +166,7 @@
log->Printf ("MachTask::ReadMemory ( addr = 0x%16.16llx, size = %zu, buf = %8.8p) => %u bytes read", (uint64_t)addr, size, buf, n);
if (log->GetMask().Test(PD_LOG_MEMORY_DATA_LONG) || (log->GetMask().Test(PD_LOG_MEMORY_DATA_SHORT) && size <= 8))
{
- DataExtractor data((uint8_t*)buf, n, eByteOrderHost, 4);
+ DataExtractor data((uint8_t*)buf, n, lldb::endian::InlHostByteOrder(), 4);
data.PutToLog(log.get(), 0, n, addr, 16, DataExtractor::TypeUInt8);
}
}
@@ -191,7 +192,7 @@
log->Printf ("MachTask::WriteMemory ( addr = 0x%16.16llx, size = %zu, buf = %8.8p) => %u bytes written", (uint64_t)addr, size, buf, n);
if (log->GetMask().Test(PD_LOG_MEMORY_DATA_LONG) || (log->GetMask().Test(PD_LOG_MEMORY_DATA_SHORT) && size <= 8))
{
- DataExtractor data((uint8_t*)buf, n, eByteOrderHost, 4);
+ DataExtractor data((uint8_t*)buf, n, lldb::endian::InlHostByteOrder(), 4);
data.PutToLog(log.get(), 0, n, addr, 16, DataExtractor::TypeUInt8);
}
}
Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp Mon Jan 31 19:31:41 2011
@@ -32,6 +32,7 @@
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/State.h"
#include "lldb/Core/Timer.h"
+#include "lldb/Host/Host.h"
#include "lldb/Host/TimeValue.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/DynamicLoader.h"
@@ -48,7 +49,6 @@
#endif // #if defined (__arm__)
// Project includes
-#include "lldb/Host/Host.h"
#include "ProcessMacOSX.h"
#include "ProcessMacOSXLog.h"
#include "ThreadMacOSX.h"
Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_arm.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_arm.cpp Mon Jan 31 19:31:41 2011
@@ -18,6 +18,7 @@
#include "lldb/Core/DataBufferHeap.h"
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/Scalar.h"
+#include "lldb/Host/Endian.h"
// Project includes
#include "ARM_GCC_Registers.h"
@@ -837,7 +838,7 @@
case gpr_lr:
case gpr_pc:
case gpr_cpsr:
- data.SetData(&gpr.r[reg - gpr_r0], reg_info->byte_size, eByteOrderHost);
+ data.SetData(&gpr.r[reg - gpr_r0], reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_s0:
@@ -872,23 +873,23 @@
case fpu_s29:
case fpu_s30:
case fpu_s31:
- data.SetData(&fpu.floats.s[reg - fpu_s0], reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.floats.s[reg - fpu_s0], reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_fpscr:
- data.SetData(&fpu.fpscr, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.fpscr, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case exc_exception:
- data.SetData(&exc.exception, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&exc.exception, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case exc_fsr:
- data.SetData(&exc.fsr, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&exc.fsr, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case exc_far:
- data.SetData(&exc.far, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&exc.far, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
default:
Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_i386.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_i386.cpp Mon Jan 31 19:31:41 2011
@@ -16,6 +16,7 @@
#include "lldb/Core/DataBufferHeap.h"
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/Scalar.h"
+#include "lldb/Host/Endian.h"
// Project includes
#include "RegisterContextMach_i386.h"
@@ -817,47 +818,47 @@
case gpr_es:
case gpr_fs:
case gpr_gs:
- data.SetData(&gpr.eax + reg - gpr_eax, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&gpr.eax + reg - gpr_eax, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_fcw:
- data.SetData(&fpu.fcw, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.fcw, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_fsw:
- data.SetData(&fpu.fsw, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.fsw, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_ftw:
- data.SetData(&fpu.ftw, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.ftw, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_fop:
- data.SetData(&fpu.fop, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.fop, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_ip:
- data.SetData(&fpu.ip, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.ip, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_cs:
- data.SetData(&fpu.cs, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.cs, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_dp:
- data.SetData(&fpu.dp, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.dp, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_ds:
- data.SetData(&fpu.ds, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.ds, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_mxcsr:
- data.SetData(&fpu.mxcsr, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.mxcsr, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_mxcsrmask:
- data.SetData(&fpu.mxcsrmask, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.mxcsrmask, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_stmm0:
@@ -868,7 +869,7 @@
case fpu_stmm5:
case fpu_stmm6:
case fpu_stmm7:
- data.SetData(fpu.stmm[reg - fpu_stmm0].bytes, reg_info->byte_size, eByteOrderHost);
+ data.SetData(fpu.stmm[reg - fpu_stmm0].bytes, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_xmm0:
@@ -879,19 +880,19 @@
case fpu_xmm5:
case fpu_xmm6:
case fpu_xmm7:
- data.SetData(fpu.xmm[reg - fpu_xmm0].bytes, reg_info->byte_size, eByteOrderHost);
+ data.SetData(fpu.xmm[reg - fpu_xmm0].bytes, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case exc_trapno:
- data.SetData(&exc.trapno, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&exc.trapno, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case exc_err:
- data.SetData(&exc.err, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&exc.err, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case exc_faultvaddr:
- data.SetData(&exc.faultvaddr, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&exc.faultvaddr, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
default:
Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_x86_64.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/RegisterContextMach_x86_64.cpp Mon Jan 31 19:31:41 2011
@@ -16,6 +16,7 @@
#include "lldb/Core/DataBufferHeap.h"
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/Scalar.h"
+#include "lldb/Host/Endian.h"
// Project includes
#include "RegisterContextMach_x86_64.h"
@@ -895,47 +896,47 @@
case gpr_cs:
case gpr_fs:
case gpr_gs:
- data.SetData(&gpr.rax + reg - gpr_rax, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&gpr.rax + reg - gpr_rax, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_fcw:
- data.SetData(&fpu.fcw, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.fcw, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_fsw:
- data.SetData(&fpu.fsw, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.fsw, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_ftw:
- data.SetData(&fpu.ftw, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.ftw, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_fop:
- data.SetData(&fpu.fop, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.fop, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_ip:
- data.SetData(&fpu.ip, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.ip, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_cs:
- data.SetData(&fpu.cs, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.cs, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_dp:
- data.SetData(&fpu.dp, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.dp, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_ds:
- data.SetData(&fpu.ds, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.ds, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_mxcsr:
- data.SetData(&fpu.mxcsr, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.mxcsr, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_mxcsrmask:
- data.SetData(&fpu.mxcsrmask, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&fpu.mxcsrmask, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_stmm0:
@@ -946,7 +947,7 @@
case fpu_stmm5:
case fpu_stmm6:
case fpu_stmm7:
- data.SetData(fpu.stmm[reg - fpu_stmm0].bytes, reg_info->byte_size, eByteOrderHost);
+ data.SetData(fpu.stmm[reg - fpu_stmm0].bytes, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case fpu_xmm0:
@@ -965,19 +966,19 @@
case fpu_xmm13:
case fpu_xmm14:
case fpu_xmm15:
- data.SetData(fpu.xmm[reg - fpu_xmm0].bytes, reg_info->byte_size, eByteOrderHost);
+ data.SetData(fpu.xmm[reg - fpu_xmm0].bytes, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case exc_trapno:
- data.SetData(&exc.trapno, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&exc.trapno, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case exc_err:
- data.SetData(&exc.err, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&exc.err, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
case exc_faultvaddr:
- data.SetData(&exc.faultvaddr, reg_info->byte_size, eByteOrderHost);
+ data.SetData(&exc.faultvaddr, reg_info->byte_size, lldb::endian::InlHostByteOrder());
break;
default:
Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Mon Jan 31 19:31:41 2011
@@ -707,35 +707,35 @@
if (regloc.type == eRegisterValueInferred)
{
- data.SetByteOrder (eByteOrderHost);
+ data.SetByteOrder (lldb::endian::InlHostByteOrder());
switch (reg_info->byte_size)
{
case 1:
{
uint8_t val = regloc.location.register_value;
memcpy (data_sp->GetBytes(), &val, sizeof (val));
- data.SetByteOrder (eByteOrderHost);
+ data.SetByteOrder (lldb::endian::InlHostByteOrder());
return true;
}
case 2:
{
uint16_t val = regloc.location.register_value;
memcpy (data_sp->GetBytes(), &val, sizeof (val));
- data.SetByteOrder (eByteOrderHost);
+ data.SetByteOrder (lldb::endian::InlHostByteOrder());
return true;
}
case 4:
{
uint32_t val = regloc.location.register_value;
memcpy (data_sp->GetBytes(), &val, sizeof (val));
- data.SetByteOrder (eByteOrderHost);
+ data.SetByteOrder (lldb::endian::InlHostByteOrder());
return true;
}
case 8:
{
uint64_t val = regloc.location.register_value;
memcpy (data_sp->GetBytes(), &val, sizeof (val));
- data.SetByteOrder (eByteOrderHost);
+ data.SetByteOrder (lldb::endian::InlHostByteOrder());
return true;
}
}
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Mon Jan 31 19:31:41 2011
@@ -18,6 +18,7 @@
#include "lldb/Core/Log.h"
#include "lldb/Core/State.h"
#include "lldb/Core/StreamString.h"
+#include "lldb/Host/Host.h"
#include "lldb/Host/TimeValue.h"
// Project includes
@@ -48,7 +49,7 @@
m_arch(),
m_os(),
m_vendor(),
- m_byte_order(eByteOrderHost),
+ m_byte_order(lldb::endian::InlHostByteOrder()),
m_pointer_byte_size(0)
{
m_rx_packet_listener.StartListeningForEvents(this,
@@ -773,7 +774,7 @@
if (i > 0)
packet.PutChar(',');
packet.Printf("%i,%i,", arg_len * 2, i);
- packet.PutBytesAsRawHex8(arg, arg_len, eByteOrderHost, eByteOrderHost);
+ packet.PutBytesAsRawHex8(arg, arg_len, lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder());
}
StringExtractorGDBRemote response;
@@ -815,7 +816,7 @@
m_arch.Clear();
m_os.Clear();
m_vendor.Clear();
- m_byte_order = eByteOrderHost;
+ m_byte_order = lldb::endian::InlHostByteOrder();
m_pointer_byte_size = 0;
StringExtractorGDBRemote response;
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Mon Jan 31 19:31:41 2011
@@ -341,8 +341,8 @@
packet.PutBytesAsRawHex8 (m_reg_data.GetDataStart(),
m_reg_data.GetByteSize(),
- eByteOrderHost,
- eByteOrderHost);
+ lldb::endian::InlHostByteOrder(),
+ lldb::endian::InlHostByteOrder());
if (thread_suffix_supported)
packet.Printf (";thread:%4.4x;", m_thread.GetID());
@@ -369,8 +369,8 @@
packet.Printf ("P%x=", reg);
packet.PutBytesAsRawHex8 (m_reg_data.PeekData(reg_info->byte_offset, reg_info->byte_size),
reg_info->byte_size,
- eByteOrderHost,
- eByteOrderHost);
+ lldb::endian::InlHostByteOrder(),
+ lldb::endian::InlHostByteOrder());
if (thread_suffix_supported)
packet.Printf (";thread:%4.4x;", m_thread.GetID());
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Mon Jan 31 19:31:41 2011
@@ -758,7 +758,7 @@
else
packet.PutCString("vAttachName");
packet.PutChar(';');
- packet.PutBytesAsRawHex8(process_name, strlen(process_name), eByteOrderHost, eByteOrderHost);
+ packet.PutBytesAsRawHex8(process_name, strlen(process_name), lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder());
m_async_broadcaster.BroadcastEvent (eBroadcastBitAsyncContinue, new EventDataBytes (packet.GetData(), packet.GetSize()));
@@ -1324,7 +1324,7 @@
{
StreamString packet;
packet.Printf("M%llx,%zx:", addr, size);
- packet.PutBytesAsRawHex8(buf, size, eByteOrderHost, eByteOrderHost);
+ packet.PutBytesAsRawHex8(buf, size, lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder());
StringExtractorGDBRemote response;
if (m_gdb_comm.SendPacketAndWaitForResponse(packet.GetData(), packet.GetSize(), response, 2, true))
{
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Mon Jan 31 19:31:41 2011
@@ -230,7 +230,7 @@
m_dynamic_checkers_ap (),
m_unix_signals (),
m_target_triple (),
- m_byte_order (eByteOrderHost),
+ m_byte_order (lldb::endian::InlHostByteOrder()),
m_addr_byte_size (0),
m_abi_sp (),
m_process_input_reader (),
Modified: lldb/trunk/source/Target/RegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/RegisterContext.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Target/RegisterContext.cpp (original)
+++ lldb/trunk/source/Target/RegisterContext.cpp Mon Jan 31 19:31:41 2011
@@ -14,6 +14,7 @@
#include "lldb/Target/RegisterContext.h"
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/Scalar.h"
+#include "lldb/Host/Endian.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Process.h"
@@ -315,7 +316,7 @@
case 1:
{
int8_t v;
- if (data.ExtractBytes (0, sizeof (int8_t), eByteOrderHost, &v) != sizeof (int8_t))
+ if (data.ExtractBytes (0, sizeof (int8_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int8_t))
return false;
value = v;
return true;
@@ -323,7 +324,7 @@
case 2:
{
int16_t v;
- if (data.ExtractBytes (0, sizeof (int16_t), eByteOrderHost, &v) != sizeof (int16_t))
+ if (data.ExtractBytes (0, sizeof (int16_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int16_t))
return false;
value = v;
return true;
@@ -331,7 +332,7 @@
case 4:
{
int32_t v;
- if (data.ExtractBytes (0, sizeof (int32_t), eByteOrderHost, &v) != sizeof (int32_t))
+ if (data.ExtractBytes (0, sizeof (int32_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int32_t))
return false;
value = v;
return true;
@@ -339,7 +340,7 @@
case 8:
{
int64_t v;
- if (data.ExtractBytes (0, sizeof (int64_t), eByteOrderHost, &v) != sizeof (int64_t))
+ if (data.ExtractBytes (0, sizeof (int64_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int64_t))
return false;
value = v;
return true;
@@ -352,7 +353,7 @@
case sizeof (float):
{
float v;
- if (data.ExtractBytes (0, sizeof (float), eByteOrderHost, &v) != sizeof (float))
+ if (data.ExtractBytes (0, sizeof (float), lldb::endian::InlHostByteOrder(), &v) != sizeof (float))
return false;
value = v;
return true;
@@ -360,7 +361,7 @@
case sizeof (double):
{
double v;
- if (data.ExtractBytes (0, sizeof (double), eByteOrderHost, &v) != sizeof (double))
+ if (data.ExtractBytes (0, sizeof (double), lldb::endian::InlHostByteOrder(), &v) != sizeof (double))
return false;
value = v;
return true;
@@ -368,7 +369,7 @@
case sizeof (long double):
{
double v;
- if (data.ExtractBytes (0, sizeof (long double), eByteOrderHost, &v) != sizeof (long double))
+ if (data.ExtractBytes (0, sizeof (long double), lldb::endian::InlHostByteOrder(), &v) != sizeof (long double))
return false;
value = v;
return true;
Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=124643&r1=124642&r2=124643&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Mon Jan 31 19:31:41 2011
@@ -14,7 +14,6 @@
#include "lldb/Core/Stream.h"
#include "lldb/Core/StreamString.h"
#include "lldb/Core/RegularExpression.h"
-#include "lldb/Host/Host.h"
#include "lldb/Target/DynamicLoader.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/ObjCLanguageRuntime.h"
More information about the lldb-commits
mailing list