[Lldb-commits] [lldb] r135553 - /lldb/trunk/scripts/Python/interface/SBFileSpec.i

Johnny Chen johnny.chen at apple.com
Tue Jul 19 18:06:37 PDT 2011


Author: johnny
Date: Tue Jul 19 20:06:37 2011
New Revision: 135553

URL: http://llvm.org/viewvc/llvm-project?rev=135553&view=rev
Log:
Add some docstrings for SBFileSpec class.

Modified:
    lldb/trunk/scripts/Python/interface/SBFileSpec.i

Modified: lldb/trunk/scripts/Python/interface/SBFileSpec.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBFileSpec.i?rev=135553&r1=135552&r2=135553&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBFileSpec.i (original)
+++ lldb/trunk/scripts/Python/interface/SBFileSpec.i Tue Jul 19 20:06:37 2011
@@ -9,6 +9,27 @@
 
 namespace lldb {
 
+%feature("docstring",
+"Represents a file specfication that divides the path into a directory and
+basename.  The string values of the paths are put into uniqued string pools
+for fast comparisons and efficient memory usage.
+
+For example, the following code
+
+        lineEntry = context.GetLineEntry()
+        self.expect(lineEntry.GetFileSpec().GetDirectory(), 'The line entry should have the correct directory',
+                    exe=False,
+            substrs = [self.mydir])
+        self.expect(lineEntry.GetFileSpec().GetFilename(), 'The line entry should have the correct filename',
+                    exe=False,
+            substrs = ['main.c'])
+        self.assertTrue(lineEntry.GetLine() == self.line,
+                        'The line entry's line number should match ')
+
+gets the line entry from the symbol context when a thread is stopped.
+It gets the file spec corresponding to the line entry and checks that
+the filename and the directory matches wat we expect.
+") SBFileSpec;
 class SBFileSpec
 {
 public:





More information about the lldb-commits mailing list