From c9f7939121b8acf47ca940e9cae29cfc81386e55 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Tue, 1 May 2018 00:05:54 +0000 Subject: [PATCH] Add logging when ArchSpec::SetArchitecture is given a cputype and cpusubtype that don't map to any known core definition. llvm-svn: 331236 --- lldb/source/Utility/ArchSpec.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lldb/source/Utility/ArchSpec.cpp b/lldb/source/Utility/ArchSpec.cpp index 8b2e693..72e30cf 100644 --- a/lldb/source/Utility/ArchSpec.cpp +++ b/lldb/source/Utility/ArchSpec.cpp @@ -9,6 +9,7 @@ #include "lldb/Utility/ArchSpec.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/NameMatches.h" #include "lldb/Utility/Stream.h" // for Stream #include "lldb/Utility/StringList.h" @@ -978,6 +979,10 @@ bool ArchSpec::SetArchitecture(ArchitectureType arch_type, uint32_t cpu, if (m_triple.getArch() == llvm::Triple::UnknownArch) m_triple.setArch(core_def->machine); } + } else { + Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET | LIBLLDB_LOG_TARGET | LIBLLDB_LOG_PLATFORM)); + if (log) + log->Printf("Unable to find a core definition for cpu 0x%" PRIx32 " sub %" PRId32, cpu, sub); } } CoreUpdated(update_triple); -- 2.7.4