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/SBCommandInterpreter.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/SBCommandInterpreter.cpp')
-rw-r--r-- | lldb/source/API/SBCommandInterpreter.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp index 38f41462b08..f6a95f9ac91 100644 --- a/lldb/source/API/SBCommandInterpreter.cpp +++ b/lldb/source/API/SBCommandInterpreter.cpp @@ -33,11 +33,11 @@ using namespace lldb_private; SBCommandInterpreter::SBCommandInterpreter (CommandInterpreter *interpreter) : m_opaque_ptr (interpreter) { - Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE); + Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); if (log) - log->Printf ("SBCommandInterpreter::SBCommandInterpreter (CommandInterpreter *interpreter) interpreter = %p" - " ==> this = %p", interpreter, this); + log->Printf ("SBCommandInterpreter::SBCommandInterpreter (interpreter = %p)" + " => this.obj = %p", interpreter, m_opaque_ptr); } SBCommandInterpreter::~SBCommandInterpreter () @@ -73,8 +73,8 @@ SBCommandInterpreter::HandleCommand (const char *command_line, SBCommandReturnOb Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); if (log) - log->Printf ("SBCommandInterpreter::HandleCommand ('%s', result, %s)", command_line, - (add_to_history ? "true" : "false")); + log->Printf("SBCommandInterpreter::HandleCommand (this.obj=%p, command_line='%s', result=%p, " + "add_to_history='%s')", m_opaque_ptr, command_line, &result, (add_to_history ? "true" : "false")); result.Clear(); if (m_opaque_ptr) @@ -91,7 +91,8 @@ SBCommandInterpreter::HandleCommand (const char *command_line, SBCommandReturnOb { SBStream sstr; result.GetDescription (sstr); - log->Printf ("SBCommandInterpreter::HandleCommand ==> %s", sstr.GetData()); + log->Printf ("SBCommandInterpreter::HandleCommand (...'%s'...) => SBCommandReturnObject: '%s'", + command_line, sstr.GetData()); } return result.GetStatus(); @@ -231,13 +232,14 @@ SBCommandInterpreter::GetBroadcaster () { Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); - if (log) - log->Printf ("SBCommandInterpreter::GetBroadcaster ()"); + //if (log) + // log->Printf ("SBCommandInterpreter::GetBroadcaster ()"); SBBroadcaster broadcaster (m_opaque_ptr, false); if (log) - log->Printf ("SBCommandInterpreter::GetBroadcaster ==> %p", m_opaque_ptr); + log->Printf ("SBCommandInterpreter::GetBroadcaster (this.obj=%p) => SBBroadcaster (this.m_opaque_ptr=%p)", + m_opaque_ptr, broadcaster.get()); return broadcaster; } |