Clean up the API logging code:
- Try to reduce logging to one line per function call instead of tw
- Put all arguments & their values into log for calls
- Add 'this' parameter information to function call logging, making it show the appropriate
internal pointer (this.obj, this.sp, this.ap...)
- Clean up some return values
- Remove logging of constructors that construct empty objects
- Change '==>' to '=>' for showing result values...
- Fix various minor bugs
- Add some protected 'get' functions to help getting the internal pointers for the 'this' arguments...
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117417 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index 35a88b6..f5dbcf9 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -23,20 +23,15 @@
SBModule::SBModule () :
m_opaque_sp ()
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE);
-
- if (log)
- log->Printf ("SBModule::SBModule () ==> this = %p", this);
}
SBModule::SBModule (const lldb::ModuleSP& module_sp) :
m_opaque_sp (module_sp)
{
- Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE);
+ Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
if (log)
- log->Printf ("SBModule::SBModule (const lldb::ModuleSP &module_sp) module_sp.get() = %p ==> this = %p",
- module_sp.get(), this);
+ log->Printf ("SBModule::SBModule (module_sp=%p) => this.sp = %p", module_sp.get(), m_opaque_sp.get());
}
SBModule::~SBModule ()
@@ -54,8 +49,8 @@
{
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
- if (log)
- log->Printf ("SBModule::GetFileSpec ()");
+ //if (log)
+ // log->Printf ("SBModule::GetFileSpec ()");
SBFileSpec file_spec;
if (m_opaque_sp)
@@ -65,7 +60,8 @@
{
SBStream sstr;
file_spec.GetDescription (sstr);
- log->Printf ("SBModule::GetFileSpec ==> SBFileSpec (this = %p, 's')", &file_spec, sstr.GetData());
+ log->Printf ("SBModule::GetFileSpec (this.sp=%p) => SBFileSpec : this.ap = %p, 's'", m_opaque_sp.get(),
+ file_spec.get(), sstr.GetData());
}
return file_spec;
@@ -76,8 +72,8 @@
{
Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
- if (log)
- log->Printf ("SBModule::GetUUIDBytes ()");
+ //if (log)
+ // log->Printf ("SBModule::GetUUIDBytes ()");
if (m_opaque_sp)
{
@@ -85,13 +81,13 @@
{
StreamString sstr;
m_opaque_sp->GetUUID().Dump (&sstr);
- log->Printf ("SBModule::GetUUIDBytes ==> '%s'", sstr.GetData());
+ log->Printf ("SBModule::GetUUIDBytes (this.sp=%p) => '%s'", m_opaque_sp.get(), sstr.GetData());
}
return (const uint8_t *)m_opaque_sp->GetUUID().GetBytes();
}
if (log)
- log->Printf ("SBModule::GetUUIDBytes ==> NULL");
+ log->Printf ("SBModule::GetUUIDBytes (this.sp=%p) => NULL", m_opaque_sp.get());
return NULL;
}