[Lldb-commits] [lldb] r135531 - in /lldb/trunk/scripts: Python/interface/SBBroadcaster.i Python/interface/SBCommandInterpreter.i Python/interface/SBCommandReturnObject.i Python/interface/SBCommunication.i Python/interface/SBError.i Python/interface/SBFileSpec.i Python/interface/SBHostOS.i Python/interface/SBInputReader.i Python/interface/SBInstruction.i Python/interface/SBInstructionList.i Python/interface/SBSourceManager.i Python/interface/SBStream.i Python/interface/SBStringList.i Python/interface/SBType.i lldb.swig

Johnny Chen johnny.chen at apple.com
Tue Jul 19 15:41:47 PDT 2011


Author: johnny
Date: Tue Jul 19 17:41:47 2011
New Revision: 135531

URL: http://llvm.org/viewvc/llvm-project?rev=135531&view=rev
Log:
Move the rest of the SB headers to interface files.
They are not docstring'ed yet.

Added:
    lldb/trunk/scripts/Python/interface/SBBroadcaster.i
    lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i
    lldb/trunk/scripts/Python/interface/SBCommandReturnObject.i
    lldb/trunk/scripts/Python/interface/SBCommunication.i
    lldb/trunk/scripts/Python/interface/SBError.i
    lldb/trunk/scripts/Python/interface/SBFileSpec.i
    lldb/trunk/scripts/Python/interface/SBHostOS.i
    lldb/trunk/scripts/Python/interface/SBInputReader.i
    lldb/trunk/scripts/Python/interface/SBInstruction.i
    lldb/trunk/scripts/Python/interface/SBInstructionList.i
    lldb/trunk/scripts/Python/interface/SBSourceManager.i
    lldb/trunk/scripts/Python/interface/SBStream.i
    lldb/trunk/scripts/Python/interface/SBStringList.i
    lldb/trunk/scripts/Python/interface/SBType.i
Modified:
    lldb/trunk/scripts/lldb.swig

Added: lldb/trunk/scripts/Python/interface/SBBroadcaster.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBBroadcaster.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBBroadcaster.i (added)
+++ lldb/trunk/scripts/Python/interface/SBBroadcaster.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,51 @@
+//===-- SWIG Interface for SBBroadcaster ------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBBroadcaster
+{
+public:
+    SBBroadcaster ();
+
+    SBBroadcaster (const char *name);
+
+    SBBroadcaster (const SBBroadcaster &rhs);
+    
+    ~SBBroadcaster();
+
+    bool
+    IsValid () const;
+
+    void
+    Clear ();
+
+    void
+    BroadcastEventByType (uint32_t event_type, bool unique = false);
+
+    void
+    BroadcastEvent (const lldb::SBEvent &event, bool unique = false);
+
+    void
+    AddInitialEventsToListener (const lldb::SBListener &listener, uint32_t requested_events);
+
+    uint32_t
+    AddListener (const lldb::SBListener &listener, uint32_t event_mask);
+
+    const char *
+    GetName () const;
+
+    bool
+    EventTypeHasListeners (uint32_t event_type);
+
+    bool
+    RemoveListener (const lldb::SBListener &listener, uint32_t event_mask = UINT32_MAX);
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i (added)
+++ lldb/trunk/scripts/Python/interface/SBCommandInterpreter.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,82 @@
+//===-- SWIG Interface for SBCommandInterpreter -----------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBCommandInterpreter
+{
+public:
+    enum
+    {
+        eBroadcastBitThreadShouldExit       = (1 << 0),
+        eBroadcastBitResetPrompt            = (1 << 1),
+        eBroadcastBitQuitCommandReceived    = (1 << 2),           // User entered quit 
+        eBroadcastBitAsynchronousOutputData = (1 << 3),
+        eBroadcastBitAsynchronousErrorData  = (1 << 4)
+    };
+
+    SBCommandInterpreter (const lldb::SBCommandInterpreter &rhs);
+    
+    ~SBCommandInterpreter ();
+
+    static const char * 
+    GetArgumentTypeAsCString (const lldb::CommandArgumentType arg_type);
+    
+    static const char *
+    GetArgumentDescriptionAsCString (const lldb::CommandArgumentType arg_type);
+    
+    bool
+    IsValid() const;
+
+    bool
+    CommandExists (const char *cmd);
+
+    bool
+    AliasExists (const char *cmd);
+
+    lldb::SBBroadcaster
+    GetBroadcaster ();
+
+    bool
+    HasCommands ();
+
+    bool
+    HasAliases ();
+
+    bool
+    HasAliasOptions ();
+
+    lldb::SBProcess
+    GetProcess ();
+
+    ssize_t
+    WriteToScriptInterpreter (const char *src);
+
+    ssize_t
+    WriteToScriptInterpreter (const char *src, size_t src_len);
+
+    void
+    SourceInitFileInHomeDirectory (lldb::SBCommandReturnObject &result);
+
+    void
+    SourceInitFileInCurrentWorkingDirectory (lldb::SBCommandReturnObject &result);
+
+    lldb::ReturnStatus
+    HandleCommand (const char *command_line, lldb::SBCommandReturnObject &result, bool add_to_history = false);
+
+    int
+    HandleCompletion (const char *current_line,
+                      const char *cursor,
+                      const char *last_char,
+                      int match_start_point,
+                      int max_return_elements,
+                      lldb::SBStringList &matches);
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBCommandReturnObject.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBCommandReturnObject.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBCommandReturnObject.i (added)
+++ lldb/trunk/scripts/Python/interface/SBCommandReturnObject.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,68 @@
+//===-- SWIG Interface for SBCommandReturnObject ----------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBCommandReturnObject
+{
+public:
+
+    SBCommandReturnObject ();
+
+    SBCommandReturnObject (const lldb::SBCommandReturnObject &rhs);
+
+    ~SBCommandReturnObject ();
+
+    bool
+    IsValid() const;
+
+    const char *
+    GetOutput ();
+
+    const char *
+    GetError ();
+
+    size_t
+    PutOutput (FILE *fh);
+
+    size_t
+    GetOutputSize ();
+
+    size_t
+    GetErrorSize ();
+
+    size_t
+    PutError (FILE *fh);
+
+    void
+    Clear();
+
+    lldb::ReturnStatus
+    GetStatus();
+
+    bool
+    Succeeded ();
+
+    bool
+    HasResult ();
+
+    void
+    AppendMessage (const char *message);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+    
+    void
+    SetImmediateOutputFile (FILE *fh);
+    
+    void
+    SetImmediateErrorFile (FILE *fh);
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBCommunication.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBCommunication.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBCommunication.i (added)
+++ lldb/trunk/scripts/Python/interface/SBCommunication.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,80 @@
+//===-- SWIG Interface for SBCommunication ----------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBCommunication
+{
+public:
+    enum {
+        eBroadcastBitDisconnected           = (1 << 0), ///< Sent when the communications connection is lost.
+        eBroadcastBitReadThreadGotBytes     = (1 << 1), ///< Sent by the read thread when bytes become available.
+        eBroadcastBitReadThreadDidExit      = (1 << 2), ///< Sent by the read thread when it exits to inform clients.
+        eBroadcastBitReadThreadShouldExit   = (1 << 3), ///< Sent by clients that need to cancel the read thread.
+        eBroadcastBitPacketAvailable        = (1 << 4), ///< Sent when data received makes a complete packet.
+        eAllEventBits                       = 0xffffffff
+    };
+
+    typedef void (*ReadThreadBytesReceived) (void *baton, const void *src, size_t src_len);
+
+    SBCommunication ();
+    SBCommunication (const char * broadcaster_name);
+   ~SBCommunication ();
+
+
+    bool
+    IsValid () const;
+
+    lldb::SBBroadcaster
+    GetBroadcaster ();
+
+    lldb::ConnectionStatus
+    AdoptFileDesriptor (int fd, bool owns_fd);
+
+    lldb::ConnectionStatus
+    Connect (const char *url);
+
+    lldb::ConnectionStatus
+    Disconnect ();
+
+    bool
+    IsConnected () const;
+
+    bool
+    GetCloseOnEOF ();
+
+    void
+    SetCloseOnEOF (bool b);
+
+    size_t
+    Read (void *dst,
+          size_t dst_len,
+          uint32_t timeout_usec,
+          lldb::ConnectionStatus &status);
+
+    size_t
+    Write (const void *src,
+           size_t src_len,
+           lldb::ConnectionStatus &status);
+
+    bool
+    ReadThreadStart ();
+
+    bool
+    ReadThreadStop ();
+
+    bool
+    ReadThreadIsRunning ();
+
+    bool
+    SetReadThreadBytesReceivedCallback (ReadThreadBytesReceived callback,
+                                        void *callback_baton);
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBError.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBError.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBError.i (added)
+++ lldb/trunk/scripts/Python/interface/SBError.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,60 @@
+//===-- SWIG Interface for SBError ------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBError {
+public:
+    SBError ();
+
+    SBError (const lldb::SBError &rhs);
+
+    ~SBError();
+
+    const char *
+    GetCString () const;
+
+    void
+    Clear ();
+
+    bool
+    Fail () const;
+
+    bool
+    Success () const;
+
+    uint32_t
+    GetError () const;
+
+    lldb::ErrorType
+    GetType () const;
+
+    void
+    SetError (uint32_t err, lldb::ErrorType type);
+
+    void
+    SetErrorToErrno ();
+
+    void
+    SetErrorToGenericError ();
+
+    void
+    SetErrorString (const char *err_str);
+
+    int
+    SetErrorStringWithFormat (const char *format, ...);
+
+    bool
+    IsValid () const;
+
+    bool
+    GetDescription (lldb::SBStream &description);
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBFileSpec.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBFileSpec.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBFileSpec.i (added)
+++ lldb/trunk/scripts/Python/interface/SBFileSpec.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,50 @@
+//===-- SWIG Interface for SBFileSpec ---------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBFileSpec
+{
+public:
+    SBFileSpec ();
+
+    SBFileSpec (const lldb::SBFileSpec &rhs);
+
+    SBFileSpec (const char *path);// Deprected, use SBFileSpec (const char *path, bool resolve)
+
+    SBFileSpec (const char *path, bool resolve);
+
+    ~SBFileSpec ();
+
+    bool
+    IsValid() const;
+
+    bool
+    Exists () const;
+
+    bool
+    ResolveExecutableLocation ();
+
+    const char *
+    GetFilename() const;
+
+    const char *
+    GetDirectory() const;
+
+    uint32_t
+    GetPath (char *dst_path, size_t dst_len) const;
+
+    static int
+    ResolvePath (const char *src_path, char *dst_path, size_t dst_len);
+
+    bool
+    GetDescription (lldb::SBStream &description) const;
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBHostOS.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBHostOS.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBHostOS.i (added)
+++ lldb/trunk/scripts/Python/interface/SBHostOS.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,41 @@
+//===-- SWIG Interface for SBHostOS -----------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBHostOS
+{
+public:
+
+    static lldb::SBFileSpec
+    GetProgramFileSpec ();
+
+    static void
+    ThreadCreated (const char *name);
+
+    static lldb::thread_t
+    ThreadCreate (const char *name,
+                  void *(*thread_function)(void *),
+                  void *thread_arg,
+                  lldb::SBError *err);
+
+    static bool
+    ThreadCancel (lldb::thread_t thread,
+                  lldb::SBError *err);
+
+    static bool
+    ThreadDetach (lldb::thread_t thread,
+                  lldb::SBError *err);
+    static bool
+    ThreadJoin (lldb::thread_t thread,
+                void **result,
+                lldb::SBError *err);
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBInputReader.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBInputReader.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBInputReader.i (added)
+++ lldb/trunk/scripts/Python/interface/SBInputReader.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,53 @@
+//===-- SWIG Interface for SBInputREader ------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBInputReader
+{
+public:
+
+    typedef size_t (*Callback) (void *baton, 
+                                SBInputReader *reader, 
+                                InputReaderAction notification,
+                                const char *bytes, 
+                                size_t bytes_len);
+
+    SBInputReader ();
+
+    SBInputReader (const lldb::SBInputReader &rhs);
+
+    ~SBInputReader ();
+
+    SBError
+    Initialize (SBDebugger &debugger,
+                Callback callback,
+                void *callback_baton,
+                lldb::InputReaderGranularity granularity,
+                const char *end_token,
+                const char *prompt,
+                bool echo);
+    
+    bool
+    IsValid () const;
+
+    bool
+    IsActive () const;
+
+    bool
+    IsDone () const;
+
+    void
+    SetIsDone (bool value);
+
+    InputReaderGranularity
+    GetGranularity ();
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBInstruction.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBInstruction.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBInstruction.i (added)
+++ lldb/trunk/scripts/Python/interface/SBInstruction.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,55 @@
+//===-- SWIG Interface for SBInstruction ------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <stdio.h>
+
+// There's a lot to be fixed here, but need to wait for underlying insn implementation
+// to be revised & settle down first.
+
+namespace lldb {
+
+class SBInstruction
+{
+public:
+
+    SBInstruction ();
+
+    SBInstruction (const SBInstruction &rhs);
+    
+    ~SBInstruction ();
+
+    bool
+    IsValid();
+
+    SBAddress
+    GetAddress();
+
+    size_t
+    GetByteSize ();
+
+    bool
+    DoesBranch ();
+
+    void
+    Print (FILE *out);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    bool
+    EmulateWithFrame (lldb::SBFrame &frame, uint32_t evaluate_options);
+
+    bool
+    DumpEmulation (const char * triple); // triple is to specify the architecture, e.g. 'armv6' or 'arm-apple-darwin'
+    
+    bool
+    TestEmulation (lldb::SBStream &output_stream, const char *test_file);
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBInstructionList.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBInstructionList.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBInstructionList.i (added)
+++ lldb/trunk/scripts/Python/interface/SBInstructionList.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,49 @@
+//===-- SWIG Interface for SBInstructionList --------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <stdio.h>
+
+namespace lldb {
+
+class SBInstructionList
+{
+public:
+
+    SBInstructionList ();
+
+    SBInstructionList (const SBInstructionList &rhs);
+    
+    ~SBInstructionList ();
+
+    bool
+    IsValid () const;
+
+    size_t
+    GetSize ();
+
+    lldb::SBInstruction
+    GetInstructionAtIndex (uint32_t idx);
+
+    void
+    Clear ();
+
+    void
+    AppendInstruction (lldb::SBInstruction inst);
+
+    void
+    Print (FILE *out);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+    
+    bool
+    DumpEmulationForAllInstructions (const char *triple);
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBSourceManager.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBSourceManager.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBSourceManager.i (added)
+++ lldb/trunk/scripts/Python/interface/SBSourceManager.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,28 @@
+//===-- SWIG Interface for SBSourceManager ----------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBSourceManager
+{
+public:
+    SBSourceManager (const lldb::SBSourceManager &rhs);
+    
+    ~SBSourceManager();
+
+    size_t
+    DisplaySourceLinesWithLineNumbers (const lldb::SBFileSpec &file,
+                                       uint32_t line,
+                                       uint32_t context_before,
+                                       uint32_t context_after,
+                                       const char* current_line_cstr,
+                                       lldb::SBStream &s);
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBStream.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBStream.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBStream.i (added)
+++ lldb/trunk/scripts/Python/interface/SBStream.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,55 @@
+//===-- SWIG Interface for SBStream -----------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <stdio.h>
+
+namespace lldb {
+
+class SBStream
+{
+public:
+
+    SBStream ();
+    
+    ~SBStream ();
+
+    bool
+    IsValid() const;
+
+    // If this stream is not redirected to a file, it will maintain a local
+    // cache for the stream data which can be accessed using this accessor.
+    const char *
+    GetData ();
+
+    // If this stream is not redirected to a file, it will maintain a local
+    // cache for the stream output whose length can be accessed using this 
+    // accessor.
+    size_t
+    GetSize();
+
+    void
+    Printf (const char *format, ...);
+
+    void
+    RedirectToFile (const char *path, bool append);
+
+    void
+    RedirectToFileHandle (FILE *fh, bool transfer_fh_ownership);
+
+    void
+    RedirectToFileDescriptor (int fd, bool transfer_fh_ownership);
+
+    // If the stream is redirected to a file, forget about the file and if
+    // ownership of the file was transfered to this object, close the file.
+    // If the stream is backed by a local cache, clear this cache.
+    void
+    Clear ();
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBStringList.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBStringList.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBStringList.i (added)
+++ lldb/trunk/scripts/Python/interface/SBStringList.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,44 @@
+//===-- SWIG Interface for SBStringList -------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBStringList
+{
+public:
+
+    SBStringList ();
+
+    SBStringList (const lldb::SBStringList &rhs);
+    
+    ~SBStringList ();
+
+    bool
+    IsValid() const;
+
+    void
+    AppendString (const char *str);
+
+    void
+    AppendList (const char **strv, int strc);
+
+    void
+    AppendList (const lldb::SBStringList &strings);
+
+    uint32_t
+    GetSize () const;
+
+    const char *
+    GetStringAtIndex (size_t idx);
+
+    void
+    Clear ();
+};
+
+} // namespace lldb

Added: lldb/trunk/scripts/Python/interface/SBType.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBType.i?rev=135531&view=auto
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBType.i (added)
+++ lldb/trunk/scripts/Python/interface/SBType.i Tue Jul 19 17:41:47 2011
@@ -0,0 +1,99 @@
+//===-- SWIG Interface for SBType -------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBTypeMember;
+
+class SBType
+{
+public:
+
+    SBType (void *ast = NULL, void *clang_type = NULL);
+    
+    SBType (const SBType &rhs);
+
+    ~SBType ();
+
+    bool
+    IsValid();
+
+    const char *
+    GetName();
+
+    uint64_t
+    GetByteSize();
+
+    uint64_t
+    GetNumberChildren (bool omit_empty_base_classes);
+
+    bool
+    GetChildAtIndex (bool omit_empty_base_classes, uint32_t idx, SBTypeMember &member);
+
+    uint32_t
+    GetChildIndexForName (bool omit_empty_base_classes, const char *name);
+
+    bool
+    IsAPointerType ();
+
+    SBType
+    GetPointeeType ();
+
+    static bool
+    IsPointerType (void *opaque_type);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+};
+
+class SBTypeMember
+{
+public:
+
+    SBTypeMember ();
+    
+    SBTypeMember (const SBTypeMember &rhs);
+
+    ~SBTypeMember ();
+
+    bool
+    IsBaseClass ();
+
+    bool
+    IsValid ();
+
+    void
+    Clear();
+
+    bool
+    IsBitfield ();
+    
+    size_t
+    GetBitfieldWidth ();
+    
+    size_t
+    GetBitfieldOffset ();
+
+    size_t
+    GetOffset ();
+
+    const char *
+    GetName ();
+
+    SBType
+    GetType();
+
+    SBType
+    GetParentType();
+
+    void
+    SetName (const char *name);
+};
+
+} // namespace lldb

Modified: lldb/trunk/scripts/lldb.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/lldb.swig?rev=135531&r1=135530&r2=135531&view=diff
==============================================================================
--- lldb/trunk/scripts/lldb.swig (original)
+++ lldb/trunk/scripts/lldb.swig Tue Jul 19 17:41:47 2011
@@ -197,42 +197,42 @@
 %include "lldb/lldb-forward-rtti.h"
 %include "lldb/lldb-types.h"
 
-/* Headers that are swigged directly. */
+/* Forward declaration of SB classes. */
 %include "lldb/API/SBDefines.h"
-%include "lldb/API/SBBroadcaster.h"
-%include "lldb/API/SBCommandInterpreter.h"
-%include "lldb/API/SBCommandReturnObject.h"
-%include "lldb/API/SBCommunication.h"
-%include "lldb/API/SBError.h"
-%include "lldb/API/SBFileSpec.h"
-%include "lldb/API/SBHostOS.h"
-%include "lldb/API/SBInputReader.h"
-%include "lldb/API/SBInstruction.h"
-%include "lldb/API/SBInstructionList.h"
-%include "lldb/API/SBSourceManager.h"
-%include "lldb/API/SBStream.h"
-%include "lldb/API/SBStringList.h"
-%include "lldb/API/SBType.h"
 
 /* Python interface files with docstrings. */
 %include "./Python/interface/SBAddress.i"
 %include "./Python/interface/SBBlock.i"
 %include "./Python/interface/SBBreakpoint.i"
 %include "./Python/interface/SBBreakpointLocation.i"
+%include "./Python/interface/SBBroadcaster.i"
+%include "./Python/interface/SBCommandInterpreter.i"
+%include "./Python/interface/SBCommandReturnObject.i"
+%include "./Python/interface/SBCommunication.i"
 %include "./Python/interface/SBCompileUnit.i"
 %include "./Python/interface/SBDebugger.i"
+%include "./Python/interface/SBError.i"
 %include "./Python/interface/SBEvent.i"
+%include "./Python/interface/SBFileSpec.i"
 %include "./Python/interface/SBFrame.i"
 %include "./Python/interface/SBFunction.i"
+%include "./Python/interface/SBHostOS.i"
+%include "./Python/interface/SBInputReader.i"
+%include "./Python/interface/SBInstruction.i"
+%include "./Python/interface/SBInstructionList.i"
 %include "./Python/interface/SBLineEntry.i"
 %include "./Python/interface/SBListener.i"
 %include "./Python/interface/SBModule.i"
 %include "./Python/interface/SBProcess.i"
+%include "./Python/interface/SBSourceManager.i"
+%include "./Python/interface/SBStream.i"
+%include "./Python/interface/SBStringList.i"
 %include "./Python/interface/SBSymbol.i"
 %include "./Python/interface/SBSymbolContext.i"
 %include "./Python/interface/SBSymbolContextList.i"
 %include "./Python/interface/SBTarget.i"
 %include "./Python/interface/SBThread.i"
+%include "./Python/interface/SBType.i"
 %include "./Python/interface/SBValue.i"
 %include "./Python/interface/SBValueList.i"
 





More information about the lldb-commits mailing list