Applied a fix to qualify "UUID" with the lldb_private namespace to fix
build issues on MinGW.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124888 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectImage.cpp b/source/Commands/CommandObjectImage.cpp
index 5b56b6a..f71638c 100644
--- a/source/Commands/CommandObjectImage.cpp
+++ b/source/Commands/CommandObjectImage.cpp
@@ -1312,7 +1312,7 @@
CommandObjectImageList::CommandOptions::g_option_table[] =
{
{ LLDB_OPT_SET_1, false, "arch", 'a', optional_argument, NULL, 0, eArgTypeWidth, "Display the architecture when listing images."},
-{ LLDB_OPT_SET_1, false, "uuid", 'u', no_argument, NULL, 0, eArgTypeNone, "Display the UUID when listing images."},
+{ LLDB_OPT_SET_1, false, "uuid", 'u', no_argument, NULL, 0, eArgTypeNone, "Display the UUID when listing images."},
{ LLDB_OPT_SET_1, false, "fullpath", 'f', optional_argument, NULL, 0, eArgTypeWidth, "Display the fullpath to the image object file."},
{ LLDB_OPT_SET_1, false, "directory", 'd', optional_argument, NULL, 0, eArgTypeWidth, "Display the directory with optional width for the image object file."},
{ LLDB_OPT_SET_1, false, "basename", 'b', optional_argument, NULL, 0, eArgTypeWidth, "Display the basename with optional width for the image object file."},
diff --git a/source/Core/DataExtractor.cpp b/source/Core/DataExtractor.cpp
index 66ffe6d..74705bf 100644
--- a/source/Core/DataExtractor.cpp
+++ b/source/Core/DataExtractor.cpp
@@ -1657,7 +1657,7 @@
const uint8_t *uuid_data = PeekData(offset, 16);
if ( uuid_data )
{
- UUID uuid(uuid_data, 16);
+ lldb_private::UUID uuid(uuid_data, 16);
uuid.Dump(s);
}
else
diff --git a/source/Core/Module.cpp b/source/Core/Module.cpp
index ef8e393..8346938 100644
--- a/source/Core/Module.cpp
+++ b/source/Core/Module.cpp
@@ -78,7 +78,7 @@
return ModuleList::GetModuleSP (this);
}
-const UUID&
+const lldb_private::UUID&
Module::GetUUID()
{
Mutex::Locker locker (m_mutex);
diff --git a/source/Core/ModuleList.cpp b/source/Core/ModuleList.cpp
index 7b448d4..093878d 100644
--- a/source/Core/ModuleList.cpp
+++ b/source/Core/ModuleList.cpp
@@ -215,7 +215,7 @@
//--------------------------------------------------------------
ModuleMatches (const FileSpec *file_spec_ptr,
const ArchSpec *arch_ptr,
- const UUID *uuid_ptr,
+ const lldb_private::UUID *uuid_ptr,
const ConstString *object_name) :
m_file_spec_ptr (file_spec_ptr),
m_arch_ptr (arch_ptr),
@@ -260,10 +260,10 @@
//--------------------------------------------------------------
// Member variables.
//--------------------------------------------------------------
- const FileSpec * m_file_spec_ptr;
- const ArchSpec * m_arch_ptr;
- const UUID * m_uuid_ptr;
- const ConstString * m_object_name;
+ const FileSpec * m_file_spec_ptr;
+ const ArchSpec * m_arch_ptr;
+ const lldb_private::UUID * m_uuid_ptr;
+ const ConstString * m_object_name;
};
size_t
@@ -271,7 +271,7 @@
(
const FileSpec *file_spec_ptr,
const ArchSpec *arch_ptr,
- const UUID *uuid_ptr,
+ const lldb_private::UUID *uuid_ptr,
const ConstString *object_name,
ModuleList& matching_module_list
) const
@@ -534,7 +534,7 @@
(
const FileSpec& in_file_spec,
const ArchSpec& arch,
- const UUID *uuid_ptr,
+ const lldb_private::UUID *uuid_ptr,
const ConstString *object_name_ptr,
ModuleList &matching_module_list
)
@@ -549,7 +549,7 @@
(
const FileSpec& in_file_spec,
const ArchSpec& arch,
- const UUID *uuid_ptr,
+ const lldb_private::UUID *uuid_ptr,
const ConstString *object_name_ptr,
off_t object_offset,
ModuleSP &module_sp,
diff --git a/source/Core/UUID.cpp b/source/Core/UUID.cpp
index 0394141..2d17eb6 100644
--- a/source/Core/UUID.cpp
+++ b/source/Core/UUID.cpp
@@ -18,7 +18,7 @@
// Project includes
#include "lldb/Core/Stream.h"
-using namespace lldb_private;
+namespace lldb_private {
UUID::UUID()
{
@@ -175,40 +175,40 @@
return 0;
}
-
-
-bool
-lldb_private::operator == (const UUID &lhs, const UUID &rhs)
-{
- return ::memcmp (lhs.GetBytes(), rhs.GetBytes(), UUID::GetByteSize()) == 0;
}
bool
-lldb_private::operator != (const UUID &lhs, const UUID &rhs)
+lldb_private::operator == (const lldb_private::UUID &lhs, const lldb_private::UUID &rhs)
+{
+ return ::memcmp (lhs.GetBytes(), rhs.GetBytes(), lldb_private::UUID::GetByteSize()) == 0;
+}
+
+bool
+lldb_private::operator != (const lldb_private::UUID &lhs, const lldb_private::UUID &rhs)
{
return ::memcmp (lhs.GetBytes(), rhs.GetBytes(), UUID::GetByteSize()) != 0;
}
bool
-lldb_private::operator < (const UUID &lhs, const UUID &rhs)
+lldb_private::operator < (const lldb_private::UUID &lhs, const lldb_private::UUID &rhs)
{
- return ::memcmp (lhs.GetBytes(), rhs.GetBytes(), UUID::GetByteSize()) < 0;
+ return ::memcmp (lhs.GetBytes(), rhs.GetBytes(), lldb_private::UUID::GetByteSize()) < 0;
}
bool
-lldb_private::operator <= (const UUID &lhs, const UUID &rhs)
+lldb_private::operator <= (const lldb_private::UUID &lhs, const lldb_private::UUID &rhs)
{
- return ::memcmp (lhs.GetBytes(), rhs.GetBytes(), UUID::GetByteSize()) <= 0;
+ return ::memcmp (lhs.GetBytes(), rhs.GetBytes(), lldb_private::UUID::GetByteSize()) <= 0;
}
bool
-lldb_private::operator > (const UUID &lhs, const UUID &rhs)
+lldb_private::operator > (const lldb_private::UUID &lhs, const lldb_private::UUID &rhs)
{
- return ::memcmp (lhs.GetBytes(), rhs.GetBytes(), UUID::GetByteSize()) > 0;
+ return ::memcmp (lhs.GetBytes(), rhs.GetBytes(), lldb_private::UUID::GetByteSize()) > 0;
}
bool
-lldb_private::operator >= (const UUID &lhs, const UUID &rhs)
+lldb_private::operator >= (const lldb_private::UUID &lhs, const lldb_private::UUID &rhs)
{
- return ::memcmp (lhs.GetBytes(), rhs.GetBytes(), UUID::GetByteSize()) >= 0;
+ return ::memcmp (lhs.GetBytes(), rhs.GetBytes(), lldb_private::UUID::GetByteSize()) >= 0;
}
diff --git a/source/Host/common/Symbols.cpp b/source/Host/common/Symbols.cpp
index 51345bf..6746d53 100644
--- a/source/Host/common/Symbols.cpp
+++ b/source/Host/common/Symbols.cpp
@@ -15,14 +15,14 @@
#if !defined (__APPLE__)
FileSpec
-Symbols::LocateExecutableObjectFile (const FileSpec *exec_fspec, const ArchSpec* arch, const UUID *uuid)
+Symbols::LocateExecutableObjectFile (const FileSpec *exec_fspec, const ArchSpec* arch, const lldb_private::UUID *uuid)
{
// FIXME
return FileSpec();
}
FileSpec
-Symbols::LocateExecutableSymbolFile (const FileSpec *exec_fspec, const ArchSpec* arch, const UUID *uuid)
+Symbols::LocateExecutableSymbolFile (const FileSpec *exec_fspec, const ArchSpec* arch, const lldb_private::UUID *uuid)
{
// FIXME
return FileSpec();
diff --git a/source/Host/macosx/Symbols.cpp b/source/Host/macosx/Symbols.cpp
index 87b1dbb..e44d289 100644
--- a/source/Host/macosx/Symbols.cpp
+++ b/source/Host/macosx/Symbols.cpp
@@ -46,7 +46,7 @@
(
const FileSpec &file_spec,
const ArchSpec *arch,
- const UUID *uuid, // the UUID we are looking for
+ const lldb_private::UUID *uuid, // the UUID we are looking for
off_t file_offset,
DataExtractor& data,
uint32_t data_offset,
@@ -112,7 +112,7 @@
uint32_t cmd_size = data.GetU32(&data_offset);
if (cmd == LoadCommandUUID)
{
- UUID file_uuid (data.GetData(&data_offset, 16), 16);
+ lldb_private::UUID file_uuid (data.GetData(&data_offset, 16), 16);
return file_uuid == *uuid;
}
data_offset = cmd_offset + cmd_size;
@@ -125,7 +125,7 @@
(
const FileSpec &file_spec,
const ArchSpec *arch,
- const UUID *uuid,
+ const lldb_private::UUID *uuid,
off_t file_offset,
DataExtractor& data,
uint32_t data_offset,
@@ -188,7 +188,7 @@
(
const FileSpec &file_spec,
const ArchSpec *arch,
- const UUID *uuid
+ const lldb_private::UUID *uuid
)
{
DataExtractor data;
@@ -227,7 +227,7 @@
LocateDSYMMachFileInDSYMBundle
(
const FileSpec& dsym_bundle_fspec,
- const UUID *uuid,
+ const lldb_private::UUID *uuid,
const ArchSpec *arch)
{
char path[PATH_MAX];
@@ -273,7 +273,7 @@
(
const FileSpec *exec_fspec, // An executable path that may or may not be correct if UUID is specified
const ArchSpec* arch, // Limit the search to files with this architecture if non-NULL
- const UUID *uuid, // Match the UUID value if non-NULL,
+ const lldb_private::UUID *uuid, // Match the UUID value if non-NULL,
FileSpec *out_exec_fspec, // If non-NULL, try and find the executable
FileSpec *out_dsym_fspec // If non-NULL try and find the debug symbol file
)
@@ -369,7 +369,7 @@
}
static bool
-LocateDSYMInVincinityOfExecutable (const FileSpec *exec_fspec, const ArchSpec* arch, const UUID *uuid, FileSpec &dsym_fspec)
+LocateDSYMInVincinityOfExecutable (const FileSpec *exec_fspec, const ArchSpec* arch, const lldb_private::UUID *uuid, FileSpec &dsym_fspec)
{
if (exec_fspec)
{
@@ -429,7 +429,7 @@
}
FileSpec
-Symbols::LocateExecutableObjectFile (const FileSpec *exec_fspec, const ArchSpec* arch, const UUID *uuid)
+Symbols::LocateExecutableObjectFile (const FileSpec *exec_fspec, const ArchSpec* arch, const lldb_private::UUID *uuid)
{
Timer scoped_timer (__PRETTY_FUNCTION__,
"LocateExecutableObjectFile (file = %s, arch = %s, uuid = %p)",
@@ -446,7 +446,7 @@
}
FileSpec
-Symbols::LocateExecutableSymbolFile (const FileSpec *exec_fspec, const ArchSpec* arch, const UUID *uuid)
+Symbols::LocateExecutableSymbolFile (const FileSpec *exec_fspec, const ArchSpec* arch, const lldb_private::UUID *uuid)
{
Timer scoped_timer (__PRETTY_FUNCTION__,
"LocateExecutableSymbolFile (file = %s, arch = %s, uuid = %p)",
diff --git a/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index 6c0c7b0..d650ee6 100644
--- a/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -42,7 +42,7 @@
DynamicLoaderMacOSXDYLD::DYLDImageInfo *
-DynamicLoaderMacOSXDYLD::GetImageInfo (const FileSpec &file_spec, const UUID &uuid)
+DynamicLoaderMacOSXDYLD::GetImageInfo (const FileSpec &file_spec, const lldb_private::UUID &uuid)
{
DYLDImageInfo::collection::iterator pos, end = m_dyld_image_infos.end();
for (pos = m_dyld_image_infos.begin(); pos != end; ++pos)
diff --git a/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index f58c779..e02f49c 100644
--- a/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -207,7 +207,7 @@
}
bool
-ObjectFileELF::GetUUID(UUID* uuid)
+ObjectFileELF::GetUUID(lldb_private::UUID* uuid)
{
// FIXME: Return MD5 sum here. See comment in ObjectFile.h.
return false;
diff --git a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 444f95b..973a18a 100644
--- a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -1362,7 +1362,7 @@
bool
-ObjectFileMachO::GetUUID (UUID* uuid)
+ObjectFileMachO::GetUUID (lldb_private::UUID* uuid)
{
lldb_private::Mutex::Locker locker(m_mutex);
struct uuid_command load_cmd;
diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index ecaaab1..5d44641 100644
--- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -168,7 +168,7 @@
ModuleList::GetSharedModule (oso_file_spec,
m_obj_file->GetModule()->GetArchitecture(),
- NULL, // UUID pointer
+ NULL, // lldb_private::UUID pointer
NULL, // object name
0, // object offset
comp_unit_info->oso_module_sp,
diff --git a/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp b/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
index 14a6219..516093b 100644
--- a/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
+++ b/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
@@ -43,7 +43,7 @@
if (module && ofile)
{
// Make sure the UUIDs match
- UUID dsym_uuid;
+ lldb_private::UUID dsym_uuid;
if (ofile->GetUUID(&dsym_uuid))
return dsym_uuid == module->GetUUID();
}
diff --git a/source/Target/Target.cpp b/source/Target/Target.cpp
index 96dd11d..7a39958 100644
--- a/source/Target/Target.cpp
+++ b/source/Target/Target.cpp
@@ -700,7 +700,7 @@
(
const FileSpec& file_spec,
const ArchSpec& arch,
- const UUID *uuid_ptr,
+ const lldb_private::UUID *uuid_ptr,
const ConstString *object_name,
off_t object_offset,
Error *error_ptr
diff --git a/source/Target/TargetList.cpp b/source/Target/TargetList.cpp
index 442b366..cbbb12f 100644
--- a/source/Target/TargetList.cpp
+++ b/source/Target/TargetList.cpp
@@ -49,7 +49,7 @@
Debugger &debugger,
const FileSpec& file,
const ArchSpec& arch,
- const UUID *uuid_ptr,
+ const lldb_private::UUID *uuid_ptr,
bool get_dependent_files,
TargetSP &target_sp
)