summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBModule.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-10-30 04:51:46 +0000
committerGreg Clayton <gclayton@apple.com>2010-10-30 04:51:46 +0000
commit4838131baf832b78fc9d8df3d38b11ef56ce67d0 (patch)
treef1456c8ceb42bf81a72fc59727d7e8a87969a0ea /lldb/source/API/SBModule.cpp
parent549a31cd3475ba74244f70cc29b8edb6c597e3ce (diff)
downloadbcm5719-llvm-4838131baf832b78fc9d8df3d38b11ef56ce67d0.tar.gz
bcm5719-llvm-4838131baf832b78fc9d8df3d38b11ef56ce67d0.zip
Improved API logging.
llvm-svn: 117772
Diffstat (limited to 'lldb/source/API/SBModule.cpp')
-rw-r--r--lldb/source/API/SBModule.cpp32
1 files changed, 12 insertions, 20 deletions
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index f5dbcf9905a..55e691bb583 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -28,10 +28,6 @@ SBModule::SBModule () :
SBModule::SBModule (const lldb::ModuleSP& module_sp) :
m_opaque_sp (module_sp)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
-
- if (log)
- log->Printf ("SBModule::SBModule (module_sp=%p) => this.sp = %p", module_sp.get(), m_opaque_sp.get());
}
SBModule::~SBModule ()
@@ -49,9 +45,6 @@ SBModule::GetFileSpec () const
{
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
- //if (log)
- // log->Printf ("SBModule::GetFileSpec ()");
-
SBFileSpec file_spec;
if (m_opaque_sp)
file_spec.SetFileSpec(m_opaque_sp->GetFileSpec());
@@ -60,7 +53,7 @@ SBModule::GetFileSpec () const
{
SBStream sstr;
file_spec.GetDescription (sstr);
- log->Printf ("SBModule::GetFileSpec (this.sp=%p) => SBFileSpec : this.ap = %p, 's'", m_opaque_sp.get(),
+ log->Printf ("SBModule(%p)::GetFileSpec () => SBFileSpec(%p): %s", m_opaque_sp.get(),
file_spec.get(), sstr.GetData());
}
@@ -72,23 +65,22 @@ SBModule::GetUUIDBytes () const
{
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
- //if (log)
- // log->Printf ("SBModule::GetUUIDBytes ()");
-
+ const uint8_t *uuid_bytes = NULL;
if (m_opaque_sp)
+ uuid_bytes = (const uint8_t *)m_opaque_sp->GetUUID().GetBytes();
+
+ if (log)
{
- if (log)
+ if (uuid_bytes)
{
- StreamString sstr;
- m_opaque_sp->GetUUID().Dump (&sstr);
- log->Printf ("SBModule::GetUUIDBytes (this.sp=%p) => '%s'", m_opaque_sp.get(), sstr.GetData());
+ StreamString s;
+ m_opaque_sp->GetUUID().Dump (&s);
+ log->Printf ("SBModule(%p)::GetUUIDBytes () => %s", m_opaque_sp.get(), s.GetData());
}
- return (const uint8_t *)m_opaque_sp->GetUUID().GetBytes();
+ else
+ log->Printf ("SBModule(%p)::GetUUIDBytes () => NULL", m_opaque_sp.get());
}
-
- if (log)
- log->Printf ("SBModule::GetUUIDBytes (this.sp=%p) => NULL", m_opaque_sp.get());
- return NULL;
+ return uuid_bytes;
}
OpenPOWER on IntegriCloud