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/SBValue.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/SBValue.cpp')
| -rw-r--r-- | lldb/source/API/SBValue.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index 780a61f9578..7f0cfc2c93d 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -37,23 +37,19 @@ using namespace lldb_private; SBValue::SBValue () : m_opaque_sp () { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE); - - if (log) - log->Printf ("SBValue::SBValue () ==> this = %p", this); } SBValue::SBValue (const lldb::ValueObjectSP &value_sp) : m_opaque_sp (value_sp) { - 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 ("SBValue::SBValue (const lldb::ValueObjectSP &value_sp) value_sp.get() = %p ==> this = %p (%s)", - value_sp.get(), this, sstr.GetData()); + log->Printf ("SBValue::SBValue (value_sp=%p) => this.sp = %p (%s)", + value_sp.get(), m_opaque_sp.get(), sstr.GetData()); } } @@ -83,19 +79,21 @@ SBValue::GetName() { Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); - if (log) - log->Printf ("SBValue::GetName ()"); + //if (log) + // log->Printf ("SBValue::GetName ()"); if (IsValid()) { if (log) - log->Printf ("SBValue::GetName ==> %s", m_opaque_sp->GetName().AsCString()); + log->Printf ("SBValue::GetName (this.sp=%p) => '%s'", m_opaque_sp.get(), + m_opaque_sp->GetName().AsCString()); + return m_opaque_sp->GetName().AsCString(); } else { if (log) - log->Printf ("SBValue::GetName ==> NULL"); + log->Printf ("SBValue::GetName (this.sp=%p) ==> NULL", m_opaque_sp.get()); return NULL; } } |

