Improved API logging.

llvm-svn: 117772
This commit is contained in:
Greg Clayton
2010-10-30 04:51:46 +00:00
parent 549a31cd34
commit 4838131baf
23 changed files with 574 additions and 596 deletions

View File

@@ -108,29 +108,27 @@ SBFileSpec::ResolvePath (const char *src_path, char *dst_path, size_t dst_len)
const char *
SBFileSpec::GetFilename() const
{
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
const char *s = NULL;
if (m_opaque_ap.get())
{
if (log)
log->Printf ("SBFileSpec(%p)::GetFilename () => %s", m_opaque_ap.get(),
m_opaque_ap->GetFilename().AsCString());
return m_opaque_ap->GetFilename().AsCString();
}
s = m_opaque_ap->GetFilename().AsCString();
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
if (log)
log->Printf ("SBFileSpec(%p)::GetFilename () => NULL", m_opaque_ap.get());
log->Printf ("SBFileSpec(%p)::GetFilename () => \"%s\"", m_opaque_ap.get(), s ? s : "");
return NULL;
return s;
}
const char *
SBFileSpec::GetDirectory() const
{
const char *s = NULL;
if (m_opaque_ap.get())
return m_opaque_ap->GetDirectory().AsCString();
return NULL;
s = m_opaque_ap->GetDirectory().AsCString();
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
if (log)
log->Printf ("SBFileSpec(%p)::GetDirectory () => \"%s\"", m_opaque_ap.get(), s ? s : "");
return s;
}
uint32_t