diff options
author | Caroline Tice <ctice@apple.com> | 2010-10-26 23:49:36 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2010-10-26 23:49:36 +0000 |
commit | 750cd1755dd32f47cb5e00f23ef9b2feb2cde450 (patch) | |
tree | 181307a37ae79f4d1e4f1ec5a46e61a469943d7a /lldb/source/API/SBFunction.cpp | |
parent | 19ead876d257159c2019cae80456e158be3accef (diff) | |
download | bcm5719-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/SBFunction.cpp')
-rw-r--r-- | lldb/source/API/SBFunction.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp index 459ead23650..2efd37c31ba 100644 --- a/lldb/source/API/SBFunction.cpp +++ b/lldb/source/API/SBFunction.cpp @@ -25,23 +25,20 @@ using namespace lldb_private; SBFunction::SBFunction () : m_opaque_ptr (NULL) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE); - - if (log) - log->Printf ("SBFunction::SBFunction () ==> this = %p", this); } SBFunction::SBFunction (lldb_private::Function *lldb_object_ptr) : m_opaque_ptr (lldb_object_ptr) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE); + Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); if (log) { SBStream sstr; GetDescription (sstr); - log->Printf ("SBFunction::SBFunction (lldb_Private::Function *lldb_object_ptr) lldb_object_ptr = %p " - " ==> this = %p (%s)", lldb_object_ptr, this, sstr.GetData()); + log->Printf ("SBFunction::SBFunction (lldb_object_ptr=%p) => this.obj = %p ('%s')", lldb_object_ptr, + m_opaque_ptr, sstr.GetData()); + } } @@ -61,18 +58,19 @@ SBFunction::GetName() const { Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); - if (log) - log->Printf ("SBFunction::GetName ()"); + //if (log) + // log->Printf ("SBFunction::GetName ()"); if (m_opaque_ptr) { if (log) - log->Printf ("SBFunction::GetName ==> %s", m_opaque_ptr->GetMangled().GetName().AsCString()); + log->Printf ("SBFunction::GetName (this.obj=%p) => '%s'", m_opaque_ptr, + m_opaque_ptr->GetMangled().GetName().AsCString()); return m_opaque_ptr->GetMangled().GetName().AsCString(); } if (log) - log->Printf ("SBFunction::GetName ==> NULL"); + log->Printf ("SBFunction::GetName (this.obj=%p) => NULL", m_opaque_ptr); return NULL; } @@ -136,4 +134,9 @@ SBFunction::GetInstructions (SBTarget target) return sb_instructions; } +lldb_private::Function * +SBFunction::get () +{ + return m_opaque_ptr; +} |