Index: lldb/trunk/include/lldb/Core/Opcode.h =================================================================== --- lldb/trunk/include/lldb/Core/Opcode.h +++ lldb/trunk/include/lldb/Core/Opcode.h @@ -261,8 +261,8 @@ bool GetEndianSwap() const { - return (m_byte_order == lldb::eByteOrderBig && lldb::endian::InlHostByteOrder() == lldb::eByteOrderLittle) || - (m_byte_order == lldb::eByteOrderLittle && lldb::endian::InlHostByteOrder() == lldb::eByteOrderBig); + return (m_byte_order == lldb::eByteOrderBig && endian::InlHostByteOrder() == lldb::eByteOrderLittle) || + (m_byte_order == lldb::eByteOrderLittle && endian::InlHostByteOrder() == lldb::eByteOrderBig); } lldb::ByteOrder m_byte_order; Index: lldb/trunk/include/lldb/Core/RegisterValue.h =================================================================== --- lldb/trunk/include/lldb/Core/RegisterValue.h +++ lldb/trunk/include/lldb/Core/RegisterValue.h @@ -365,7 +365,7 @@ { if (m_type == eTypeBytes) return buffer.byte_order; - return lldb::endian::InlHostByteOrder(); + return endian::InlHostByteOrder(); } uint32_t Index: lldb/trunk/include/lldb/Host/Endian.h =================================================================== --- lldb/trunk/include/lldb/Host/Endian.h +++ lldb/trunk/include/lldb/Host/Endian.h @@ -12,7 +12,7 @@ #include "lldb/lldb-enumerations.h" -namespace lldb { +namespace lldb_private { namespace endian { @@ -22,7 +22,7 @@ uint8_t bytes[sizeof(uint32_t)]; } const endianTest = { 0x01020304 }; - inline ByteOrder InlHostByteOrder() { return (ByteOrder)endianTest.bytes[0]; } + inline lldb::ByteOrder InlHostByteOrder() { return (lldb::ByteOrder)endianTest.bytes[0]; } // ByteOrder const InlHostByteOrder = (ByteOrder)endianTest.bytes[0]; } Index: lldb/trunk/source/Core/Address.cpp =================================================================== --- lldb/trunk/source/Core/Address.cpp +++ lldb/trunk/source/Core/Address.cpp @@ -179,7 +179,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), lldb::endian::InlHostByteOrder(), 4); + DataExtractor data (buf, sizeof(buf), endian::InlHostByteOrder(), 4); size_t total_len = 0; size_t bytes_read; Address curr_address(address); Index: lldb/trunk/source/Core/DataEncoder.cpp =================================================================== --- lldb/trunk/source/Core/DataEncoder.cpp +++ lldb/trunk/source/Core/DataEncoder.cpp @@ -61,7 +61,7 @@ DataEncoder::DataEncoder () : m_start (NULL), m_end (NULL), - m_byte_order(lldb::endian::InlHostByteOrder()), + m_byte_order(endian::InlHostByteOrder()), m_addr_size (sizeof(void*)), m_data_sp () { @@ -114,7 +114,7 @@ { m_start = NULL; m_end = NULL; - m_byte_order = lldb::endian::InlHostByteOrder(); + m_byte_order = endian::InlHostByteOrder(); m_addr_size = sizeof(void*); m_data_sp.reset(); } @@ -240,7 +240,7 @@ { if (ValidOffsetForDataOfSize(offset, sizeof(value))) { - if (m_byte_order != lldb::endian::InlHostByteOrder()) + if (m_byte_order != endian::InlHostByteOrder()) WriteSwappedInt16 (m_start, offset, value); else WriteInt16 (m_start, offset, value); @@ -255,7 +255,7 @@ { if (ValidOffsetForDataOfSize(offset, sizeof(value))) { - if (m_byte_order != lldb::endian::InlHostByteOrder()) + if (m_byte_order != endian::InlHostByteOrder()) WriteSwappedInt32 (m_start, offset, value); else WriteInt32 (m_start, offset, value); @@ -270,7 +270,7 @@ { if (ValidOffsetForDataOfSize(offset, sizeof(value))) { - if (m_byte_order != lldb::endian::InlHostByteOrder()) + if (m_byte_order != endian::InlHostByteOrder()) WriteSwappedInt64 (m_start, offset, value); else WriteInt64 (m_start, offset, value); Index: lldb/trunk/source/Core/DataExtractor.cpp =================================================================== --- lldb/trunk/source/Core/DataExtractor.cpp +++ lldb/trunk/source/Core/DataExtractor.cpp @@ -130,7 +130,7 @@ DataExtractor::DataExtractor () : m_start (NULL), m_end (NULL), - m_byte_order(lldb::endian::InlHostByteOrder()), + m_byte_order(endian::InlHostByteOrder()), m_addr_size (sizeof(void *)), m_data_sp (), m_target_byte_size(1) @@ -249,7 +249,7 @@ { m_start = NULL; m_end = NULL; - m_byte_order = lldb::endian::InlHostByteOrder(); + m_byte_order = endian::InlHostByteOrder(); m_addr_size = sizeof(void *); m_data_sp.reset(); } @@ -442,7 +442,7 @@ const uint8_t *data = (const uint8_t *)GetData (offset_ptr, sizeof(val)); if (data) { - if (m_byte_order != lldb::endian::InlHostByteOrder()) + if (m_byte_order != endian::InlHostByteOrder()) val = ReadSwapInt16(data); else val = ReadInt16 (data); @@ -454,7 +454,7 @@ DataExtractor::GetU16_unchecked (offset_t *offset_ptr) const { uint16_t val; - if (m_byte_order == lldb::endian::InlHostByteOrder()) + if (m_byte_order == endian::InlHostByteOrder()) val = ReadInt16 (m_start, *offset_ptr); else val = ReadSwapInt16(m_start, *offset_ptr); @@ -466,7 +466,7 @@ DataExtractor::GetU32_unchecked (offset_t *offset_ptr) const { uint32_t val; - if (m_byte_order == lldb::endian::InlHostByteOrder()) + if (m_byte_order == endian::InlHostByteOrder()) val = ReadInt32 (m_start, *offset_ptr); else val = ReadSwapInt32 (m_start, *offset_ptr); @@ -478,7 +478,7 @@ DataExtractor::GetU64_unchecked (offset_t *offset_ptr) const { uint64_t val; - if (m_byte_order == lldb::endian::InlHostByteOrder()) + if (m_byte_order == endian::InlHostByteOrder()) val = ReadInt64 (m_start, *offset_ptr); else val = ReadSwapInt64 (m_start, *offset_ptr); @@ -503,7 +503,7 @@ const uint16_t *src = (const uint16_t *)GetData (offset_ptr, src_size); if (src) { - if (m_byte_order != lldb::endian::InlHostByteOrder()) + if (m_byte_order != endian::InlHostByteOrder()) { uint16_t *dst_pos = (uint16_t *)void_dst; uint16_t *dst_end = dst_pos + count; @@ -538,7 +538,7 @@ const uint8_t *data = (const uint8_t *)GetData (offset_ptr, sizeof(val)); if (data) { - if (m_byte_order != lldb::endian::InlHostByteOrder()) + if (m_byte_order != endian::InlHostByteOrder()) { val = ReadSwapInt32 (data); } @@ -566,7 +566,7 @@ const uint32_t *src = (const uint32_t *)GetData (offset_ptr, src_size); if (src) { - if (m_byte_order != lldb::endian::InlHostByteOrder()) + if (m_byte_order != endian::InlHostByteOrder()) { uint32_t *dst_pos = (uint32_t *)void_dst; uint32_t *dst_end = dst_pos + count; @@ -601,7 +601,7 @@ const uint8_t *data = (const uint8_t *)GetData (offset_ptr, sizeof(val)); if (data) { - if (m_byte_order != lldb::endian::InlHostByteOrder()) + if (m_byte_order != endian::InlHostByteOrder()) { val = ReadSwapInt64 (data); } @@ -627,7 +627,7 @@ const uint64_t *src = (const uint64_t *)GetData (offset_ptr, src_size); if (src) { - if (m_byte_order != lldb::endian::InlHostByteOrder()) + if (m_byte_order != endian::InlHostByteOrder()) { uint64_t *dst_pos = (uint64_t *)void_dst; uint64_t *dst_end = dst_pos + count; @@ -775,7 +775,7 @@ const float_type *src = (const float_type *)GetData (offset_ptr, src_size); if (src) { - if (m_byte_order != lldb::endian::InlHostByteOrder()) + if (m_byte_order != endian::InlHostByteOrder()) { const uint8_t *src_data = (const uint8_t *)src; uint8_t *dst_data = (uint8_t *)&val; @@ -799,7 +799,7 @@ const float_type *src = (const float_type *)GetData (offset_ptr, src_size); if (src) { - if (m_byte_order != lldb::endian::InlHostByteOrder()) + if (m_byte_order != endian::InlHostByteOrder()) { const uint8_t *src_data = (const uint8_t *)src; uint8_t *dst_data = (uint8_t *)&val; @@ -820,9 +820,9 @@ { long double val = 0.0; #if defined (__i386__) || defined (__amd64__) || defined (__x86_64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_X64) - *offset_ptr += CopyByteOrderedData (*offset_ptr, 10, &val, sizeof(val), lldb::endian::InlHostByteOrder()); + *offset_ptr += CopyByteOrderedData (*offset_ptr, 10, &val, sizeof(val), endian::InlHostByteOrder()); #else - *offset_ptr += CopyByteOrderedData (*offset_ptr, sizeof(val), &val, sizeof(val), lldb::endian::InlHostByteOrder()); + *offset_ptr += CopyByteOrderedData (*offset_ptr, sizeof(val), &val, sizeof(val), endian::InlHostByteOrder()); #endif return val; } Index: lldb/trunk/source/Core/Event.cpp =================================================================== --- lldb/trunk/source/Core/Event.cpp +++ lldb/trunk/source/Core/Event.cpp @@ -147,7 +147,7 @@ else if (m_bytes.size() > 0) { DataExtractor data; - data.SetData(&m_bytes[0], m_bytes.size(), lldb::endian::InlHostByteOrder()); + data.SetData(&m_bytes[0], m_bytes.size(), endian::InlHostByteOrder()); data.Dump(s, 0, eFormatBytes, 1, m_bytes.size(), 32, LLDB_INVALID_ADDRESS, 0, 0); } } Index: lldb/trunk/source/Core/Opcode.cpp =================================================================== --- lldb/trunk/source/Core/Opcode.cpp +++ lldb/trunk/source/Core/Opcode.cpp @@ -82,7 +82,7 @@ case Opcode::eType16: case Opcode::eType16_2: case Opcode::eType32: - case Opcode::eType64: return lldb::endian::InlHostByteOrder(); + case Opcode::eType64: return endian::InlHostByteOrder(); case Opcode::eTypeBytes: break; } Index: lldb/trunk/source/Core/Scalar.cpp =================================================================== --- lldb/trunk/source/Core/Scalar.cpp +++ lldb/trunk/source/Core/Scalar.cpp @@ -143,7 +143,7 @@ { if (limit_byte_size < byte_size) { - if (lldb::endian::InlHostByteOrder() == eByteOrderLittle) + if (endian::InlHostByteOrder() == eByteOrderLittle) { // On little endian systems if we want fewer bytes from the // current type we just specify fewer bytes since the LSByte @@ -160,23 +160,23 @@ case e_ulonglong: case e_sint128: case e_uint128: - data.SetData((const uint8_t *)m_integer.getRawData(), limit_byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((const uint8_t *)m_integer.getRawData(), limit_byte_size, endian::InlHostByteOrder()); return true; case e_float: f_val = m_float.convertToFloat(); - data.SetData((uint8_t *)&f_val, limit_byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((uint8_t *)&f_val, limit_byte_size, endian::InlHostByteOrder()); return true; case e_double: d_val = m_float.convertToDouble(); - data.SetData((uint8_t *)&d_val, limit_byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((uint8_t *)&d_val, limit_byte_size, endian::InlHostByteOrder()); return true; case e_long_double: static llvm::APInt ldbl_val = m_float.bitcastToAPInt(); - data.SetData((const uint8_t *)ldbl_val.getRawData(), limit_byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((const uint8_t *)ldbl_val.getRawData(), limit_byte_size, endian::InlHostByteOrder()); return true; } } - else if (lldb::endian::InlHostByteOrder() == eByteOrderBig) + else if (endian::InlHostByteOrder() == eByteOrderBig) { // On big endian systems if we want fewer bytes from the // current type have to advance our initial byte pointer and @@ -193,19 +193,19 @@ case e_ulonglong: case e_sint128: case e_uint128: - data.SetData((const uint8_t *)m_integer.getRawData() + byte_size - limit_byte_size, limit_byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((const uint8_t *)m_integer.getRawData() + byte_size - limit_byte_size, limit_byte_size, endian::InlHostByteOrder()); return true; case e_float: f_val = m_float.convertToFloat(); - data.SetData((uint8_t *)&f_val + byte_size - limit_byte_size, limit_byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((uint8_t *)&f_val + byte_size - limit_byte_size, limit_byte_size, endian::InlHostByteOrder()); return true; case e_double: d_val = m_float.convertToDouble(); - data.SetData((uint8_t *)&d_val + byte_size - limit_byte_size, limit_byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((uint8_t *)&d_val + byte_size - limit_byte_size, limit_byte_size, endian::InlHostByteOrder()); return true; case e_long_double: static llvm::APInt ldbl_val = m_float.bitcastToAPInt(); - data.SetData((const uint8_t *)ldbl_val.getRawData() + byte_size - limit_byte_size, limit_byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((const uint8_t *)ldbl_val.getRawData() + byte_size - limit_byte_size, limit_byte_size, endian::InlHostByteOrder()); return true; } } @@ -225,19 +225,19 @@ case e_ulonglong: case e_sint128: case e_uint128: - data.SetData((const uint8_t *)m_integer.getRawData(), byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((const uint8_t *)m_integer.getRawData(), byte_size, endian::InlHostByteOrder()); return true; case e_float: f_val = m_float.convertToFloat(); - data.SetData((uint8_t *)&f_val, byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((uint8_t *)&f_val, byte_size, endian::InlHostByteOrder()); return true; case e_double: d_val = m_float.convertToDouble(); - data.SetData((uint8_t *)&d_val, byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((uint8_t *)&d_val, byte_size, endian::InlHostByteOrder()); return true; case e_long_double: static llvm::APInt ldbl_val = m_float.bitcastToAPInt(); - data.SetData((const uint8_t *)ldbl_val.getRawData(), byte_size, lldb::endian::InlHostByteOrder()); + data.SetData((const uint8_t *)ldbl_val.getRawData(), byte_size, endian::InlHostByteOrder()); return true; } } Index: lldb/trunk/source/Core/Stream.cpp =================================================================== --- lldb/trunk/source/Core/Stream.cpp +++ lldb/trunk/source/Core/Stream.cpp @@ -30,7 +30,7 @@ Stream::Stream () : m_flags (0), m_addr_size (4), - m_byte_order (lldb::endian::InlHostByteOrder()), + m_byte_order (endian::InlHostByteOrder()), m_indent_level(0) { } @@ -632,7 +632,7 @@ size_t Stream::PutPointer (void *ptr) { - return PutRawBytes (&ptr, sizeof(ptr), lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder()); + return PutRawBytes (&ptr, sizeof(ptr), endian::InlHostByteOrder(), endian::InlHostByteOrder()); } size_t @@ -641,7 +641,7 @@ if (byte_order == eByteOrderInvalid) byte_order = m_byte_order; - return PutRawBytes (&f, sizeof(f), lldb::endian::InlHostByteOrder(), byte_order); + return PutRawBytes (&f, sizeof(f), endian::InlHostByteOrder(), byte_order); } size_t @@ -650,7 +650,7 @@ if (byte_order == eByteOrderInvalid) byte_order = m_byte_order; - return PutRawBytes (&d, sizeof(d), lldb::endian::InlHostByteOrder(), byte_order); + return PutRawBytes (&d, sizeof(d), endian::InlHostByteOrder(), byte_order); } size_t @@ -659,7 +659,7 @@ if (byte_order == eByteOrderInvalid) byte_order = m_byte_order; - return PutRawBytes (&ld, sizeof(ld), lldb::endian::InlHostByteOrder(), byte_order); + return PutRawBytes (&ld, sizeof(ld), endian::InlHostByteOrder(), byte_order); } size_t @@ -743,21 +743,21 @@ s->PutHex8(0x12); s->PutChar(' '); - s->PutHex16(0x3456, lldb::endian::InlHostByteOrder()); + s->PutHex16(0x3456, endian::InlHostByteOrder()); s->PutChar(' '); s->PutHex16(0x3456, eByteOrderBig); s->PutChar(' '); s->PutHex16(0x3456, eByteOrderLittle); s->PutChar(' '); - s->PutHex32(0x789abcde, lldb::endian::InlHostByteOrder()); + s->PutHex32(0x789abcde, endian::InlHostByteOrder()); s->PutChar(' '); s->PutHex32(0x789abcde, eByteOrderBig); s->PutChar(' '); s->PutHex32(0x789abcde, eByteOrderLittle); s->PutChar(' '); - s->PutHex64(0x1122334455667788ull, lldb::endian::InlHostByteOrder()); + s->PutHex64(0x1122334455667788ull, endian::InlHostByteOrder()); s->PutChar(' '); s->PutHex64(0x1122334455667788ull, eByteOrderBig); s->PutChar(' '); Index: lldb/trunk/source/Core/Value.cpp =================================================================== --- lldb/trunk/source/Core/Value.cpp +++ lldb/trunk/source/Core/Value.cpp @@ -189,7 +189,7 @@ { rhs.m_value.GetAsMemoryData (m_data_buffer.GetBytes() + curr_size, scalar_size, - lldb::endian::InlHostByteOrder(), + endian::InlHostByteOrder(), error); return scalar_size; } @@ -420,7 +420,7 @@ case eValueTypeScalar: { - data.SetByteOrder (lldb::endian::InlHostByteOrder()); + data.SetByteOrder (endian::InlHostByteOrder()); if (ast_type.IsValid()) data.SetAddressByteSize (ast_type.GetPointerByteSize()); else @@ -623,7 +623,7 @@ } } // fallback to host settings - data.SetByteOrder(lldb::endian::InlHostByteOrder()); + data.SetByteOrder(endian::InlHostByteOrder()); data.SetAddressByteSize(sizeof(void *)); break; } Index: lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp =================================================================== --- lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp +++ lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp @@ -143,7 +143,7 @@ compiler_type.GetPointerType(), ConstString(new_name.c_str()), buffer, - lldb::endian::InlHostByteOrder(), + endian::InlHostByteOrder(), exe_ctx.GetAddressByteSize()); m_address_of_backend->GetValue().SetValueType(Value::eValueTypeScalar); Index: lldb/trunk/source/Expression/IRInterpreter.cpp =================================================================== --- lldb/trunk/source/Expression/IRInterpreter.cpp +++ lldb/trunk/source/Expression/IRInterpreter.cpp @@ -365,7 +365,7 @@ const uint64_t *raw_data = resolved_value.getRawData(); - buffer.PutRawBytes(raw_data, constant_size, lldb::endian::InlHostByteOrder()); + buffer.PutRawBytes(raw_data, constant_size, lldb_private::endian::InlHostByteOrder()); lldb_private::Error write_error; Index: lldb/trunk/source/Host/freebsd/Host.cpp =================================================================== --- lldb/trunk/source/Host/freebsd/Host.cpp +++ lldb/trunk/source/Host/freebsd/Host.cpp @@ -76,7 +76,7 @@ size_t arg_data_size = sizeof(arg_data); if (::sysctl (mib, 4, arg_data, &arg_data_size , NULL, 0) == 0) { - DataExtractor data (arg_data, arg_data_size, lldb::endian::InlHostByteOrder(), sizeof(void *)); + DataExtractor data (arg_data, arg_data_size, endian::InlHostByteOrder(), sizeof(void *)); lldb::offset_t offset = 0; const char *cstr; Index: lldb/trunk/source/Host/macosx/Host.mm =================================================================== --- lldb/trunk/source/Host/macosx/Host.mm +++ lldb/trunk/source/Host/macosx/Host.mm @@ -816,7 +816,7 @@ arg_data_size = arg_data.GetByteSize(); if (::sysctl (proc_args_mib, 3, arg_data.GetBytes(), &arg_data_size , NULL, 0) == 0) { - DataExtractor data (arg_data.GetBytes(), arg_data_size, lldb::endian::InlHostByteOrder(), sizeof(void *)); + DataExtractor data (arg_data.GetBytes(), arg_data_size, endian::InlHostByteOrder(), sizeof(void *)); lldb::offset_t offset = 0; uint32_t argc = data.GetU32 (&offset); llvm::Triple &triple = process_info.GetArchitecture().GetTriple(); Index: lldb/trunk/source/Host/netbsd/Host.cpp =================================================================== --- lldb/trunk/source/Host/netbsd/Host.cpp +++ lldb/trunk/source/Host/netbsd/Host.cpp @@ -83,7 +83,7 @@ if (::sysctl (mib, 4, arg_data, &arg_data_size , NULL, 0) != 0) return false; - DataExtractor data (arg_data, arg_data_size, lldb::endian::InlHostByteOrder(), sizeof(void *)); + DataExtractor data (arg_data, arg_data_size, endian::InlHostByteOrder(), sizeof(void *)); lldb::offset_t offset = 0; const char *cstr; Index: lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -1007,7 +1007,7 @@ return m_memory_module_sp->GetArchitecture().GetByteOrder(); if (m_module_sp) return m_module_sp->GetArchitecture().GetByteOrder(); - return lldb::endian::InlHostByteOrder(); + return endian::InlHostByteOrder(); } lldb_private::ArchSpec @@ -1681,11 +1681,11 @@ { case llvm::MachO::MH_MAGIC: case llvm::MachO::MH_MAGIC_64: - return lldb::endian::InlHostByteOrder(); + return endian::InlHostByteOrder(); case llvm::MachO::MH_CIGAM: case llvm::MachO::MH_CIGAM_64: - if (lldb::endian::InlHostByteOrder() == lldb::eByteOrderBig) + if (endian::InlHostByteOrder() == lldb::eByteOrderBig) return lldb::eByteOrderLittle; else return lldb::eByteOrderBig; Index: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -1320,7 +1320,7 @@ ::memset (header, 0, sizeof(llvm::MachO::mach_header)); // Get the magic byte unswapped so we can figure out what we are dealing with - DataExtractor data(header_bytes.GetBytes(), header_bytes.GetByteSize(), lldb::endian::InlHostByteOrder(), 4); + DataExtractor data(header_bytes.GetBytes(), header_bytes.GetByteSize(), endian::InlHostByteOrder(), 4); header->magic = data.GetU32(&offset); lldb::addr_t load_cmd_addr = addr; data.SetByteOrder(DynamicLoaderMacOSXDYLD::GetByteOrderFromMagic(header->magic)); @@ -2047,11 +2047,11 @@ { case llvm::MachO::MH_MAGIC: case llvm::MachO::MH_MAGIC_64: - return lldb::endian::InlHostByteOrder(); + return endian::InlHostByteOrder(); case llvm::MachO::MH_CIGAM: case llvm::MachO::MH_CIGAM_64: - if (lldb::endian::InlHostByteOrder() == lldb::eByteOrderBig) + if (endian::InlHostByteOrder() == lldb::eByteOrderBig) return lldb::eByteOrderLittle; else return lldb::eByteOrderBig; Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp @@ -2000,7 +2000,7 @@ lldb_private::DataBufferHeap data(operand_data_size, 0); - if (lldb::endian::InlHostByteOrder() != m_data_allocator.GetStream().GetByteOrder()) + if (lldb_private::endian::InlHostByteOrder() != m_data_allocator.GetStream().GetByteOrder()) { uint8_t *data_bytes = data.GetBytes(); Index: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp =================================================================== --- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -1109,7 +1109,7 @@ lldb::offset_t *data_offset_ptr, llvm::MachO::mach_header &header) { - data.SetByteOrder (lldb::endian::InlHostByteOrder()); + data.SetByteOrder (endian::InlHostByteOrder()); // Leave magic in the original byte order header.magic = data.GetU32(data_offset_ptr); bool can_parse = false; @@ -1117,26 +1117,26 @@ switch (header.magic) { case MH_MAGIC: - data.SetByteOrder (lldb::endian::InlHostByteOrder()); + data.SetByteOrder (endian::InlHostByteOrder()); data.SetAddressByteSize(4); can_parse = true; break; case MH_MAGIC_64: - data.SetByteOrder (lldb::endian::InlHostByteOrder()); + data.SetByteOrder (endian::InlHostByteOrder()); data.SetAddressByteSize(8); can_parse = true; is_64_bit = true; break; case MH_CIGAM: - data.SetByteOrder(lldb::endian::InlHostByteOrder() == eByteOrderBig ? eByteOrderLittle : eByteOrderBig); + data.SetByteOrder(endian::InlHostByteOrder() == eByteOrderBig ? eByteOrderLittle : eByteOrderBig); data.SetAddressByteSize(4); can_parse = true; break; case MH_CIGAM_64: - data.SetByteOrder(lldb::endian::InlHostByteOrder() == eByteOrderBig ? eByteOrderLittle : eByteOrderBig); + data.SetByteOrder(endian::InlHostByteOrder() == eByteOrderBig ? eByteOrderLittle : eByteOrderBig); data.SetAddressByteSize(8); is_64_bit = true; can_parse = true; @@ -1169,31 +1169,31 @@ lldb_private::Mutex::Locker locker(module_sp->GetMutex()); bool can_parse = false; lldb::offset_t offset = 0; - m_data.SetByteOrder (lldb::endian::InlHostByteOrder()); + m_data.SetByteOrder (endian::InlHostByteOrder()); // Leave magic in the original byte order m_header.magic = m_data.GetU32(&offset); switch (m_header.magic) { case MH_MAGIC: - m_data.SetByteOrder (lldb::endian::InlHostByteOrder()); + m_data.SetByteOrder (endian::InlHostByteOrder()); m_data.SetAddressByteSize(4); can_parse = true; break; case MH_MAGIC_64: - m_data.SetByteOrder (lldb::endian::InlHostByteOrder()); + m_data.SetByteOrder (endian::InlHostByteOrder()); m_data.SetAddressByteSize(8); can_parse = true; break; case MH_CIGAM: - m_data.SetByteOrder(lldb::endian::InlHostByteOrder() == eByteOrderBig ? eByteOrderLittle : eByteOrderBig); + m_data.SetByteOrder(endian::InlHostByteOrder() == eByteOrderBig ? eByteOrderLittle : eByteOrderBig); m_data.SetAddressByteSize(4); can_parse = true; break; case MH_CIGAM_64: - m_data.SetByteOrder(lldb::endian::InlHostByteOrder() == eByteOrderBig ? eByteOrderLittle : eByteOrderBig); + m_data.SetByteOrder(endian::InlHostByteOrder() == eByteOrderBig ? eByteOrderLittle : eByteOrderBig); m_data.SetAddressByteSize(8); can_parse = true; break; Index: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp +++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp @@ -271,7 +271,7 @@ ProcessFreeBSD::ProcessFreeBSD(lldb::TargetSP target_sp, Listener &listener, UnixSignalsSP &unix_signals_sp) : Process(target_sp, listener, unix_signals_sp), - m_byte_order(lldb::endian::InlHostByteOrder()), + m_byte_order(endian::InlHostByteOrder()), m_monitor(NULL), m_module(NULL), m_message_mutex (Mutex::eMutexTypeRecursive), Index: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp +++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp @@ -1120,8 +1120,8 @@ StreamString packet; packet.PutBytesAsRawHex8(reply.GetDataStart(), reply.GetByteSize(), - lldb::endian::InlHostByteOrder(), - lldb::endian::InlHostByteOrder()); + endian::InlHostByteOrder(), + endian::InlHostByteOrder()); result.AppendMessage(packet.GetString().c_str()); result.SetStatus (eReturnStatusSuccessFinishResult); return true; Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp @@ -488,7 +488,7 @@ case fpu_v29: case fpu_v30: case fpu_v31: - value.SetBytes(fpu.v[reg].bytes, reg_info->byte_size, lldb::endian::InlHostByteOrder()); + value.SetBytes(fpu.v[reg].bytes, reg_info->byte_size, endian::InlHostByteOrder()); break; case fpu_fpsr: Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp @@ -626,7 +626,7 @@ case fpu_stmm5: case fpu_stmm6: case fpu_stmm7: - value.SetBytes(fpu.stmm[reg - fpu_stmm0].bytes, reg_info->byte_size, lldb::endian::InlHostByteOrder()); + value.SetBytes(fpu.stmm[reg - fpu_stmm0].bytes, reg_info->byte_size, endian::InlHostByteOrder()); break; case fpu_xmm0: @@ -645,7 +645,7 @@ case fpu_xmm13: case fpu_xmm14: case fpu_xmm15: - value.SetBytes(fpu.xmm[reg - fpu_xmm0].bytes, reg_info->byte_size, lldb::endian::InlHostByteOrder()); + value.SetBytes(fpu.xmm[reg - fpu_xmm0].bytes, reg_info->byte_size, endian::InlHostByteOrder()); break; case exc_trapno: Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -194,7 +194,7 @@ response.Printf("watchpoint_exceptions_received:after;"); #endif - switch (lldb::endian::InlHostByteOrder()) + switch (endian::InlHostByteOrder()) { case eByteOrderBig: response.PutCString ("endian:big;"); break; case eByteOrderLittle: response.PutCString ("endian:little;"); break; Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp @@ -273,8 +273,8 @@ packet.Printf ("P%x=", reg); packet.PutBytesAsRawHex8 (m_reg_data.PeekData(reg_info->byte_offset, reg_info->byte_size), reg_info->byte_size, - lldb::endian::InlHostByteOrder(), - lldb::endian::InlHostByteOrder()); + endian::InlHostByteOrder(), + endian::InlHostByteOrder()); if (gdb_comm.GetThreadSuffixSupported()) packet.Printf (";thread:%4.4" PRIx64 ";", m_thread.GetProtocolID()); @@ -370,8 +370,8 @@ packet.PutChar ('G'); packet.PutBytesAsRawHex8 (m_reg_data.GetDataStart(), m_reg_data.GetByteSize(), - lldb::endian::InlHostByteOrder(), - lldb::endian::InlHostByteOrder()); + endian::InlHostByteOrder(), + endian::InlHostByteOrder()); if (thread_suffix_supported) packet.Printf (";thread:%4.4" PRIx64 ";", m_thread.GetProtocolID()); @@ -770,8 +770,8 @@ packet.Printf ("P%x=", reg); packet.PutBytesAsRawHex8 (restore_src, reg_byte_size, - lldb::endian::InlHostByteOrder(), - lldb::endian::InlHostByteOrder()); + endian::InlHostByteOrder(), + endian::InlHostByteOrder()); if (thread_suffix_supported) packet.Printf (";thread:%4.4" PRIx64 ";", m_thread.GetProtocolID()); @@ -793,8 +793,8 @@ packet.Printf ("P%x=", reg); packet.PutBytesAsRawHex8 (restore_src, reg_byte_size, - lldb::endian::InlHostByteOrder(), - lldb::endian::InlHostByteOrder()); + endian::InlHostByteOrder(), + endian::InlHostByteOrder()); if (thread_suffix_supported) packet.Printf (";thread:%4.4" PRIx64 ";", m_thread.GetProtocolID()); @@ -849,7 +849,7 @@ } StreamString packet; packet.Printf ("P%x=", reg_info->kinds[eRegisterKindLLDB]); - packet.PutBytesAsRawHex8 (data_sp->GetBytes() + reg_info->byte_offset, reg_info->byte_size, lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder()); + packet.PutBytesAsRawHex8 (data_sp->GetBytes() + reg_info->byte_offset, reg_info->byte_size, endian::InlHostByteOrder(), endian::InlHostByteOrder()); if (thread_suffix_supported) packet.Printf (";thread:%4.4" PRIx64 ";", m_thread.GetProtocolID()); Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1450,7 +1450,7 @@ else packet.PutCString("vAttachName"); packet.PutChar(';'); - packet.PutBytesAsRawHex8(process_name, strlen(process_name), lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder()); + packet.PutBytesAsRawHex8(process_name, strlen(process_name), endian::InlHostByteOrder(), endian::InlHostByteOrder()); m_async_broadcaster.BroadcastEvent (eBroadcastBitAsyncContinue, new EventDataBytes (packet.GetData(), packet.GetSize())); @@ -3105,7 +3105,7 @@ StreamString packet; packet.Printf("M%" PRIx64 ",%" PRIx64 ":", addr, (uint64_t)size); - packet.PutBytesAsRawHex8(buf, size, lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder()); + packet.PutBytesAsRawHex8(buf, size, endian::InlHostByteOrder(), endian::InlHostByteOrder()); StringExtractorGDBRemote response; if (m_gdb_comm.SendPacketAndWaitForResponse(packet.GetData(), packet.GetSize(), response, true) == GDBRemoteCommunication::PacketResult::Success) { Index: lldb/trunk/source/Target/ExecutionContext.cpp =================================================================== --- lldb/trunk/source/Target/ExecutionContext.cpp +++ lldb/trunk/source/Target/ExecutionContext.cpp @@ -262,7 +262,7 @@ m_target_sp->GetArchitecture().GetByteOrder(); if (m_process_sp) m_process_sp->GetByteOrder(); - return lldb::endian::InlHostByteOrder(); + return endian::InlHostByteOrder(); } RegisterContext * Index: lldb/trunk/source/Target/RegisterContext.cpp =================================================================== --- lldb/trunk/source/Target/RegisterContext.cpp +++ lldb/trunk/source/Target/RegisterContext.cpp @@ -571,7 +571,7 @@ // case 1: // { // int8_t v; -// if (data.ExtractBytes (0, sizeof (int8_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int8_t)) +// if (data.ExtractBytes (0, sizeof (int8_t), endian::InlHostByteOrder(), &v) != sizeof (int8_t)) // return false; // value = v; // return true; @@ -579,7 +579,7 @@ // case 2: // { // int16_t v; -// if (data.ExtractBytes (0, sizeof (int16_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int16_t)) +// if (data.ExtractBytes (0, sizeof (int16_t), endian::InlHostByteOrder(), &v) != sizeof (int16_t)) // return false; // value = v; // return true; @@ -587,7 +587,7 @@ // case 4: // { // int32_t v; -// if (data.ExtractBytes (0, sizeof (int32_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int32_t)) +// if (data.ExtractBytes (0, sizeof (int32_t), endian::InlHostByteOrder(), &v) != sizeof (int32_t)) // return false; // value = v; // return true; @@ -595,7 +595,7 @@ // case 8: // { // int64_t v; -// if (data.ExtractBytes (0, sizeof (int64_t), lldb::endian::InlHostByteOrder(), &v) != sizeof (int64_t)) +// if (data.ExtractBytes (0, sizeof (int64_t), endian::InlHostByteOrder(), &v) != sizeof (int64_t)) // return false; // value = v; // return true; @@ -608,7 +608,7 @@ // case sizeof (float): // { // float v; -// if (data.ExtractBytes (0, sizeof (float), lldb::endian::InlHostByteOrder(), &v) != sizeof (float)) +// if (data.ExtractBytes (0, sizeof (float), endian::InlHostByteOrder(), &v) != sizeof (float)) // return false; // value = v; // return true; @@ -616,7 +616,7 @@ // case sizeof (double): // { // double v; -// if (data.ExtractBytes (0, sizeof (double), lldb::endian::InlHostByteOrder(), &v) != sizeof (double)) +// if (data.ExtractBytes (0, sizeof (double), endian::InlHostByteOrder(), &v) != sizeof (double)) // return false; // value = v; // return true; @@ -624,7 +624,7 @@ // case sizeof (long double): // { // double v; -// if (data.ExtractBytes (0, sizeof (long double), lldb::endian::InlHostByteOrder(), &v) != sizeof (long double)) +// if (data.ExtractBytes (0, sizeof (long double), endian::InlHostByteOrder(), &v) != sizeof (long double)) // return false; // value = v; // return true;