rdar://problem/11324515
'add-dsym' (aka 'target symbols add') should display error messages when dsym file is not found
or the dsym uuid does not match any existing modules. Add TestAddDsymCommand.py test file.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162332 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Host/macosx/Symbols.cpp b/source/Host/macosx/Symbols.cpp
index debd85d..9274dec 100644
--- a/source/Host/macosx/Symbols.cpp
+++ b/source/Host/macosx/Symbols.cpp
@@ -22,6 +22,7 @@
#include "lldb/Core/DataBuffer.h"
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/Module.h"
+#include "lldb/Core/StreamString.h"
#include "lldb/Core/Timer.h"
#include "lldb/Core/UUID.h"
#include "lldb/Host/Endian.h"
@@ -126,9 +127,12 @@
path_buf[0] = '\0';
const char *path = file_spec.GetPath(path_buf, PATH_MAX) ? path_buf
: file_spec.GetFilename().AsCString();
+ StreamString ss_m_uuid, ss_o_uuid;
+ uuid->Dump(&ss_m_uuid);
+ file_uuid.Dump(&ss_o_uuid);
Host::SystemLog (Host::eSystemLogWarning,
- "warning: UUID mismatch detected between binary and:\n\t'%s'\n",
- path);
+ "warning: UUID mismatch detected between binary (%s) and:\n\t'%s' (%s)\n",
+ ss_m_uuid.GetData(), path, ss_o_uuid.GetData());
return false;
}
data_offset = cmd_offset + cmd_size;