[Lldb-commits] [lldb] r118312 - in /lldb/trunk: include/lldb/API/ lldb.xcodeproj/ resources/ source/API/ tools/debugserver/debugserver.xcodeproj/

Greg Clayton gclayton at apple.com
Fri Nov 5 16:17:00 PDT 2010


Author: gclayton
Date: Fri Nov  5 18:17:00 2010
New Revision: 118312

URL: http://llvm.org/viewvc/llvm-project?rev=118312&view=rev
Log:
Added copy constructors and assignment operators to all lldb::SB* classes
so we don't end up with weak exports with some compilers.


Modified:
    lldb/trunk/include/lldb/API/SBAddress.h
    lldb/trunk/include/lldb/API/SBBlock.h
    lldb/trunk/include/lldb/API/SBBreakpoint.h
    lldb/trunk/include/lldb/API/SBBreakpointLocation.h
    lldb/trunk/include/lldb/API/SBBroadcaster.h
    lldb/trunk/include/lldb/API/SBCommandInterpreter.h
    lldb/trunk/include/lldb/API/SBCommandReturnObject.h
    lldb/trunk/include/lldb/API/SBCommunication.h
    lldb/trunk/include/lldb/API/SBCompileUnit.h
    lldb/trunk/include/lldb/API/SBDebugger.h
    lldb/trunk/include/lldb/API/SBError.h
    lldb/trunk/include/lldb/API/SBEvent.h
    lldb/trunk/include/lldb/API/SBFrame.h
    lldb/trunk/include/lldb/API/SBFunction.h
    lldb/trunk/include/lldb/API/SBInputReader.h
    lldb/trunk/include/lldb/API/SBInstruction.h
    lldb/trunk/include/lldb/API/SBInstructionList.h
    lldb/trunk/include/lldb/API/SBListener.h
    lldb/trunk/include/lldb/API/SBModule.h
    lldb/trunk/include/lldb/API/SBProcess.h
    lldb/trunk/include/lldb/API/SBSourceManager.h
    lldb/trunk/include/lldb/API/SBStringList.h
    lldb/trunk/include/lldb/API/SBSymbol.h
    lldb/trunk/include/lldb/API/SBTarget.h
    lldb/trunk/include/lldb/API/SBType.h
    lldb/trunk/include/lldb/API/SBValue.h
    lldb/trunk/lldb.xcodeproj/project.pbxproj
    lldb/trunk/resources/LLDB-Info.plist
    lldb/trunk/source/API/SBBlock.cpp
    lldb/trunk/source/API/SBBreakpointLocation.cpp
    lldb/trunk/source/API/SBBroadcaster.cpp
    lldb/trunk/source/API/SBCommandInterpreter.cpp
    lldb/trunk/source/API/SBCommandReturnObject.cpp
    lldb/trunk/source/API/SBCompileUnit.cpp
    lldb/trunk/source/API/SBDebugger.cpp
    lldb/trunk/source/API/SBEvent.cpp
    lldb/trunk/source/API/SBFrame.cpp
    lldb/trunk/source/API/SBFunction.cpp
    lldb/trunk/source/API/SBInstruction.cpp
    lldb/trunk/source/API/SBInstructionList.cpp
    lldb/trunk/source/API/SBListener.cpp
    lldb/trunk/source/API/SBModule.cpp
    lldb/trunk/source/API/SBProcess.cpp
    lldb/trunk/source/API/SBSourceManager.cpp
    lldb/trunk/source/API/SBStringList.cpp
    lldb/trunk/source/API/SBSymbol.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/API/SBType.cpp
    lldb/trunk/source/API/SBValue.cpp
    lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj

Modified: lldb/trunk/include/lldb/API/SBAddress.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBAddress.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBAddress.h (original)
+++ lldb/trunk/include/lldb/API/SBAddress.h Fri Nov  5 18:17:00 2010
@@ -25,8 +25,8 @@
     ~SBAddress ();
 
 #ifndef SWIG
-    const SBAddress &
-    operator = (const SBAddress &rhs);
+    const lldb::SBAddress &
+    operator = (const lldb::SBAddress &rhs);
 #endif
 
     bool

Modified: lldb/trunk/include/lldb/API/SBBlock.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBlock.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBlock.h (original)
+++ lldb/trunk/include/lldb/API/SBBlock.h Fri Nov  5 18:17:00 2010
@@ -20,8 +20,15 @@
 
     SBBlock ();
 
+    SBBlock (const lldb::SBBlock &rhs);
+
     ~SBBlock ();
 
+#ifndef SWIG
+    const lldb::SBBlock &
+    operator = (const lldb::SBBlock &rhs);
+#endif
+
     bool
     IsInlined () const;
 

Modified: lldb/trunk/include/lldb/API/SBBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpoint.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBreakpoint.h (original)
+++ lldb/trunk/include/lldb/API/SBBreakpoint.h Fri Nov  5 18:17:00 2010
@@ -31,8 +31,8 @@
     ~SBBreakpoint();
 
 #ifndef SWIG
-    const SBBreakpoint &
-    operator = (const SBBreakpoint& rhs);
+    const lldb::SBBreakpoint &
+    operator = (const lldb::SBBreakpoint& rhs);
 #endif
 
     break_id_t

Modified: lldb/trunk/include/lldb/API/SBBreakpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpointLocation.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBreakpointLocation.h (original)
+++ lldb/trunk/include/lldb/API/SBBreakpointLocation.h Fri Nov  5 18:17:00 2010
@@ -21,8 +21,15 @@
 
     SBBreakpointLocation ();
 
+    SBBreakpointLocation (const lldb::SBBreakpointLocation &rhs);
+
     ~SBBreakpointLocation ();
 
+#ifndef SWIG
+    const lldb::SBBreakpointLocation &
+    operator = (const lldb::SBBreakpointLocation &rhs);
+#endif
+
     bool
     IsValid() const;
 

Modified: lldb/trunk/include/lldb/API/SBBroadcaster.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBroadcaster.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBroadcaster.h (original)
+++ lldb/trunk/include/lldb/API/SBBroadcaster.h Fri Nov  5 18:17:00 2010
@@ -21,6 +21,13 @@
 
     SBBroadcaster (const char *name);
 
+    SBBroadcaster (const SBBroadcaster &rhs);
+    
+#ifndef SWIG
+    const SBBroadcaster &
+    operator = (const SBBroadcaster &rhs);
+#endif
+
     ~SBBroadcaster();
 
     bool
@@ -77,9 +84,8 @@
 #endif
 
 private:
-
-    lldb_private::Broadcaster *m_opaque;
-    bool m_opaque_owned;
+    lldb::BroadcasterSP m_opaque_sp;
+    lldb_private::Broadcaster *m_opaque_ptr;
 };
 
 } // namespace lldb

Modified: lldb/trunk/include/lldb/API/SBCommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandInterpreter.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/API/SBCommandInterpreter.h Fri Nov  5 18:17:00 2010
@@ -24,6 +24,12 @@
         eBroadcastBitQuitCommandReceived    = (1 << 2)   // User entered quit
     };
 
+    SBCommandInterpreter (const lldb::SBCommandInterpreter &rhs);
+    
+#ifndef SWIG
+    const lldb::SBCommandInterpreter &
+    operator = (const lldb::SBCommandInterpreter &rhs);
+#endif
 
     ~SBCommandInterpreter ();
 

Modified: lldb/trunk/include/lldb/API/SBCommandReturnObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandReturnObject.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommandReturnObject.h (original)
+++ lldb/trunk/include/lldb/API/SBCommandReturnObject.h Fri Nov  5 18:17:00 2010
@@ -20,6 +20,13 @@
 
     SBCommandReturnObject ();
 
+    SBCommandReturnObject (const lldb::SBCommandReturnObject &rhs);
+
+#ifndef SWIG
+    const lldb::SBCommandReturnObject &
+    operator = (const lldb::SBCommandReturnObject &rhs);
+#endif
+
     ~SBCommandReturnObject ();
 
     bool

Modified: lldb/trunk/include/lldb/API/SBCommunication.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommunication.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommunication.h (original)
+++ lldb/trunk/include/lldb/API/SBCommunication.h Fri Nov  5 18:17:00 2010
@@ -84,8 +84,8 @@
 
 
 private:
-//    void
-//    CreateIfNeeded ();
+
+    DISALLOW_COPY_AND_ASSIGN (SBCommunication);
 
     lldb_private::Communication *m_opaque;
     bool m_opaque_owned;

Modified: lldb/trunk/include/lldb/API/SBCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCompileUnit.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCompileUnit.h (original)
+++ lldb/trunk/include/lldb/API/SBCompileUnit.h Fri Nov  5 18:17:00 2010
@@ -21,8 +21,15 @@
 
     SBCompileUnit ();
 
+    SBCompileUnit (const lldb::SBCompileUnit &rhs);
+
     ~SBCompileUnit ();
 
+#ifndef SWIG
+    const lldb::SBCompileUnit &
+    operator = (const lldb::SBCompileUnit &rhs);
+#endif
+
     bool
     IsValid () const;
 

Modified: lldb/trunk/include/lldb/API/SBDebugger.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDebugger.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBDebugger.h (original)
+++ lldb/trunk/include/lldb/API/SBDebugger.h Fri Nov  5 18:17:00 2010
@@ -30,6 +30,13 @@
 
     SBDebugger();
 
+    SBDebugger(const lldb::SBDebugger &rhs);
+
+#ifndef SWIG
+    lldb::SBDebugger &
+    operator = (const lldb::SBDebugger &rhs);
+#endif
+    
     ~SBDebugger();
 
     bool

Modified: lldb/trunk/include/lldb/API/SBError.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBError.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBError.h (original)
+++ lldb/trunk/include/lldb/API/SBError.h Fri Nov  5 18:17:00 2010
@@ -18,14 +18,14 @@
 public:
     SBError ();
 
-    SBError (const SBError &rhs);
+    SBError (const lldb::SBError &rhs);
 
     ~SBError();
 
 #ifndef SWIG
 
     const SBError &
-    operator =(const SBError &rhs);
+    operator =(const lldb::SBError &rhs);
 
 #endif
 

Modified: lldb/trunk/include/lldb/API/SBEvent.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBEvent.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBEvent.h (original)
+++ lldb/trunk/include/lldb/API/SBEvent.h Fri Nov  5 18:17:00 2010
@@ -30,6 +30,13 @@
 
     ~SBEvent();
 
+    SBEvent (const lldb::SBEvent &rhs);
+    
+#ifndef SWIG
+    const SBEvent &
+    operator = (const lldb::SBEvent &rhs);
+#endif
+
     bool
     IsValid() const;
 
@@ -88,7 +95,7 @@
 private:
 
     mutable lldb::EventSP m_event_sp;
-    mutable lldb_private::Event *m_opaque;
+    mutable lldb_private::Event *m_opaque_ptr;
 };
 
 } // namespace lldb

Modified: lldb/trunk/include/lldb/API/SBFrame.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFrame.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFrame.h (original)
+++ lldb/trunk/include/lldb/API/SBFrame.h Fri Nov  5 18:17:00 2010
@@ -22,6 +22,13 @@
 public:
     SBFrame ();
 
+    SBFrame (const lldb::SBFrame &rhs);
+    
+#ifndef SWIG
+    const lldb::SBFrame &
+    operator =(const lldb::SBFrame &rhs);
+#endif
+
    ~SBFrame();
 
     bool

Modified: lldb/trunk/include/lldb/API/SBFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFunction.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFunction.h (original)
+++ lldb/trunk/include/lldb/API/SBFunction.h Fri Nov  5 18:17:00 2010
@@ -21,6 +21,14 @@
 
     SBFunction ();
 
+    SBFunction (const lldb::SBFunction &rhs);
+
+#ifndef SWIG
+    const lldb::SBFunction &
+    operator = (const lldb::SBFunction &rhs);
+#endif
+
+
     ~SBFunction ();
 
     bool

Modified: lldb/trunk/include/lldb/API/SBInputReader.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInputReader.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBInputReader.h (original)
+++ lldb/trunk/include/lldb/API/SBInputReader.h Fri Nov  5 18:17:00 2010
@@ -48,7 +48,7 @@
     IsValid () const;
 
 #ifndef SWIG
-    const SBInputReader &
+    const lldb::SBInputReader &
     operator = (const lldb::SBInputReader &rhs);
 #endif
 

Modified: lldb/trunk/include/lldb/API/SBInstruction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInstruction.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBInstruction.h (original)
+++ lldb/trunk/include/lldb/API/SBInstruction.h Fri Nov  5 18:17:00 2010
@@ -25,6 +25,13 @@
 
     SBInstruction ();
 
+    SBInstruction (const SBInstruction &rhs);
+    
+#ifndef SWIG
+    const SBInstruction &
+    operator = (const SBInstruction &rhs);
+#endif
+
     ~SBInstruction ();
 
     bool

Modified: lldb/trunk/include/lldb/API/SBInstructionList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInstructionList.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBInstructionList.h (original)
+++ lldb/trunk/include/lldb/API/SBInstructionList.h Fri Nov  5 18:17:00 2010
@@ -22,6 +22,13 @@
 
     SBInstructionList ();
 
+    SBInstructionList (const SBInstructionList &rhs);
+    
+#ifndef SWIG
+    const SBInstructionList &
+    operator = (const SBInstructionList &rhs);
+#endif
+
     ~SBInstructionList ();
 
     size_t

Modified: lldb/trunk/include/lldb/API/SBListener.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBListener.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBListener.h (original)
+++ lldb/trunk/include/lldb/API/SBListener.h Fri Nov  5 18:17:00 2010
@@ -17,14 +17,19 @@
 class SBListener
 {
 public:
-    SBListener (const char *name);
+    SBListener ();
 
-    SBListener (lldb_private::Listener &listener);
+    SBListener (const char *name);
 
-    SBListener ();
+    SBListener (const SBListener &rhs);
 
     ~SBListener ();
 
+#ifndef SWIG
+    const lldb::SBListener &
+    operator = (const lldb::SBListener &rhs);
+#endif
+
     void
     AddEvent (const lldb::SBEvent &event);
 
@@ -85,12 +90,16 @@
     bool
     HandleBroadcastEvent (const lldb::SBEvent &event);
 
-private:
+protected:
     friend class SBBroadcaster;
     friend class SBCommandInterpreter;
     friend class SBDebugger;
     friend class SBTarget;
 
+    SBListener (lldb_private::Listener &listener);
+
+private:
+
 #ifndef SWIG
 
     lldb_private::Listener *
@@ -110,10 +119,8 @@
 
 #endif
 
-
-
+    lldb::ListenerSP m_opaque_sp;
     lldb_private::Listener *m_opaque_ptr;
-    bool m_opaque_ptr_owned;
 };
 
 } // namespace lldb

Modified: lldb/trunk/include/lldb/API/SBModule.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBModule.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBModule.h (original)
+++ lldb/trunk/include/lldb/API/SBModule.h Fri Nov  5 18:17:00 2010
@@ -21,6 +21,13 @@
 
     SBModule ();
 
+    SBModule (const SBModule &rhs);
+    
+#ifndef SWIG
+    const SBModule &
+    operator = (const SBModule &rhs);
+#endif
+
     ~SBModule ();
 
     bool

Modified: lldb/trunk/include/lldb/API/SBProcess.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBProcess.h (original)
+++ lldb/trunk/include/lldb/API/SBProcess.h Fri Nov  5 18:17:00 2010
@@ -37,6 +37,11 @@
 
     SBProcess (const lldb::SBProcess& rhs);
 
+#ifndef SWIG
+    const lldb::SBProcess&
+    operator = (const lldb::SBProcess& rhs);
+#endif
+
     ~SBProcess();
 
     void

Modified: lldb/trunk/include/lldb/API/SBSourceManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSourceManager.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSourceManager.h (original)
+++ lldb/trunk/include/lldb/API/SBSourceManager.h Fri Nov  5 18:17:00 2010
@@ -19,8 +19,15 @@
 class SBSourceManager
 {
 public:
+    SBSourceManager (const lldb::SBSourceManager &rhs);
+    
     ~SBSourceManager();
 
+#ifndef SWIG
+    const lldb::SBSourceManager &
+    operator = (const lldb::SBSourceManager &rhs);
+#endif
+
     size_t
     DisplaySourceLinesWithLineNumbers (const lldb::SBFileSpec &file,
                                        uint32_t line,
@@ -34,14 +41,11 @@
     friend class SBCommandInterpreter;
     friend class SBDebugger;
 
-    SBSourceManager(lldb_private::SourceManager &source_manager);
-
-    lldb_private::SourceManager &
-    GetLLDBManager ();
+    SBSourceManager(lldb_private::SourceManager *source_manager);
 
 private:
 
-    lldb_private::SourceManager &m_opaque_ref;
+    lldb_private::SourceManager *m_opaque_ptr;
 };
 
 } // namespace lldb

Modified: lldb/trunk/include/lldb/API/SBStringList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStringList.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBStringList.h (original)
+++ lldb/trunk/include/lldb/API/SBStringList.h Fri Nov  5 18:17:00 2010
@@ -20,9 +20,12 @@
 
     SBStringList ();
 
-    SBStringList (const lldb_private::StringList  *lldb_strings);
-
-    SBStringList (const lldb::SBStringList  &rhs);
+    SBStringList (const lldb::SBStringList &rhs);
+    
+#ifndef SWIG
+    const SBStringList &
+    operator = (const SBStringList &rhs);
+#endif
 
     ~SBStringList ();
 
@@ -47,6 +50,11 @@
     void
     Clear ();
 
+protected:
+    friend class SBCommandInterpreter;
+
+    SBStringList (const lldb_private::StringList *lldb_strings);
+
 #ifndef SWIG
 
     const lldb_private::StringList *
@@ -55,9 +63,6 @@
     const lldb_private::StringList &
     operator*() const;
 
-    const lldb::SBStringList &
-    operator = (const lldb::SBStringList &rhs);
-
 #endif
 
 private:

Modified: lldb/trunk/include/lldb/API/SBSymbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbol.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSymbol.h (original)
+++ lldb/trunk/include/lldb/API/SBSymbol.h Fri Nov  5 18:17:00 2010
@@ -24,6 +24,13 @@
 
     ~SBSymbol ();
 
+    SBSymbol (const lldb::SBSymbol &rhs);
+
+#ifndef SWIG
+    const lldb::SBSymbol &
+    operator = (const lldb::SBSymbol &rhs);
+#endif
+
     bool
     IsValid () const;
 

Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Fri Nov  5 18:17:00 2010
@@ -32,11 +32,16 @@
     };
 
     //------------------------------------------------------------------
-    // Constructors and Destructors
+    // Constructors
     //------------------------------------------------------------------
+    SBTarget ();
+
     SBTarget (const lldb::SBTarget& rhs);
 
-    SBTarget ();  // Required for SWIG.
+#ifndef SWIG
+    const lldb::SBTarget&
+    operator = (const lldb::SBTarget& rhs);
+#endif
 
     //------------------------------------------------------------------
     // Destructor

Modified: lldb/trunk/include/lldb/API/SBType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBType.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBType.h (original)
+++ lldb/trunk/include/lldb/API/SBType.h Fri Nov  5 18:17:00 2010
@@ -22,8 +22,15 @@
 
     SBType (void *ast = NULL, void *clang_type = NULL);
     
+    SBType (const SBType &rhs);
+
     ~SBType ();
 
+#ifndef SWIG
+    const SBType &
+    operator =(const SBType &rhs);
+#endif
+
     bool
     IsValid();
 
@@ -68,6 +75,13 @@
 
     SBTypeMember ();
     
+    SBTypeMember (const SBTypeMember &rhs);
+
+#ifndef SWIG
+    const SBTypeMember&
+    operator =(const SBTypeMember &rhs);
+#endif
+
     ~SBTypeMember ();
 
     bool

Modified: lldb/trunk/include/lldb/API/SBValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValue.h?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValue.h (original)
+++ lldb/trunk/include/lldb/API/SBValue.h Fri Nov  5 18:17:00 2010
@@ -21,6 +21,13 @@
 public:
     SBValue ();
 
+    SBValue (const SBValue &rhs);
+
+#ifndef SWIG
+    const SBValue &
+    operator =(const SBValue &rhs);
+#endif
+
     ~SBValue ();
 
     bool

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Nov  5 18:17:00 2010
@@ -2438,6 +2438,7 @@
 			isa = PBXProject;
 			buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "lldb" */;
 			compatibilityVersion = "Xcode 3.1";
+			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				en,
@@ -2997,9 +2998,9 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 29;
+				CURRENT_PROJECT_VERSION = 30;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 29;
+				DYLIB_CURRENT_VERSION = 30;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -3050,11 +3051,11 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 29;
+				CURRENT_PROJECT_VERSION = 30;
 				DEAD_CODE_STRIPPING = YES;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 29;
+				DYLIB_CURRENT_VERSION = 30;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -3124,7 +3125,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 29;
+				CURRENT_PROJECT_VERSION = 30;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -3159,11 +3160,11 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 29;
+				CURRENT_PROJECT_VERSION = 30;
 				DEAD_CODE_STRIPPING = YES;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 29;
+				DYLIB_CURRENT_VERSION = 30;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -3212,7 +3213,7 @@
 			buildSettings = {
 				CODE_SIGN_IDENTITY = lldb_codesign;
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 29;
+				CURRENT_PROJECT_VERSION = 30;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -3251,7 +3252,7 @@
 				);
 				CODE_SIGN_IDENTITY = lldb_codesign;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 29;
+				CURRENT_PROJECT_VERSION = 30;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",

Modified: lldb/trunk/resources/LLDB-Info.plist
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/resources/LLDB-Info.plist?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/resources/LLDB-Info.plist (original)
+++ lldb/trunk/resources/LLDB-Info.plist Fri Nov  5 18:17:00 2010
@@ -17,7 +17,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>29</string>
+	<string>30</string>
 	<key>CFBundleName</key>
 	<string>${EXECUTABLE_NAME}</string>
 </dict>

Modified: lldb/trunk/source/API/SBBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBlock.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBlock.cpp (original)
+++ lldb/trunk/source/API/SBBlock.cpp Fri Nov  5 18:17:00 2010
@@ -28,6 +28,18 @@
 {
 }
 
+SBBlock::SBBlock(const SBBlock &rhs) :
+    m_opaque_ptr (rhs.m_opaque_ptr)
+{
+}
+
+const SBBlock &
+SBBlock::operator = (const SBBlock &rhs)
+{
+    m_opaque_ptr = rhs.m_opaque_ptr;
+    return *this;
+}
+
 SBBlock::~SBBlock ()
 {
     m_opaque_ptr = NULL;

Modified: lldb/trunk/source/API/SBBreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpointLocation.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpointLocation.cpp (original)
+++ lldb/trunk/source/API/SBBreakpointLocation.cpp Fri Nov  5 18:17:00 2010
@@ -25,7 +25,8 @@
 using namespace lldb_private;
 
 
-SBBreakpointLocation::SBBreakpointLocation ()
+SBBreakpointLocation::SBBreakpointLocation () :
+    m_opaque_sp ()
 {
 }
 
@@ -43,6 +44,20 @@
     }
 }
 
+SBBreakpointLocation::SBBreakpointLocation(const SBBreakpointLocation &rhs) :
+    m_opaque_sp (rhs.m_opaque_sp)
+{
+}
+
+const SBBreakpointLocation &
+SBBreakpointLocation::operator = (const SBBreakpointLocation &rhs)
+{
+    if (this != &rhs)
+        m_opaque_sp = rhs.m_opaque_sp;
+    return *this;
+}
+
+
 SBBreakpointLocation::~SBBreakpointLocation ()
 {
 }

Modified: lldb/trunk/source/API/SBBroadcaster.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBroadcaster.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBroadcaster.cpp (original)
+++ lldb/trunk/source/API/SBBroadcaster.cpp Fri Nov  5 18:17:00 2010
@@ -20,36 +20,49 @@
 
 
 SBBroadcaster::SBBroadcaster () :
-    m_opaque (NULL),
-    m_opaque_owned (false)
+    m_opaque_sp (),
+    m_opaque_ptr (NULL)
 {
-    Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE);
-
-    if (log)
-        log->Printf ("SBBroadcastetr::SBBroadcaster () => SBBroadcaster(%p)", this);
 }
 
-
 SBBroadcaster::SBBroadcaster (const char *name) :
-    m_opaque (new Broadcaster (name)),
-    m_opaque_owned (true)
+    m_opaque_sp (new Broadcaster (name)),
+    m_opaque_ptr (NULL)
 {
+    m_opaque_ptr = m_opaque_sp.get();
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE);
 
     if (log)
         log->Printf ("SBBroadcaster::SBBroadcaster (name=\"%s\") => SBBroadcaster(%p)",
-                     name, m_opaque);
+                     name, m_opaque_ptr);
 }
 
 SBBroadcaster::SBBroadcaster (lldb_private::Broadcaster *broadcaster, bool owns) :
-    m_opaque (broadcaster),
-    m_opaque_owned (owns)
+    m_opaque_sp (owns ? broadcaster : NULL),
+    m_opaque_ptr (broadcaster)
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE);
 
     if (log)
-        log->Printf ("SBBroadcaster::SBBroadcaster (broadcaster=%p, bool owns=%i) "
-                     " => SBBroadcaster(%p)", broadcaster, owns, m_opaque);
+        log->Printf ("SBBroadcaster::SBBroadcaster (broadcaster=%p, bool owns=%i) => SBBroadcaster(%p)", 
+                     broadcaster, owns, m_opaque_ptr);
+}
+
+SBBroadcaster::SBBroadcaster (const SBBroadcaster &rhs) :
+    m_opaque_sp (rhs.m_opaque_sp),
+    m_opaque_ptr (rhs.m_opaque_ptr) 
+{
+}
+
+const SBBroadcaster &
+SBBroadcaster::operator = (const SBBroadcaster &rhs)
+{
+    if (this != &rhs)
+    {
+        m_opaque_sp = rhs.m_opaque_sp;
+        m_opaque_ptr = rhs.m_opaque_ptr;
+    }
+    return *this;
 }
 
 SBBroadcaster::~SBBroadcaster()
@@ -63,15 +76,15 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBBroadcaster(%p)::BroadcastEventByType (event_type=0x%8.8x, unique=%i)", m_opaque, event_type, unique);
+        log->Printf ("SBBroadcaster(%p)::BroadcastEventByType (event_type=0x%8.8x, unique=%i)", m_opaque_ptr, event_type, unique);
 
-    if (m_opaque == NULL)
+    if (m_opaque_ptr == NULL)
         return;
 
     if (unique)
-        m_opaque->BroadcastEventIfUnique (event_type);
+        m_opaque_ptr->BroadcastEventIfUnique (event_type);
     else
-        m_opaque->BroadcastEvent (event_type);
+        m_opaque_ptr->BroadcastEvent (event_type);
 }
 
 void
@@ -80,16 +93,16 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBBroadcaster(%p)::BroadcastEventByType (SBEvent(%p), unique=%i)", m_opaque, event.get(), unique);
+        log->Printf ("SBBroadcaster(%p)::BroadcastEventByType (SBEvent(%p), unique=%i)", m_opaque_ptr, event.get(), unique);
 
-    if (m_opaque == NULL)
+    if (m_opaque_ptr == NULL)
         return;
 
     EventSP event_sp = event.GetSP ();
     if (unique)
-        m_opaque->BroadcastEventIfUnique (event_sp);
+        m_opaque_ptr->BroadcastEventIfUnique (event_sp);
     else
-        m_opaque->BroadcastEvent (event_sp);
+        m_opaque_ptr->BroadcastEvent (event_sp);
 }
 
 void
@@ -97,74 +110,75 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
     if (log)
-        log->Printf ("SBBroadcaster(%p)::AddInitialEventsToListener (SBListener(%p), event_mask=0x%8.8x)", m_opaque, listener.get(), requested_events);
-    if (m_opaque)
-        m_opaque->AddInitialEventsToListener (listener.get(), requested_events);
+        log->Printf ("SBBroadcaster(%p)::AddInitialEventsToListener (SBListener(%p), event_mask=0x%8.8x)", m_opaque_ptr, listener.get(), requested_events);
+    if (m_opaque_ptr)
+        m_opaque_ptr->AddInitialEventsToListener (listener.get(), requested_events);
 }
 
 uint32_t
 SBBroadcaster::AddListener (const SBListener &listener, uint32_t event_mask)
 {
-    if (m_opaque)
-        return m_opaque->AddListener (listener.get(), event_mask);
+    if (m_opaque_ptr)
+        return m_opaque_ptr->AddListener (listener.get(), event_mask);
     return 0;
 }
 
 const char *
 SBBroadcaster::GetName () const
 {
-    if (m_opaque)
-        return m_opaque->GetBroadcasterName().GetCString();
+    if (m_opaque_ptr)
+        return m_opaque_ptr->GetBroadcasterName().GetCString();
     return NULL;
 }
 
 bool
 SBBroadcaster::EventTypeHasListeners (uint32_t event_type)
 {
-    if (m_opaque)
-        return m_opaque->EventTypeHasListeners (event_type);
+    if (m_opaque_ptr)
+        return m_opaque_ptr->EventTypeHasListeners (event_type);
     return false;
 }
 
 bool
 SBBroadcaster::RemoveListener (const SBListener &listener, uint32_t event_mask)
 {
-    if (m_opaque)
-        return m_opaque->RemoveListener (listener.get(), event_mask);
+    if (m_opaque_ptr)
+        return m_opaque_ptr->RemoveListener (listener.get(), event_mask);
     return false;
 }
 
 Broadcaster *
 SBBroadcaster::get () const
 {
-    return m_opaque;
+    return m_opaque_ptr;
 }
 
 void
 SBBroadcaster::reset (Broadcaster *broadcaster, bool owns)
 {
-    if (m_opaque && m_opaque_owned)
-        delete m_opaque;
-    m_opaque = broadcaster;
-    m_opaque_owned = owns;
+    if (owns)
+        m_opaque_sp.reset (broadcaster);
+    else
+        m_opaque_sp.reset ();
+    m_opaque_ptr = broadcaster;
 }
 
 
 bool
 SBBroadcaster::IsValid () const
 {
-    return m_opaque != NULL;
+    return m_opaque_ptr != NULL;
 }
 
 bool
 SBBroadcaster::operator == (const SBBroadcaster &rhs) const
 {
-    return m_opaque == rhs.m_opaque;
+    return m_opaque_ptr == rhs.m_opaque_ptr;
     
 }
 
 bool
 SBBroadcaster::operator != (const SBBroadcaster &rhs) const
 {
-    return m_opaque != rhs.m_opaque;
+    return m_opaque_ptr != rhs.m_opaque_ptr;
 }

Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandInterpreter.cpp (original)
+++ lldb/trunk/source/API/SBCommandInterpreter.cpp Fri Nov  5 18:17:00 2010
@@ -40,6 +40,18 @@
                      " => SBCommandInterpreter(%p)", interpreter, m_opaque_ptr);
 }
 
+SBCommandInterpreter::SBCommandInterpreter(const SBCommandInterpreter &rhs) :
+    m_opaque_ptr (rhs.m_opaque_ptr)
+{
+}
+
+const SBCommandInterpreter &
+SBCommandInterpreter::operator = (const SBCommandInterpreter &rhs)
+{
+    m_opaque_ptr = rhs.m_opaque_ptr;
+    return *this;
+}
+
 SBCommandInterpreter::~SBCommandInterpreter ()
 {
 }

Modified: lldb/trunk/source/API/SBCommandReturnObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandReturnObject.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandReturnObject.cpp (original)
+++ lldb/trunk/source/API/SBCommandReturnObject.cpp Fri Nov  5 18:17:00 2010
@@ -21,6 +21,27 @@
 {
 }
 
+SBCommandReturnObject::SBCommandReturnObject (const SBCommandReturnObject &rhs):
+    m_opaque_ap ()
+{
+    if (rhs.m_opaque_ap.get())
+        m_opaque_ap.reset (new CommandReturnObject (*rhs.m_opaque_ap));
+}
+
+const SBCommandReturnObject &
+SBCommandReturnObject::operator = (const SBCommandReturnObject &rhs)
+{
+    if (this != &rhs)
+    {
+        if (rhs.m_opaque_ap.get())
+            m_opaque_ap.reset (new CommandReturnObject (*rhs.m_opaque_ap));
+        else
+            m_opaque_ap.reset();
+    }
+    return *this;
+}
+
+
 SBCommandReturnObject::~SBCommandReturnObject ()
 {
     // m_opaque_ap will automatically delete any pointer it owns

Modified: lldb/trunk/source/API/SBCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCompileUnit.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCompileUnit.cpp (original)
+++ lldb/trunk/source/API/SBCompileUnit.cpp Fri Nov  5 18:17:00 2010
@@ -29,6 +29,19 @@
 {
 }
 
+SBCompileUnit::SBCompileUnit(const SBCompileUnit &rhs) :
+    m_opaque_ptr (rhs.m_opaque_ptr)
+{
+}
+
+const SBCompileUnit &
+SBCompileUnit::operator = (const SBCompileUnit &rhs)
+{
+    m_opaque_ptr = rhs.m_opaque_ptr;
+    return *this;
+}
+
+
 SBCompileUnit::~SBCompileUnit ()
 {
     m_opaque_ptr = NULL;

Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Fri Nov  5 18:17:00 2010
@@ -85,6 +85,21 @@
 {
 }
 
+SBDebugger::SBDebugger(const SBDebugger &rhs) :
+    m_opaque_sp (rhs.m_opaque_sp)
+{
+}
+
+SBDebugger &
+SBDebugger::operator = (const SBDebugger &rhs)
+{
+    if (this != &rhs)
+    {
+        m_opaque_sp = rhs.m_opaque_sp;
+    }
+    return *this;
+}
+
 SBDebugger::~SBDebugger ()
 {
 }
@@ -355,7 +370,7 @@
 SBDebugger::GetSourceManager ()
 {
     static SourceManager g_lldb_source_manager;
-    static SBSourceManager g_sb_source_manager (g_lldb_source_manager);
+    static SBSourceManager g_sb_source_manager (&g_lldb_source_manager);
     return g_sb_source_manager;
 }
 

Modified: lldb/trunk/source/API/SBEvent.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBEvent.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBEvent.cpp (original)
+++ lldb/trunk/source/API/SBEvent.cpp Fri Nov  5 18:17:00 2010
@@ -25,22 +25,40 @@
 
 SBEvent::SBEvent () :
     m_event_sp (),
-    m_opaque (NULL)
+    m_opaque_ptr (NULL)
 {
 }
 
 SBEvent::SBEvent (uint32_t event_type, const char *cstr, uint32_t cstr_len) :
     m_event_sp (new Event (event_type, new EventDataBytes (cstr, cstr_len))),
-    m_opaque (m_event_sp.get())
+    m_opaque_ptr (m_event_sp.get())
 {
 }
 
 SBEvent::SBEvent (EventSP &event_sp) :
     m_event_sp (event_sp),
-    m_opaque (event_sp.get())
+    m_opaque_ptr (event_sp.get())
 {
 }
 
+SBEvent::SBEvent (const SBEvent &rhs) :
+    m_event_sp (rhs.m_event_sp),
+    m_opaque_ptr (rhs.m_opaque_ptr)
+{
+    
+}
+    
+const SBEvent &
+SBEvent::operator = (const SBEvent &rhs)
+{
+    if (this != &rhs)
+    {
+        m_event_sp = rhs.m_event_sp;
+        m_opaque_ptr = rhs.m_opaque_ptr;
+    }
+    return *this;
+}
+
 SBEvent::~SBEvent()
 {
 }
@@ -136,31 +154,31 @@
     // There is a dangerous accessor call GetSharedPtr which can be used, so if
     // we have anything valid in m_event_sp, we must use that since if it gets
     // used by a function that puts something in there, then it won't update
-    // m_opaque...
+    // m_opaque_ptr...
     if (m_event_sp)
-        m_opaque = m_event_sp.get();
+        m_opaque_ptr = m_event_sp.get();
 
-    return m_opaque;
+    return m_opaque_ptr;
 }
 
 void
 SBEvent::reset (EventSP &event_sp)
 {
     m_event_sp = event_sp;
-    m_opaque = m_event_sp.get();
+    m_opaque_ptr = m_event_sp.get();
 }
 
 void
 SBEvent::reset (Event* event_ptr)
 {
-    m_opaque = event_ptr;
+    m_opaque_ptr = event_ptr;
     m_event_sp.reset();
 }
 
 bool
 SBEvent::IsValid() const
 {
-    // Do NOT use m_opaque directly!!! Must use the SBEvent::get()
+    // Do NOT use m_opaque_ptr directly!!! Must use the SBEvent::get()
     // accessor. See comments in SBEvent::get()....
     return SBEvent::get() != NULL;
 
@@ -186,7 +204,7 @@
     if (get())
     {
         description.ref();
-        m_opaque->Dump (description.get());
+        m_opaque_ptr->Dump (description.get());
     }
     else
         description.Printf ("No value");
@@ -200,7 +218,7 @@
     if (get())
     {
         description.ref();
-        m_opaque->Dump (description.get());
+        m_opaque_ptr->Dump (description.get());
     }
     else
         description.Printf ("No value");

Modified: lldb/trunk/source/API/SBFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFrame.cpp (original)
+++ lldb/trunk/source/API/SBFrame.cpp Fri Nov  5 18:17:00 2010
@@ -63,6 +63,19 @@
     }
 }
 
+SBFrame::SBFrame(const SBFrame &rhs) :
+    m_opaque_sp (rhs.m_opaque_sp)
+{
+}
+
+const SBFrame &
+SBFrame::operator = (const SBFrame &rhs)
+{
+    if (this != &rhs)
+        m_opaque_sp = rhs.m_opaque_sp;
+    return *this;
+}
+
 SBFrame::~SBFrame()
 {
 }

Modified: lldb/trunk/source/API/SBFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFunction.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFunction.cpp (original)
+++ lldb/trunk/source/API/SBFunction.cpp Fri Nov  5 18:17:00 2010
@@ -32,6 +32,18 @@
 {
 }
 
+SBFunction::SBFunction (const lldb::SBFunction &rhs) :
+    m_opaque_ptr (rhs.m_opaque_ptr)
+{
+}
+
+const SBFunction &
+SBFunction::operator = (const SBFunction &rhs)
+{
+    m_opaque_ptr = rhs.m_opaque_ptr;
+    return *this;
+}
+
 SBFunction::~SBFunction ()
 {
     m_opaque_ptr = NULL;

Modified: lldb/trunk/source/API/SBInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBInstruction.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBInstruction.cpp (original)
+++ lldb/trunk/source/API/SBInstruction.cpp Fri Nov  5 18:17:00 2010
@@ -28,6 +28,19 @@
 {
 }
 
+SBInstruction::SBInstruction(const SBInstruction &rhs) :
+    m_opaque_sp (rhs.m_opaque_sp)
+{
+}
+
+const SBInstruction &
+SBInstruction::operator = (const SBInstruction &rhs)
+{
+    if (this != &rhs)
+        m_opaque_sp = rhs.m_opaque_sp;
+    return *this;
+}
+
 SBInstruction::~SBInstruction ()
 {
 }

Modified: lldb/trunk/source/API/SBInstructionList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBInstructionList.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBInstructionList.cpp (original)
+++ lldb/trunk/source/API/SBInstructionList.cpp Fri Nov  5 18:17:00 2010
@@ -22,6 +22,20 @@
 {
 }
 
+SBInstructionList::SBInstructionList(const SBInstructionList &rhs) :
+    m_opaque_sp (rhs.m_opaque_sp)
+{
+}
+
+const SBInstructionList &
+SBInstructionList::operator = (const SBInstructionList &rhs)
+{
+    if (this != &rhs)
+        m_opaque_sp = rhs.m_opaque_sp;
+    return *this;
+}
+
+
 SBInstructionList::~SBInstructionList ()
 {
 }

Modified: lldb/trunk/source/API/SBListener.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBListener.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBListener.cpp (original)
+++ lldb/trunk/source/API/SBListener.cpp Fri Nov  5 18:17:00 2010
@@ -23,15 +23,17 @@
 
 
 SBListener::SBListener () :
-    m_opaque_ptr (NULL),
-    m_opaque_ptr_owned (false)
+    m_opaque_sp (),
+    m_opaque_ptr (NULL)
 {
 }
 
 SBListener::SBListener (const char *name) :
-    m_opaque_ptr (new Listener (name)),
-    m_opaque_ptr_owned (true)
+    m_opaque_sp (new Listener (name)),
+    m_opaque_ptr (NULL)
 {
+    m_opaque_ptr = m_opaque_sp.get();
+
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
@@ -39,22 +41,32 @@
                      name, m_opaque_ptr);
 }
 
-SBListener::SBListener (Listener &listener) :
-    m_opaque_ptr (&listener),
-    m_opaque_ptr_owned (false)
+
+SBListener::SBListener (const SBListener &rhs) :
+    m_opaque_sp (rhs.m_opaque_sp),
+    m_opaque_ptr (rhs.m_opaque_ptr)
 {
 }
 
-SBListener::~SBListener ()
+const lldb::SBListener &
+SBListener::operator = (const lldb::SBListener &rhs)
 {
-    if (m_opaque_ptr_owned)
+    if (this != &rhs)
     {
-        if (m_opaque_ptr)
-        {
-            delete m_opaque_ptr;
-            m_opaque_ptr = NULL;
-        }
+        m_opaque_sp = rhs.m_opaque_sp;
+        m_opaque_ptr = rhs.m_opaque_ptr;
     }
+    return *this;
+}
+
+SBListener::SBListener (Listener &listener) :
+    m_opaque_sp (),
+    m_opaque_ptr (&listener)
+{
+}
+
+SBListener::~SBListener ()
+{
 }
 
 bool
@@ -365,11 +377,12 @@
 }
 
 void
-SBListener::reset(Listener *listener, bool transfer_ownership)
+SBListener::reset(Listener *listener, bool owns)
 {
-    if (m_opaque_ptr_owned && m_opaque_ptr)
-        delete m_opaque_ptr;
-    m_opaque_ptr_owned = transfer_ownership;
+    if (owns)
+        m_opaque_sp.reset (listener);
+    else
+        m_opaque_sp.reset ();
     m_opaque_ptr = listener;
 }
 

Modified: lldb/trunk/source/API/SBModule.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBModule.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBModule.cpp (original)
+++ lldb/trunk/source/API/SBModule.cpp Fri Nov  5 18:17:00 2010
@@ -30,6 +30,19 @@
 {
 }
 
+SBModule::SBModule(const SBModule &rhs) :
+    m_opaque_sp (rhs.m_opaque_sp)
+{
+}
+
+const SBModule &
+SBModule::operator = (const SBModule &rhs)
+{
+    if (this != &rhs)
+        m_opaque_sp = rhs.m_opaque_sp;
+    return *this;
+}
+
 SBModule::~SBModule ()
 {
 }

Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Fri Nov  5 18:17:00 2010
@@ -61,6 +61,14 @@
 {
 }
 
+const SBProcess&
+SBProcess::operator = (const SBProcess& rhs)
+{
+    if (this != &rhs)
+        m_opaque_sp = rhs.m_opaque_sp;
+    return *this;
+}
+
 //----------------------------------------------------------------------
 // Destructor
 //----------------------------------------------------------------------

Modified: lldb/trunk/source/API/SBSourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSourceManager.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSourceManager.cpp (original)
+++ lldb/trunk/source/API/SBSourceManager.cpp Fri Nov  5 18:17:00 2010
@@ -20,8 +20,8 @@
 using namespace lldb_private;
 
 
-SBSourceManager::SBSourceManager (SourceManager& source_manager) :
-    m_opaque_ref (source_manager)
+SBSourceManager::SBSourceManager (SourceManager* source_manager) :
+    m_opaque_ptr (source_manager)
 {
 }
 
@@ -29,6 +29,18 @@
 {
 }
 
+SBSourceManager::SBSourceManager(const SBSourceManager &rhs) :
+    m_opaque_ptr (rhs.m_opaque_ptr)
+{
+}
+
+const SBSourceManager &
+SBSourceManager::operator = (const SBSourceManager &rhs)
+{
+    m_opaque_ptr = rhs.m_opaque_ptr;
+    return *this;
+}
+
 size_t
 SBSourceManager::DisplaySourceLinesWithLineNumbers
 (
@@ -40,6 +52,9 @@
     FILE *f
 )
 {
+    if (m_opaque_ptr == NULL)
+        return 0;
+
     if (f == NULL)
         return 0;
 
@@ -48,18 +63,12 @@
         StreamFile str (f);
 
 
-        return m_opaque_ref.DisplaySourceLinesWithLineNumbers (*file,
-                                                               line,
-                                                               context_before,
-                                                               context_after,
-                                                               current_line_cstr,
-                                                               &str);
+        return m_opaque_ptr->DisplaySourceLinesWithLineNumbers (*file,
+                                                                line,
+                                                                context_before,
+                                                                context_after,
+                                                                current_line_cstr,
+                                                                &str);
     }
     return 0;
 }
-
-SourceManager &
-SBSourceManager::GetLLDBManager ()
-{
-    return m_opaque_ref;
-}

Modified: lldb/trunk/source/API/SBStringList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBStringList.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBStringList.cpp (original)
+++ lldb/trunk/source/API/SBStringList.cpp Fri Nov  5 18:17:00 2010
@@ -34,21 +34,23 @@
 }
 
 
-
-SBStringList::~SBStringList ()
-{
-}
-
-
 const SBStringList &
 SBStringList::operator = (const SBStringList &rhs)
 {
-    if (rhs.IsValid())
-        m_opaque_ap.reset (new lldb_private::StringList(*rhs));
-
+    if (this != &rhs)
+    {
+        if (rhs.IsValid())
+            m_opaque_ap.reset(new lldb_private::StringList(*rhs));
+        else
+            m_opaque_ap.reset();
+    }
     return *this;
 }
 
+SBStringList::~SBStringList ()
+{
+}
+
 const lldb_private::StringList *
 SBStringList::operator->() const
 {

Modified: lldb/trunk/source/API/SBSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSymbol.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSymbol.cpp (original)
+++ lldb/trunk/source/API/SBSymbol.cpp Fri Nov  5 18:17:00 2010
@@ -29,6 +29,19 @@
 {
 }
 
+SBSymbol::SBSymbol (const lldb::SBSymbol &rhs) :
+    m_opaque_ptr (rhs.m_opaque_ptr)
+{
+}
+
+const SBSymbol &
+SBSymbol::operator = (const SBSymbol &rhs)
+{
+    m_opaque_ptr = rhs.m_opaque_ptr;
+    return *this;
+}
+
+
 SBSymbol::~SBSymbol ()
 {
     m_opaque_ptr = NULL;

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Fri Nov  5 18:17:00 2010
@@ -64,6 +64,14 @@
 {
 }
 
+const SBTarget&
+SBTarget::operator = (const SBTarget& rhs)
+{
+    if (this != &rhs)
+        m_opaque_sp = rhs.m_opaque_sp;
+    return *this;
+}
+
 //----------------------------------------------------------------------
 // Destructor
 //----------------------------------------------------------------------

Modified: lldb/trunk/source/API/SBType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBType.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBType.cpp (original)
+++ lldb/trunk/source/API/SBType.cpp Fri Nov  5 18:17:00 2010
@@ -40,7 +40,21 @@
     m_type (clang_type)
 {
 }
-    
+
+SBType::SBType (const SBType &rhs) :
+    m_ast (rhs.m_ast),
+    m_type (rhs.m_type)
+{
+}
+
+const SBType &
+SBType::operator =(const SBType &rhs)
+{
+    m_ast = rhs.m_ast;
+    m_type = rhs.m_type;
+    return *this;
+}
+
 SBType::~SBType ()
 {
 }
@@ -212,6 +226,35 @@
 {
 }
 
+SBTypeMember::SBTypeMember (const SBTypeMember &rhs) :
+    m_ast (rhs.m_ast),
+    m_parent_type (rhs.m_parent_type),
+    m_member_type (rhs.m_member_type),
+    m_member_name (rhs.m_member_name),
+    m_offset (rhs.m_offset),
+    m_bit_size (rhs.m_bit_size),
+    m_bit_offset (rhs.m_bit_offset),
+    m_is_base_class (rhs.m_is_base_class)
+{
+}
+
+const SBTypeMember&
+SBTypeMember::operator =(const SBTypeMember &rhs)
+{
+    if (this != &rhs)
+    {
+        m_ast = rhs.m_ast;
+        m_parent_type = rhs.m_parent_type;
+        m_member_type = rhs.m_member_type;
+        m_member_name = rhs.m_member_name;
+        m_offset = rhs.m_offset;
+        m_bit_size = rhs.m_bit_size;
+        m_bit_offset = rhs.m_bit_offset;
+        m_is_base_class = rhs.m_is_base_class;
+    }
+    return *this;
+}
+
 SBTypeMember::~SBTypeMember ()
 {
     SetName (NULL);

Modified: lldb/trunk/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Fri Nov  5 18:17:00 2010
@@ -44,6 +44,19 @@
 {
 }
 
+SBValue::SBValue(const SBValue &rhs) :
+    m_opaque_sp (rhs.m_opaque_sp)
+{
+}
+
+const SBValue &
+SBValue::operator = (const SBValue &rhs)
+{
+    if (this != &rhs)
+        m_opaque_sp = rhs.m_opaque_sp;
+    return *this;
+}
+
 SBValue::~SBValue()
 {
 }

Modified: lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj?rev=118312&r1=118311&r2=118312&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj Fri Nov  5 18:17:00 2010
@@ -456,7 +456,7 @@
 					i386,
 				);
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 116;
+				CURRENT_PROJECT_VERSION = 117;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				STRIP_INSTALLED_PRODUCT = NO;
@@ -474,7 +474,7 @@
 					x86_64,
 					i386,
 				);
-				CURRENT_PROJECT_VERSION = 116;
+				CURRENT_PROJECT_VERSION = 117;
 				DEAD_CODE_STRIPPING = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -494,7 +494,7 @@
 					x86_64,
 					i386,
 				);
-				CURRENT_PROJECT_VERSION = 116;
+				CURRENT_PROJECT_VERSION = 117;
 				DEAD_CODE_STRIPPING = YES;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
@@ -511,7 +511,7 @@
 			buildSettings = {
 				"CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist";
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 116;
+				CURRENT_PROJECT_VERSION = 117;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks;
 				"FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = (
@@ -552,7 +552,7 @@
 				"CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist";
 				"CODE_SIGN_IDENTITY[sdk=macosx*]" = lldb_codesign;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 116;
+				CURRENT_PROJECT_VERSION = 117;
 				FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks;
 				"FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = (
 					"$(SDKROOT)/System/Library/PrivateFrameworks",
@@ -593,7 +593,7 @@
 				"CODE_SIGN_ENTITLEMENTS[sdk=iphoneos*]" = "source/debugserver-entitlements.plist";
 				"CODE_SIGN_IDENTITY[sdk=macosx*]" = lldb_codesign;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 116;
+				CURRENT_PROJECT_VERSION = 117;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				FRAMEWORK_SEARCH_PATHS = $SDKROOT/System/Library/PrivateFrameworks;
 				"FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*][arch=*]" = (





More information about the lldb-commits mailing list