[Lldb-commits] [lldb] r355473 - Re-commit logging for SBCompileUnit::GetNumLineEntries.
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 5 18:32:46 PST 2019
Author: jmolenda
Date: Tue Mar 5 18:32:45 2019
New Revision: 355473
URL: http://llvm.org/viewvc/llvm-project?rev=355473&view=rev
Log:
Re-commit logging for SBCompileUnit::GetNumLineEntries.
Modified:
lldb/trunk/source/API/SBCompileUnit.cpp
Modified: lldb/trunk/source/API/SBCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCompileUnit.cpp?rev=355473&r1=355472&r2=355473&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCompileUnit.cpp (original)
+++ lldb/trunk/source/API/SBCompileUnit.cpp Tue Mar 5 18:32:45 2019
@@ -57,10 +57,16 @@ SBFileSpec SBCompileUnit::GetFileSpec()
uint32_t SBCompileUnit::GetNumLineEntries() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBCompileUnit, GetNumLineEntries);
+ Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
if (m_opaque_ptr) {
LineTable *line_table = m_opaque_ptr->GetLineTable();
- if (line_table)
+ if (line_table) {
+ if (log)
+ log->Printf("SBCompileUnit(%p)::GetNumLineEntries() => %d",
+ static_cast<void *>(m_opaque_ptr),
+ (int)line_table->GetSize());
return line_table->GetSize();
+ }
}
return 0;
}
More information about the lldb-commits
mailing list