[Lldb-commits] [lldb] 33fa672 - [lldb/Reproducers] Add logging to the string template specialization

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 29 09:16:49 PST 2020


Author: Jonas Devlieghere
Date: 2020-01-29T09:16:43-08:00
New Revision: 33fa6727b7ce1c3aad6ef4bb24dff2ce3e3b2c7a

URL: https://github.com/llvm/llvm-project/commit/33fa6727b7ce1c3aad6ef4bb24dff2ce3e3b2c7a
DIFF: https://github.com/llvm/llvm-project/commit/33fa6727b7ce1c3aad6ef4bb24dff2ce3e3b2c7a.diff

LOG: [lldb/Reproducers] Add logging to the string template specialization

Only the templated function had logging for deserialization. The string
deserializer is implemented as a specialization and now prints to the
log as well.

Added: 
    

Modified: 
    lldb/source/Utility/ReproducerInstrumentation.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Utility/ReproducerInstrumentation.cpp b/lldb/source/Utility/ReproducerInstrumentation.cpp
index 10e4e3a14e60..46def9f59d7b 100644
--- a/lldb/source/Utility/ReproducerInstrumentation.cpp
+++ b/lldb/source/Utility/ReproducerInstrumentation.cpp
@@ -32,6 +32,10 @@ template <> const char *Deserializer::Deserialize<const char *>() {
     return nullptr;
   const char *str = m_buffer.data();
   m_buffer = m_buffer.drop_front(pos + 1);
+#ifdef LLDB_REPRO_INSTR_TRACE
+    llvm::errs() << "Deserializing with " << LLVM_PRETTY_FUNCTION << " -> \""
+                 << str << "\"\n";
+#endif
   return str;
 }
 


        


More information about the lldb-commits mailing list