[Lldb-commits] [lldb] r331236 - Add logging when ArchSpec::SetArchitecture is given a cputype and
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 30 17:05:54 PDT 2018
Author: jmolenda
Date: Mon Apr 30 17:05:54 2018
New Revision: 331236
URL: http://llvm.org/viewvc/llvm-project?rev=331236&view=rev
Log:
Add logging when ArchSpec::SetArchitecture is given a cputype and
cpusubtype that don't map to any known core definition.
<rdar://problem/39779398>
Modified:
lldb/trunk/source/Utility/ArchSpec.cpp
Modified: lldb/trunk/source/Utility/ArchSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ArchSpec.cpp?rev=331236&r1=331235&r2=331236&view=diff
==============================================================================
--- lldb/trunk/source/Utility/ArchSpec.cpp (original)
+++ lldb/trunk/source/Utility/ArchSpec.cpp Mon Apr 30 17:05:54 2018
@@ -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(Architect
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);
More information about the lldb-commits
mailing list