[Lldb-commits] [lldb] r293858 - Add logging to SBThread::GetInfoItemByPathAsString to
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 1 19:02:52 PST 2017
Author: jmolenda
Date: Wed Feb 1 21:02:51 2017
New Revision: 293858
URL: http://llvm.org/viewvc/llvm-project?rev=293858&view=rev
Log:
Add logging to SBThread::GetInfoItemByPathAsString to
print the path being requested.
Change the GetInfoItemByPathAsString docuemtnation in
the .i file to use docstring instead of autodoc so
the function signature is included in the python
help.
<rdar://problem/29999567>
Modified:
lldb/trunk/scripts/interface/SBThread.i
lldb/trunk/source/API/SBThread.cpp
Modified: lldb/trunk/scripts/interface/SBThread.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBThread.i?rev=293858&r1=293857&r2=293858&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBThread.i (original)
+++ lldb/trunk/scripts/interface/SBThread.i Wed Feb 1 21:02:51 2017
@@ -182,12 +182,14 @@ public:
lldb::queue_id_t
GetQueueID() const;
- %feature("autodoc", "
- Takes a path string and a SBStream reference as parameters, returns a bool.
- Collects the thread's 'info' dictionary from the remote system, uses the path
- argument to descend into the dictionary to an item of interest, and prints
- it into the SBStream in a natural format. Return bool is to indicate if
- anything was printed into the stream (true) or not (false).
+ %feature("docstring", "
+ //--------------------------------------------------------------------------
+ /// Takes a path string and a SBStream reference as parameters, returns a bool.
+ /// Collects the thread's 'info' dictionary from the remote system, uses the path
+ /// argument to descend into the dictionary to an item of interest, and prints
+ /// it into the SBStream in a natural format. Return bool is to indicate if
+ /// anything was printed into the stream (true) or not (false).
+ //--------------------------------------------------------------------------
") GetInfoItemByPathAsString;
bool
Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=293858&r1=293857&r2=293858&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Wed Feb 1 21:02:51 2017
@@ -595,8 +595,8 @@ bool SBThread::GetInfoItemByPathAsString
}
if (log)
- log->Printf("SBThread(%p)::GetInfoItemByPathAsString () => %s",
- static_cast<void *>(exe_ctx.GetThreadPtr()), strm.GetData());
+ log->Printf("SBThread(%p)::GetInfoItemByPathAsString (\"%s\") => \"%s\"",
+ static_cast<void *>(exe_ctx.GetThreadPtr()), path, strm.GetData());
return success;
}
More information about the lldb-commits
mailing list