[Lldb-commits] [lldb] r218835 - Add documentation about the new SBExecutionContext for Python commands feature. This marks the end of rdar://18142728
Enrico Granata
egranata at apple.com
Wed Oct 1 14:53:32 PDT 2014
Author: enrico
Date: Wed Oct 1 16:53:32 2014
New Revision: 218835
URL: http://llvm.org/viewvc/llvm-project?rev=218835&view=rev
Log:
Add documentation about the new SBExecutionContext for Python commands feature. This marks the end of rdar://18142728
Modified:
lldb/trunk/www/python-reference.html
Modified: lldb/trunk/www/python-reference.html
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/python-reference.html?rev=218835&r1=218834&r2=218835&view=diff
==============================================================================
--- lldb/trunk/www/python-reference.html (original)
+++ lldb/trunk/www/python-reference.html Wed Oct 1 16:53:32 2014
@@ -333,6 +333,14 @@ Enter your Python command(s). Type 'DONE
<font color=green>"""This command takes a lot of options and does many fancy things"""</font>
<font color=green># Your code goes here</font>
</tt></pre></code>
+
+ Starting with SVN revision 218834, LLDB Python commands can also take an SBExecutionContext as an argument.
+ This is useful in cases where the command's notion of <i>where to act</i> is independent of the currently-selected entities in the debugger.<br/>
+ This feature is enabled if the command-implementing function can be recognized as taking 5 arguments, or a variable number of arguments, and it alters the signature as such:
+ <code><pre><tt>def command_function(<b>debugger</b>, <b>command</b>, <b>exe_ctx</b>, <b>result</b>, <b>internal_dict</b>):
+ <font color=green># Your code goes here</font>
+ </tt></pre></code>
+
<p><table class="stats" width="620" cellspacing="0">
<tr>
@@ -366,6 +374,18 @@ Enter your Python command(s). Type 'DONE
</td>
</tr>
<tr>
+ <td class="content">
+ <b>exe_ctx</b>
+ </td>
+ <td class="content">
+ <b>lldb.SBExecutionContext</b>
+ </td>
+ <td class="content">
+ An execution context object carrying around information on the inferior process' context in which the command is expected to act
+ <br/><i>Optional since SVN r218834, unavailable before</i>
+ </td>
+ </tr>
+ <tr>
<td class="content">
<b>result</b>
</td>
More information about the lldb-commits
mailing list