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/SBCommandReturnObject.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/SBCommandReturnObject.cpp')
-rw-r--r-- | lldb/source/API/SBCommandReturnObject.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lldb/source/API/SBCommandReturnObject.cpp b/lldb/source/API/SBCommandReturnObject.cpp index 32600b882ce..d4091ce49bf 100644 --- a/lldb/source/API/SBCommandReturnObject.cpp +++ b/lldb/source/API/SBCommandReturnObject.cpp @@ -19,10 +19,10 @@ using namespace lldb_private; SBCommandReturnObject::SBCommandReturnObject () : m_opaque_ap (new CommandReturnObject ()) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE); + Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); if (log) - log->Printf ("SBCommandReturnObject::SBCommandReturnObject () ==> this = %p", this); + log->Printf ("SBCommandReturnObject::SBCommandReturnObject () => this.ap = %p", m_opaque_ap.get()); } SBCommandReturnObject::~SBCommandReturnObject () @@ -42,18 +42,20 @@ SBCommandReturnObject::GetOutput () { Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); - if (log) - log->Printf ("SBCommandReturnObject::GetOutput ()"); + //if (log) + // log->Printf ("SBCommandReturnObject::GetOutput ()"); if (m_opaque_ap.get()) { if (log) - log->Printf ("SBCommandReturnObject::GetOutput ==> %s", m_opaque_ap->GetOutputStream().GetData()); + log->Printf ("SBCommandReturnObject::GetOutput (this.ap=%p) => '%s'", m_opaque_ap.get(), + m_opaque_ap->GetOutputStream().GetData()); + return m_opaque_ap->GetOutputStream().GetData(); } if (log) - log->Printf ("SBCommandReturnObject::GetOutput ==> NULL"); + log->Printf ("SBCommandReturnObject::GetOutput (this.ap=%p) => 'NULL'", m_opaque_ap.get()); return NULL; } @@ -63,18 +65,20 @@ SBCommandReturnObject::GetError () { Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); - if (log) - log->Printf ("SBCommandReturnObject::GetError ()"); + //if (log) + // log->Printf ("SBCommandReturnObject::GetError ()"); if (m_opaque_ap.get()) { if (log) - log->Printf ("SBCommandReturnObject::GetError ==> %s", m_opaque_ap->GetErrorStream().GetData()); + log->Printf ("SBCommandReturnObject::GetError (this.ap=%p) => '%s'", m_opaque_ap.get(), + m_opaque_ap->GetErrorStream().GetData()); + return m_opaque_ap->GetErrorStream().GetData(); } if (log) - log->Printf ("SBCommandReturnObject::GetError ==> NULL"); + log->Printf ("SBCommandReturnObject::GetError (this.ap=%p) => 'NULL'", m_opaque_ap.get()); return NULL; } |