Add logging to SBCompileUnit::GetNumLineEntries.

llvm-svn: 355435
This commit is contained in:
Jason Molenda
2019-03-05 19:43:56 +00:00
parent 88e15140ee
commit 14c1e08ff5

View File

@@ -43,10 +43,15 @@ SBFileSpec SBCompileUnit::GetFileSpec() const {
}
uint32_t SBCompileUnit::GetNumLineEntries() const {
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) {
log->Printf("SBCompileUnit(%p)::GetNumLineEntries() => %d",
static_cast<void *>(m_opaque_ptr),
(int)line_table->GetSize());
return line_table->GetSize();
}
}
return 0;
}