[Lldb-commits] [lldb] [lldb] Print a warning on checksum mismatch (PR #71459)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 7 07:23:04 PST 2023


================
@@ -300,6 +300,16 @@ size_t SourceManager::DisplaySourceLinesWithLineNumbersUsingLastFile(
         break;
       }
     }
+
+    Checksum checksum = last_file_sp->GetFileSpec().GetChecksum();
+    if (checksum && checksum != last_file_sp->GetChecksum()) {
+      llvm::call_once(last_file_sp->GetChecksumOnceFlag(), [&]() {
+        s->Printf("warning: source file checksum mismatch between the debug "
----------------
adrian-prantl wrote:

I agree. Wherever we hardcode the string "error:" or "warning:" we should probably use a more high-level API.

https://github.com/llvm/llvm-project/pull/71459


More information about the lldb-commits mailing list