summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBModule.cpp
diff options
context:
space:
mode:
authorCaroline Tice <ctice@apple.com>2010-10-26 23:49:36 +0000
committerCaroline Tice <ctice@apple.com>2010-10-26 23:49:36 +0000
commit750cd1755dd32f47cb5e00f23ef9b2feb2cde450 (patch)
tree181307a37ae79f4d1e4f1ec5a46e61a469943d7a /lldb/source/API/SBModule.cpp
parent19ead876d257159c2019cae80456e158be3accef (diff)
downloadbcm5719-llvm-750cd1755dd32f47cb5e00f23ef9b2feb2cde450.tar.gz
bcm5719-llvm-750cd1755dd32f47cb5e00f23ef9b2feb2cde450.zip
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... llvm-svn: 117417
Diffstat (limited to 'lldb/source/API/SBModule.cpp')
-rw-r--r--lldb/source/API/SBModule.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index 35a88b61ce8..f5dbcf9905a 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -23,20 +23,15 @@ using namespace lldb_private;
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 @@ SBModule::GetFileSpec () const
{
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 @@ SBModule::GetFileSpec () const
{
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 @@ SBModule::GetUUIDBytes () const
{
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 @@ SBModule::GetUUIDBytes () const
{
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;
}
OpenPOWER on IntegriCloud