[lldb/Reproducer] Include deserialized value in log statement
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 28 Jan 2020 21:23:36 +0000 (13:23 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 28 Jan 2020 21:24:01 +0000 (13:24 -0800)
Extend the replay log statement to include the deserialized value.

lldb/include/lldb/Utility/ReproducerInstrumentation.h

index 5b826bb..eed3c1b 100644 (file)
@@ -280,10 +280,12 @@ public:
 
   /// 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.