[Lldb-commits] [lldb] r134446 - in /lldb/trunk: include/lldb/API/SBModule.h include/lldb/Core/Module.h test/python_api/default-constructor/sb_module.py

Johnny Chen johnny.chen at apple.com
Tue Jul 5 15:03:36 PDT 2011


Author: johnny
Date: Tue Jul  5 17:03:36 2011
New Revision: 134446

URL: http://llvm.org/viewvc/llvm-project?rev=134446&view=rev
Log:
Add swig docstrings for SBModule.h, plus ifndef the SBModule::GetUUIDBytes() API out if swig.
Fix typos in the comment for Module.h.

Modified:
    lldb/trunk/include/lldb/API/SBModule.h
    lldb/trunk/include/lldb/Core/Module.h
    lldb/trunk/test/python_api/default-constructor/sb_module.py

Modified: lldb/trunk/include/lldb/API/SBModule.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBModule.h?rev=134446&r1=134445&r2=134446&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBModule.h (original)
+++ lldb/trunk/include/lldb/API/SBModule.h Tue Jul  5 17:03:36 2011
@@ -19,7 +19,11 @@
 #ifdef SWIG
 %feature("docstring",
          "Represents an executable image and its associated object and symbol"
-         " files."
+         " files.\n"
+         "\n"
+         "The module is designed to be able to select a single slice of an\n"
+         "executable image as it would appear on disk and during program\n"
+         "execution."
          ) SBModule;
 #endif
 class SBModule
@@ -44,18 +48,62 @@
     bool
     IsValid () const;
 
+#ifdef SWIG
+    %feature("autodoc", "
+#endif
+    //------------------------------------------------------------------
+    /// Get const accessor for the module file specification.
+    ///
+    /// This function returns the file for the module on the host system
+    /// that is running LLDB. This can differ from the path on the 
+    /// platform since we might be doing remote debugging.
+    ///
+    /// @return
+    ///     A const reference to the file specification object.
+    //------------------------------------------------------------------
+#ifdef SWIG
+    ") GetFileSpec;
+#endif
     lldb::SBFileSpec
     GetFileSpec () const;
 
+#ifdef SWIG
+    %feature("autodoc", "
+#endif
+    //------------------------------------------------------------------
+    /// Get accessor for the module platform file specification.
+    ///
+    /// Platform file refers to the path of the module as it is known on
+    /// the remote system on which it is being debugged. For local 
+    /// debugging this is always the same as Module::GetFileSpec(). But
+    /// remote debugging might mention a file '/usr/lib/liba.dylib'
+    /// which might be locally downloaded and cached. In this case the
+    /// platform file could be something like:
+    /// '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib'
+    /// The file could also be cached in a local developer kit directory.
+    ///
+    /// @return
+    ///     A const reference to the file specification object.
+    //------------------------------------------------------------------
+#ifdef SWIG
+    ") GetPlatformFileSpec;
+#endif
     lldb::SBFileSpec
     GetPlatformFileSpec () const;
 
     bool
     SetPlatformFileSpec (const lldb::SBFileSpec &platform_file);
 
+#ifndef SWIG
     const uint8_t *
     GetUUIDBytes () const;
+#endif
 
+#ifdef SWIG
+    %feature("autodoc",
+             "Returns the UUID of the module as a Python string."
+             ) GetUUIDString;
+#endif
     const char *
     GetUUIDString () const;
 
@@ -85,12 +133,61 @@
     lldb::SBSymbol
     GetSymbolAtIndex (size_t idx);
 
+#ifdef SWIG
+    %feature("autodoc", "
+#endif
+    //------------------------------------------------------------------
+    /// Find functions by name.
+    ///
+    /// @param[in] name
+    ///     The name of the function we are looking for.
+    ///
+    /// @param[in] name_type_mask
+    ///     A logical OR of one or more FunctionNameType enum bits that
+    ///     indicate what kind of names should be used when doing the
+    ///     lookup. Bits include fully qualified names, base names,
+    ///     C++ methods, or ObjC selectors. 
+    ///     See FunctionNameType for more details.
+    ///
+    /// @param[in] append
+    ///     If true, any matches will be appended to \a sc_list, else
+    ///     matches replace the contents of \a sc_list.
+    ///
+    /// @param[out] sc_list
+    ///     A symbol context list that gets filled in with all of the
+    ///     matches.
+    ///
+    /// @return
+    ///     The number of matches added to \a sc_list.
+    //------------------------------------------------------------------
+#ifdef SWIG
+    ") FindFunctions;
+#endif
     uint32_t
     FindFunctions (const char *name, 
                    uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits
                    bool append, 
                    lldb::SBSymbolContextList& sc_list);
 
+#ifdef SWIG
+    %feature("autodoc", "
+#endif
+    //------------------------------------------------------------------
+    /// Find global and static variables by name.
+    ///
+    /// @param[in] name
+    ///     The name of the global or static variable we are looking
+    ///     for.
+    ///
+    /// @param[in] target
+    ///     The target program where the variables reside.
+    ///
+    /// @return
+    ///     A list of matched variables in an SBValueList.
+    //------------------------------------------------------------------
+#ifdef SWIG
+    ") FindGlobalVariables;
+#endif
     lldb::SBValueList
     FindGlobalVariables (lldb::SBTarget &target, 
                          const char *name, 

Modified: lldb/trunk/include/lldb/Core/Module.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=134446&r1=134445&r2=134446&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Tue Jul  5 17:03:36 2011
@@ -169,9 +169,8 @@
     ///     See FunctionNameType for more details.
     ///
     /// @param[in] append
-    ///     If \b true, any matches will be appended to \a
-    ///     variable_list, else matches replace the contents of
-    ///     \a variable_list.
+    ///     If \b true, any matches will be appended to \a sc_list, else
+    ///     matches replace the contents of \a sc_list.
     ///
     /// @param[out] sc_list
     ///     A symbol context list that gets filled in with all of the
@@ -194,9 +193,8 @@
     ///     A regular expression to use when matching the name.
     ///
     /// @param[in] append
-    ///     If \b true, any matches will be appended to \a
-    ///     variable_list, else matches replace the contents of
-    ///     \a variable_list.
+    ///     If \b true, any matches will be appended to \a sc_list, else
+    ///     matches replace the contents of \a sc_list.
     ///
     /// @param[out] sc_list
     ///     A symbol context list that gets filled in with all of the

Modified: lldb/trunk/test/python_api/default-constructor/sb_module.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_module.py?rev=134446&r1=134445&r2=134446&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_module.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_module.py Tue Jul  5 17:03:36 2011
@@ -9,7 +9,6 @@
     obj.GetFileSpec()
     obj.GetPlatformFileSpec()
     obj.SetPlatformFileSpec(lldb.SBFileSpec())
-    obj.GetUUIDBytes()
     obj.GetUUIDString()
     obj.ResolveFileAddress(sys.maxint, lldb.SBAddress())
     obj.ResolveSymbolContextForAddress(lldb.SBAddress(), 0)





More information about the lldb-commits mailing list