[Lldb-commits] [lldb] 8e21d7b - [lldb/Reproducer] Include deserialized value in log statement

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 28 13:24:11 PST 2020


Author: Jonas Devlieghere
Date: 2020-01-28T13:24:01-08:00
New Revision: 8e21d7b9249e2e35f12dbbaa18287ce8435dd855

URL: https://github.com/llvm/llvm-project/commit/8e21d7b9249e2e35f12dbbaa18287ce8435dd855
DIFF: https://github.com/llvm/llvm-project/commit/8e21d7b9249e2e35f12dbbaa18287ce8435dd855.diff

LOG: [lldb/Reproducer] Include deserialized value in log statement

Extend the replay log statement to include the deserialized value.

Added: 
    

Modified: 
    lldb/include/lldb/Utility/ReproducerInstrumentation.h

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Utility/ReproducerInstrumentation.h b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
index 5b826bb0b1bf..eed3c1bfdb95 100644
--- a/lldb/include/lldb/Utility/ReproducerInstrumentation.h
+++ b/lldb/include/lldb/Utility/ReproducerInstrumentation.h
@@ -280,10 +280,12 @@ class Deserializer {
 
   /// Deserialize and interpret value as T.
   template <typename T> T Deserialize() {
+    T t = Read<T>(typename serializer_tag<T>::type());
 #ifdef LLDB_REPRO_INSTR_TRACE
-    llvm::errs() << "Deserializing with " << LLVM_PRETTY_FUNCTION << "\n";
+    llvm::errs() << "Deserializing with " << LLVM_PRETTY_FUNCTION << " -> "
+                 << stringify_args(t) << "\n";
 #endif
-    return Read<T>(typename serializer_tag<T>::type());
+    return t;
   }
 
   /// Store the returned value in the index-to-object mapping.


        


More information about the lldb-commits mailing list