[Lldb-commits] [lldb] r149853 - in /lldb/trunk: include/lldb/ include/lldb/API/ include/lldb/Core/ include/lldb/Symbol/ scripts/Python/ scripts/Python/interface/ source/API/ source/Plugins/SymbolFile/DWARF/ source/Symbol/ test/python_api/default-constructor/ test/python_api/module_section/ test/python_api/target/

Greg Clayton gclayton at apple.com
Sun Feb 5 17:44:55 PST 2012


Author: gclayton
Date: Sun Feb  5 19:44:54 2012
New Revision: 149853

URL: http://llvm.org/viewvc/llvm-project?rev=149853&view=rev
Log:
Removed all of the "#ifndef SWIG" from the SB header files since we are using
interface (.i) files for each class.

Changed the FindFunction class from:

uint32_t
SBTarget::FindFunctions (const char *name, 
                         uint32_t name_type_mask, 
                         bool append, 
                         lldb::SBSymbolContextList& sc_list)

uint32_t
SBModule::FindFunctions (const char *name, 
                         uint32_t name_type_mask, 
                         bool append, 
                         lldb::SBSymbolContextList& sc_list)

To:

lldb::SBSymbolContextList
SBTarget::FindFunctions (const char *name, 
                         uint32_t name_type_mask = lldb::eFunctionNameTypeAny);

lldb::SBSymbolContextList
SBModule::FindFunctions (const char *name,
                         uint32_t name_type_mask = lldb::eFunctionNameTypeAny);

This makes the API easier to use from python. Also added the ability to
append a SBSymbolContext or a SBSymbolContextList to a SBSymbolContextList.

Exposed properties for lldb.SBSymbolContextList in python:

lldb.SBSymbolContextList.modules => list() or all lldb.SBModule objects in the list
lldb.SBSymbolContextList.compile_units => list() or all lldb.SBCompileUnits objects in the list
lldb.SBSymbolContextList.functions => list() or all lldb.SBFunction objects in the list
lldb.SBSymbolContextList.blocks => list() or all lldb.SBBlock objects in the list
lldb.SBSymbolContextList.line_entries => list() or all lldb.SBLineEntry objects in the list
lldb.SBSymbolContextList.symbols => list() or all lldb.SBSymbol objects in the list

This allows a call to the SBTarget::FindFunctions(...) and SBModule::FindFunctions(...)
and then the result can be used to extract the desired information:

sc_list = lldb.target.FindFunctions("erase")

for function in sc_list.functions:
    print function
for symbol in sc_list.symbols:
    print symbol

Exposed properties for the lldb.SBSymbolContext objects in python:

lldb.SBSymbolContext.module => lldb.SBModule
lldb.SBSymbolContext.compile_unit => lldb.SBCompileUnit
lldb.SBSymbolContext.function => lldb.SBFunction
lldb.SBSymbolContext.block => lldb.SBBlock
lldb.SBSymbolContext.line_entry => lldb.SBLineEntry
lldb.SBSymbolContext.symbol => lldb.SBSymbol


Exposed properties for the lldb.SBBlock objects in python:

lldb.SBBlock.parent => lldb.SBBlock for the parent block that contains
lldb.SBBlock.sibling => lldb.SBBlock for the sibling block to the current block
lldb.SBBlock.first_child => lldb.SBBlock for the first child block to the current block
lldb.SBBlock.call_site => for inline functions, return a lldb.declaration object that gives the call site file, line and column
lldb.SBBlock.name => for inline functions this is the name of the inline function that this block represents
lldb.SBBlock.inlined_block => returns the inlined function block that contains this block (might return itself if the current block is an inlined block)
lldb.SBBlock.range[int] => access the address ranges for a block by index, a list() with start and end address is returned
lldb.SBBlock.ranges => an array or all address ranges for this block
lldb.SBBlock.num_ranges => the number of address ranges for this blcok

SBFunction objects can now get the SBType and the SBBlock that represents the
top scope of the function.

SBBlock objects can now get the variable list from the current block. The value
list returned allows varaibles to be viewed prior with no process if code
wants to check the variables in a function. There are two ways to get a variable
list from a SBBlock:

lldb::SBValueList
SBBlock::GetVariables (lldb::SBFrame& frame,
                       bool arguments,
                       bool locals,
                       bool statics,
                       lldb::DynamicValueType use_dynamic);

lldb::SBValueList
SBBlock::GetVariables (lldb::SBTarget& target,
                       bool arguments,
                       bool locals,
                       bool statics);

When a SBFrame is used, the values returned will be locked down to the frame
and the values will be evaluated in the context of that frame.

When a SBTarget is used, global an static variables can be viewed without a
running process.


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/SBCompileUnit.h
    lldb/trunk/include/lldb/API/SBData.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/SBFileSpec.h
    lldb/trunk/include/lldb/API/SBFileSpecList.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/SBLineEntry.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/SBSection.h
    lldb/trunk/include/lldb/API/SBSourceManager.h
    lldb/trunk/include/lldb/API/SBStream.h
    lldb/trunk/include/lldb/API/SBStringList.h
    lldb/trunk/include/lldb/API/SBSymbol.h
    lldb/trunk/include/lldb/API/SBSymbolContext.h
    lldb/trunk/include/lldb/API/SBSymbolContextList.h
    lldb/trunk/include/lldb/API/SBTarget.h
    lldb/trunk/include/lldb/API/SBThread.h
    lldb/trunk/include/lldb/API/SBType.h
    lldb/trunk/include/lldb/API/SBValue.h
    lldb/trunk/include/lldb/API/SBValueList.h
    lldb/trunk/include/lldb/Core/Module.h
    lldb/trunk/include/lldb/Symbol/ClangASTType.h
    lldb/trunk/include/lldb/Symbol/Function.h
    lldb/trunk/include/lldb/Symbol/SymbolContext.h
    lldb/trunk/include/lldb/Symbol/Type.h
    lldb/trunk/include/lldb/lldb-enumerations.h
    lldb/trunk/scripts/Python/interface/SBBlock.i
    lldb/trunk/scripts/Python/interface/SBFunction.i
    lldb/trunk/scripts/Python/interface/SBModule.i
    lldb/trunk/scripts/Python/interface/SBSymbolContext.i
    lldb/trunk/scripts/Python/interface/SBSymbolContextList.i
    lldb/trunk/scripts/Python/interface/SBTarget.i
    lldb/trunk/scripts/Python/python-extensions.swig
    lldb/trunk/source/API/SBAddress.cpp
    lldb/trunk/source/API/SBBlock.cpp
    lldb/trunk/source/API/SBFrame.cpp
    lldb/trunk/source/API/SBFunction.cpp
    lldb/trunk/source/API/SBModule.cpp
    lldb/trunk/source/API/SBSymbolContext.cpp
    lldb/trunk/source/API/SBSymbolContextList.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Symbol/SymbolContext.cpp
    lldb/trunk/source/Symbol/Type.cpp
    lldb/trunk/test/python_api/default-constructor/sb_module.py
    lldb/trunk/test/python_api/default-constructor/sb_target.py
    lldb/trunk/test/python_api/module_section/TestModuleAndSection.py
    lldb/trunk/test/python_api/target/TestTargetAPI.py

Modified: lldb/trunk/include/lldb/API/SBAddress.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBAddress.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBAddress.h (original)
+++ lldb/trunk/include/lldb/API/SBAddress.h Sun Feb  5 19:44:54 2012
@@ -30,10 +30,8 @@
 
     ~SBAddress ();
 
-#ifndef SWIG
     const lldb::SBAddress &
     operator = (const lldb::SBAddress &rhs);
-#endif
 
     bool
     IsValid () const;
@@ -119,8 +117,6 @@
     friend class SBThread;
     friend class SBValue;
 
-#ifndef SWIG
-
     lldb_private::Address *
     operator->();
 
@@ -136,9 +132,6 @@
     const lldb_private::Address &
     ref() const;
 
-#endif
-
-
     SBAddress (const lldb_private::Address *lldb_object_ptr);
 
     void

Modified: lldb/trunk/include/lldb/API/SBBlock.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBlock.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBlock.h (original)
+++ lldb/trunk/include/lldb/API/SBBlock.h Sun Feb  5 19:44:54 2012
@@ -11,6 +11,9 @@
 #define LLDB_SBBlock_h_
 
 #include "lldb/API/SBDefines.h"
+#include "lldb/API/SBFrame.h"
+#include "lldb/API/SBTarget.h"
+#include "lldb/API/SBValueList.h"
 
 namespace lldb {
 
@@ -24,10 +27,8 @@
 
     ~SBBlock ();
 
-#ifndef SWIG
     const lldb::SBBlock &
     operator = (const lldb::SBBlock &rhs);
-#endif
 
     bool
     IsInlined () const;
@@ -67,7 +68,19 @@
 
     uint32_t
     GetRangeIndexForBlockAddress (lldb::SBAddress block_addr);
+
+    lldb::SBValueList
+    GetVariables (lldb::SBFrame& frame,
+                  bool arguments,
+                  bool locals,
+                  bool statics,
+                  lldb::DynamicValueType use_dynamic);
     
+    lldb::SBValueList
+    GetVariables (lldb::SBTarget& target,
+                  bool arguments,
+                  bool locals,
+                  bool statics);
     //------------------------------------------------------------------
     /// Get the inlined block that contains this block.
     ///
@@ -87,23 +100,20 @@
 private:
     friend class SBAddress;
     friend class SBFrame;
+    friend class SBFunction;
     friend class SBSymbolContext;
 
-#ifndef SWIG
-
     lldb_private::Block *
-    get ();
+    GetPtr ();
 
     void
-    reset (lldb_private::Block *lldb_object_ptr);
+    SetPtr (lldb_private::Block *lldb_object_ptr);
 
     SBBlock (lldb_private::Block *lldb_object_ptr);
 
     void
     AppendVariables (bool can_create, bool get_parent_variables, lldb_private::VariableList *var_list);
 
-#endif
-
     lldb_private::Block *m_opaque_ptr;
 };
 

Modified: lldb/trunk/include/lldb/API/SBBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpoint.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBreakpoint.h (original)
+++ lldb/trunk/include/lldb/API/SBBreakpoint.h Sun Feb  5 19:44:54 2012
@@ -29,7 +29,6 @@
 
     ~SBBreakpoint();
 
-#ifndef SWIG
     const lldb::SBBreakpoint &
     operator = (const lldb::SBBreakpoint& rhs);
     
@@ -38,8 +37,6 @@
     bool
     operator == (const lldb::SBBreakpoint& rhs);
 
-#endif
-
     break_id_t
     GetID () const;
 
@@ -133,8 +130,6 @@
 
     SBBreakpoint (const lldb::BreakpointSP &bp_sp);
 
-#ifndef SWIG
-
     lldb_private::Breakpoint *
     operator->() const;
 
@@ -147,8 +142,6 @@
     const lldb::BreakpointSP &
     operator *() const;
 
-#endif
-
     static bool
     PrivateBreakpointHitCallback (void *baton, 
                                   lldb_private::StoppointCallbackContext *context, 

Modified: lldb/trunk/include/lldb/API/SBBreakpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpointLocation.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBreakpointLocation.h (original)
+++ lldb/trunk/include/lldb/API/SBBreakpointLocation.h Sun Feb  5 19:44:54 2012
@@ -25,10 +25,8 @@
 
     ~SBBreakpointLocation ();
 
-#ifndef SWIG
     const lldb::SBBreakpointLocation &
     operator = (const lldb::SBBreakpointLocation &rhs);
-#endif
 
     bool
     IsValid() const;
@@ -90,9 +88,7 @@
     SBBreakpoint
     GetBreakpoint ();
 
-#ifndef SWIG
     SBBreakpointLocation (const lldb::BreakpointLocationSP &break_loc_sp);
-#endif
 
 private:
     friend class SBBreakpoint;

Modified: lldb/trunk/include/lldb/API/SBBroadcaster.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBroadcaster.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBroadcaster.h (original)
+++ lldb/trunk/include/lldb/API/SBBroadcaster.h Sun Feb  5 19:44:54 2012
@@ -23,10 +23,8 @@
 
     SBBroadcaster (const SBBroadcaster &rhs);
     
-#ifndef SWIG
     const SBBroadcaster &
     operator = (const SBBroadcaster &rhs);
-#endif
 
     ~SBBroadcaster();
 
@@ -57,7 +55,6 @@
     bool
     RemoveListener (const lldb::SBListener &listener, uint32_t event_mask = UINT32_MAX);
 
-#ifndef SWIG
     // This comparison is checking if the internal opaque pointer value
     // is equal to that in "rhs".
     bool
@@ -74,8 +71,6 @@
     bool
     operator < (const lldb::SBBroadcaster &rhs) const;
 
-#endif
-
 protected:
     friend class SBCommandInterpreter;
     friend class SBCommunication;
@@ -86,16 +81,12 @@
 
     SBBroadcaster (lldb_private::Broadcaster *broadcaster, bool owns);
 
-#ifndef SWIG
-
     lldb_private::Broadcaster *
     get () const;
 
     void
     reset (lldb_private::Broadcaster *broadcaster, bool owns);
 
-#endif
-
 private:
     lldb::BroadcasterSP m_opaque_sp;
     lldb_private::Broadcaster *m_opaque_ptr;

Modified: lldb/trunk/include/lldb/API/SBCommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandInterpreter.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/API/SBCommandInterpreter.h Sun Feb  5 19:44:54 2012
@@ -28,10 +28,8 @@
 
     SBCommandInterpreter (const lldb::SBCommandInterpreter &rhs);
     
-#ifndef SWIG
     const lldb::SBCommandInterpreter &
     operator = (const lldb::SBCommandInterpreter &rhs);
-#endif
 
     ~SBCommandInterpreter ();
 
@@ -74,7 +72,6 @@
     lldb::ReturnStatus
     HandleCommand (const char *command_line, lldb::SBCommandReturnObject &result, bool add_to_history = false);
 
-#ifndef SWIG
     // This interface is not useful in SWIG, since the cursor & last_char arguments are string pointers INTO current_line
     // and you can't do that in a scripting language interface in general... 
     int
@@ -84,7 +81,7 @@
                       int match_start_point,
                       int max_return_elements,
                       lldb::SBStringList &matches);
-#endif                      
+
     int
     HandleCompletion (const char *current_line,
                       uint32_t cursor_pos,

Modified: lldb/trunk/include/lldb/API/SBCommandReturnObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandReturnObject.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommandReturnObject.h (original)
+++ lldb/trunk/include/lldb/API/SBCommandReturnObject.h Sun Feb  5 19:44:54 2012
@@ -24,8 +24,6 @@
 
     SBCommandReturnObject (const lldb::SBCommandReturnObject &rhs);
 
-#ifndef SWIG
-
     const lldb::SBCommandReturnObject &
     operator = (const lldb::SBCommandReturnObject &rhs);
     
@@ -34,7 +32,6 @@
     
     lldb_private::CommandReturnObject *
     Release ();
-#endif
 
     ~SBCommandReturnObject ();
 
@@ -93,9 +90,6 @@
     friend class SBCommandInterpreter;
     friend class SBOptions;
 
-
-#ifndef SWIG
-
     lldb_private::CommandReturnObject *
     operator->() const;
 
@@ -108,7 +102,6 @@
     lldb_private::CommandReturnObject &
     ref() const;
 
-#endif
     void
     SetLLDBObjectPtr (lldb_private::CommandReturnObject *ptr);
 

Modified: lldb/trunk/include/lldb/API/SBCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCompileUnit.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCompileUnit.h (original)
+++ lldb/trunk/include/lldb/API/SBCompileUnit.h Sun Feb  5 19:44:54 2012
@@ -25,10 +25,8 @@
 
     ~SBCompileUnit ();
 
-#ifndef SWIG
     const lldb::SBCompileUnit &
     operator = (const lldb::SBCompileUnit &rhs);
-#endif
 
     bool
     IsValid () const;
@@ -53,16 +51,12 @@
                         lldb::SBFileSpec *inline_file_spec,
                         bool exact) const;
 
-#ifndef SWIG
-
     bool
     operator == (const lldb::SBCompileUnit &rhs) const;
 
     bool
     operator != (const lldb::SBCompileUnit &rhs) const;
 
-#endif
-
     bool
     GetDescription (lldb::SBStream &description);
 
@@ -73,8 +67,6 @@
 
     SBCompileUnit (lldb_private::CompileUnit *lldb_object_ptr);
 
-#ifndef SWIG
-
     const lldb_private::CompileUnit *
     operator->() const;
 
@@ -87,8 +79,6 @@
     void
     reset (lldb_private::CompileUnit *lldb_object_ptr);
 
-#endif
-
     lldb_private::CompileUnit *m_opaque_ptr;
 };
 

Modified: lldb/trunk/include/lldb/API/SBData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBData.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBData.h (original)
+++ lldb/trunk/include/lldb/API/SBData.h Sun Feb  5 19:44:54 2012
@@ -22,10 +22,8 @@
 
     SBData (const SBData &rhs);
     
-#ifndef SWIG
     const SBData &
     operator = (const SBData &rhs);
-#endif
 
     ~SBData ();
     
@@ -149,7 +147,6 @@
     
 protected:
     
-#ifndef SWIG
     // Mimic shared pointer...
     lldb_private::DataExtractor *
     get() const;
@@ -162,7 +159,6 @@
     
     const lldb::DataExtractorSP &
     operator*() const;
-#endif
 
     SBData (const lldb::DataExtractorSP &data_sp);
 

Modified: lldb/trunk/include/lldb/API/SBDebugger.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDebugger.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBDebugger.h (original)
+++ lldb/trunk/include/lldb/API/SBDebugger.h Sun Feb  5 19:44:54 2012
@@ -42,12 +42,10 @@
 
     SBDebugger(const lldb::SBDebugger &rhs);
 
-#ifndef SWIG
     SBDebugger(const lldb::DebuggerSP &debugger_sp);
     
     lldb::SBDebugger &
     operator = (const lldb::SBDebugger &rhs);
-#endif
     
     ~SBDebugger();
 
@@ -245,8 +243,6 @@
 
 private:
 
-#ifndef SWIG
-
     friend class SBInputReader;
     friend class SBProcess;
     friend class SBSourceManager;
@@ -266,7 +262,6 @@
 
     const lldb::DebuggerSP &
     get_sp () const;
-#endif
     
     lldb::DebuggerSP m_opaque_sp;
 

Modified: lldb/trunk/include/lldb/API/SBError.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBError.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBError.h (original)
+++ lldb/trunk/include/lldb/API/SBError.h Sun Feb  5 19:44:54 2012
@@ -22,13 +22,9 @@
 
     ~SBError();
 
-#ifndef SWIG
-
     const SBError &
     operator =(const lldb::SBError &rhs);
 
-#endif
-
     const char *
     GetCString () const;
 
@@ -70,7 +66,6 @@
 
 protected:
 
-#ifndef SWIG
     friend class SBArguments;
     friend class SBData;
     friend class SBDebugger;
@@ -95,9 +90,6 @@
     lldb_private::Error &
     ref();
 
-#endif
-
-
     void
     SetError (const lldb_private::Error &lldb_error);
 

Modified: lldb/trunk/include/lldb/API/SBEvent.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBEvent.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBEvent.h (original)
+++ lldb/trunk/include/lldb/API/SBEvent.h Sun Feb  5 19:44:54 2012
@@ -32,10 +32,8 @@
 
     ~SBEvent();
 
-#ifndef SWIG
     const SBEvent &
     operator = (const lldb::SBEvent &rhs);
-#endif
 
     bool
     IsValid() const;
@@ -49,10 +47,8 @@
     lldb::SBBroadcaster
     GetBroadcaster () const;
 
-#ifndef SWIG
     bool
     BroadcasterMatchesPtr (const lldb::SBBroadcaster *broadcaster);
-#endif
 
     bool
     BroadcasterMatchesRef (const lldb::SBBroadcaster &broadcaster);
@@ -63,10 +59,8 @@
     static const char *
     GetCStringFromEvent (const lldb::SBEvent &event);
 
-#ifndef SWIG
     bool
     GetDescription (lldb::SBStream &description);
-#endif
 
     bool
     GetDescription (lldb::SBStream &description) const;
@@ -80,8 +74,6 @@
 
     SBEvent (lldb::EventSP &event_sp);
 
-#ifndef SWIG
-
     lldb::EventSP &
     GetSP () const;
 
@@ -94,8 +86,6 @@
     lldb_private::Event *
     get () const;
 
-#endif
-
 private:
 
     mutable lldb::EventSP m_event_sp;

Modified: lldb/trunk/include/lldb/API/SBFileSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFileSpec.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFileSpec.h (original)
+++ lldb/trunk/include/lldb/API/SBFileSpec.h Sun Feb  5 19:44:54 2012
@@ -27,10 +27,8 @@
 
     ~SBFileSpec ();
 
-#ifndef SWIG
     const SBFileSpec &
     operator = (const lldb::SBFileSpec &rhs);
-#endif
 
     bool
     IsValid() const;
@@ -70,7 +68,6 @@
 
     void
     SetFileSpec (const lldb_private::FileSpec& fs);
-#ifndef SWIG
 
     const lldb_private::FileSpec *
     operator->() const;
@@ -84,8 +81,6 @@
     const lldb_private::FileSpec &
     ref() const;
 
-#endif
-
     std::auto_ptr <lldb_private::FileSpec> m_opaque_ap;
 };
 

Modified: lldb/trunk/include/lldb/API/SBFileSpecList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFileSpecList.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFileSpecList.h (original)
+++ lldb/trunk/include/lldb/API/SBFileSpecList.h Sun Feb  5 19:44:54 2012
@@ -23,10 +23,8 @@
 
     ~SBFileSpecList ();
 
-#ifndef SWIG
     const SBFileSpecList &
     operator = (const lldb::SBFileSpecList &rhs);
-#endif
 
     uint32_t
     GetSize () const;
@@ -53,8 +51,6 @@
 
 friend class SBTarget;
 
-#ifndef SWIG
-
     const lldb_private::FileSpecList *
     operator->() const;
 
@@ -67,8 +63,6 @@
     const lldb_private::FileSpecList &
     ref() const;
 
-#endif
-
     std::auto_ptr <lldb_private::FileSpecList> m_opaque_ap;
 };
 

Modified: lldb/trunk/include/lldb/API/SBFrame.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFrame.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFrame.h (original)
+++ lldb/trunk/include/lldb/API/SBFrame.h Sun Feb  5 19:44:54 2012
@@ -24,10 +24,8 @@
 
     SBFrame (const lldb::SBFrame &rhs);
     
-#ifndef SWIG
     const lldb::SBFrame &
     operator =(const lldb::SBFrame &rhs);
-#endif
 
    ~SBFrame();
 
@@ -130,15 +128,12 @@
     void
     Clear();
 
-#ifndef SWIG
     bool
     operator == (const lldb::SBFrame &rhs) const;
 
     bool
     operator != (const lldb::SBFrame &rhs) const;
 
-#endif
-
     /// The version that doesn't supply a 'use_dynamic' value will use the
     /// target's default.
     lldb::SBValueList
@@ -208,16 +203,14 @@
     bool
     GetDescription (lldb::SBStream &description);
 
-#ifndef SWIG
     SBFrame (const lldb::StackFrameSP &lldb_object_sp);
-#endif
 
 protected:
-    friend class SBValue;
 
-private:
-    friend class SBThread;
+    friend class SBBlock;
     friend class SBInstruction;
+    friend class SBThread;
+    friend class SBValue;
 #ifndef LLDB_DISABLE_PYTHON
     friend class lldb_private::ScriptInterpreterPython;
 #endif

Modified: lldb/trunk/include/lldb/API/SBFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFunction.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFunction.h (original)
+++ lldb/trunk/include/lldb/API/SBFunction.h Sun Feb  5 19:44:54 2012
@@ -24,11 +24,8 @@
 
     SBFunction (const lldb::SBFunction &rhs);
 
-#ifndef SWIG
     const lldb::SBFunction &
     operator = (const lldb::SBFunction &rhs);
-#endif
-
 
     ~SBFunction ();
 
@@ -44,38 +41,38 @@
     lldb::SBInstructionList
     GetInstructions (lldb::SBTarget target);
 
-    SBAddress
+    lldb::SBAddress
     GetStartAddress ();
 
-    SBAddress
+    lldb::SBAddress
     GetEndAddress ();
 
     uint32_t
     GetPrologueByteSize ();
 
-#ifndef SWIG
+    lldb::SBType
+    GetType ();
+
+    lldb::SBBlock
+    GetBlock ();
+
     bool
     operator == (const lldb::SBFunction &rhs) const;
 
     bool
     operator != (const lldb::SBFunction &rhs) const;
-#endif
 
     bool
     GetDescription (lldb::SBStream &description);
 
 protected:
 
-#ifndef SWIG
-
     lldb_private::Function *
     get ();
 
     void
     reset (lldb_private::Function *lldb_object_ptr);
 
-#endif
-
 private:
     friend class SBAddress;
     friend class SBFrame;

Modified: lldb/trunk/include/lldb/API/SBInputReader.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInputReader.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBInputReader.h (original)
+++ lldb/trunk/include/lldb/API/SBInputReader.h Sun Feb  5 19:44:54 2012
@@ -45,10 +45,8 @@
     bool
     IsValid () const;
 
-#ifndef SWIG
     const lldb::SBInputReader &
     operator = (const lldb::SBInputReader &rhs);
-#endif
 
     bool
     IsActive () const;
@@ -65,8 +63,6 @@
 protected:
     friend class SBDebugger;
 
-#ifndef SWIG
-
     lldb_private::InputReader *
     operator->() const;
 
@@ -82,9 +78,6 @@
     lldb_private::InputReader &
     ref() const;
 
-#endif
-
-
 private:
 
     static size_t

Modified: lldb/trunk/include/lldb/API/SBInstruction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInstruction.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBInstruction.h (original)
+++ lldb/trunk/include/lldb/API/SBInstruction.h Sun Feb  5 19:44:54 2012
@@ -28,10 +28,8 @@
 
     SBInstruction (const SBInstruction &rhs);
     
-#ifndef SWIG
     const SBInstruction &
     operator = (const SBInstruction &rhs);
-#endif
 
     ~SBInstruction ();
 

Modified: lldb/trunk/include/lldb/API/SBInstructionList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInstructionList.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBInstructionList.h (original)
+++ lldb/trunk/include/lldb/API/SBInstructionList.h Sun Feb  5 19:44:54 2012
@@ -24,10 +24,8 @@
 
     SBInstructionList (const SBInstructionList &rhs);
     
-#ifndef SWIG
     const SBInstructionList &
     operator = (const SBInstructionList &rhs);
-#endif
 
     ~SBInstructionList ();
 

Modified: lldb/trunk/include/lldb/API/SBLineEntry.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBLineEntry.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBLineEntry.h (original)
+++ lldb/trunk/include/lldb/API/SBLineEntry.h Sun Feb  5 19:44:54 2012
@@ -26,10 +26,8 @@
 
     ~SBLineEntry ();
 
-#ifndef SWIG
     const lldb::SBLineEntry &
     operator = (const lldb::SBLineEntry &rhs);
-#endif
 
     lldb::SBAddress
     GetStartAddress () const;
@@ -58,15 +56,12 @@
     void
     SetColumn (uint32_t column);
 
-#ifndef SWIG
     bool
     operator == (const lldb::SBLineEntry &rhs) const;
 
     bool
     operator != (const lldb::SBLineEntry &rhs) const;
 
-#endif
-
     bool
     GetDescription (lldb::SBStream &description);
 
@@ -81,8 +76,6 @@
     friend class SBFrame;
     friend class SBSymbolContext;
 
-#ifndef SWIG
-
     const lldb_private::LineEntry *
     operator->() const;
 
@@ -92,9 +85,6 @@
     const lldb_private::LineEntry &
     ref() const;
 
-#endif
-
-
     SBLineEntry (const lldb_private::LineEntry *lldb_object_ptr);
 
     void

Modified: lldb/trunk/include/lldb/API/SBListener.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBListener.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBListener.h (original)
+++ lldb/trunk/include/lldb/API/SBListener.h Sun Feb  5 19:44:54 2012
@@ -25,10 +25,8 @@
 
     ~SBListener ();
 
-#ifndef SWIG
     const lldb::SBListener &
     operator = (const lldb::SBListener &rhs);
-#endif
 
     void
     AddEvent (const lldb::SBEvent &event);
@@ -100,8 +98,6 @@
 
 private:
 
-#ifndef SWIG
-
     lldb_private::Listener *
     operator->() const;
 
@@ -120,8 +116,6 @@
     void
     reset(lldb_private::Listener *listener, bool transfer_ownership);
 
-#endif
-
     lldb::ListenerSP m_opaque_sp;
     lldb_private::Listener *m_opaque_ptr;
 };

Modified: lldb/trunk/include/lldb/API/SBModule.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBModule.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBModule.h (original)
+++ lldb/trunk/include/lldb/API/SBModule.h Sun Feb  5 19:44:54 2012
@@ -25,11 +25,9 @@
     SBModule ();
 
     SBModule (const SBModule &rhs);
-    
-#ifndef SWIG
+
     const SBModule &
     operator = (const SBModule &rhs);
-#endif
 
     SBModule (lldb::SBProcess &process, 
               lldb::addr_t header_addr);
@@ -85,22 +83,18 @@
     const char *
     GetTriple ();
 
-#ifndef SWIG
     const uint8_t *
     GetUUIDBytes () const;
-#endif
 
     const char *
     GetUUIDString () const;
 
-#ifndef SWIG
     bool
     operator == (const lldb::SBModule &rhs) const;
 
     bool
     operator != (const lldb::SBModule &rhs) const;
 
-#endif
     lldb::SBSection
     FindSection (const char *sect_name);
 
@@ -138,22 +132,13 @@
     ///     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.
+    ///     A lldb::SBSymbolContextList that gets filled in with all of 
+    ///     the symbol contexts for all the matches.
     //------------------------------------------------------------------
-    uint32_t
+    lldb::SBSymbolContextList
     FindFunctions (const char *name, 
-                   uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits
-                   bool append, 
-                   lldb::SBSymbolContextList& sc_list);
+                   uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
 
     //------------------------------------------------------------------
     /// Find global and static variables by name.

Modified: lldb/trunk/include/lldb/API/SBProcess.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBProcess.h (original)
+++ lldb/trunk/include/lldb/API/SBProcess.h Sun Feb  5 19:44:54 2012
@@ -37,10 +37,8 @@
 
     SBProcess (const lldb::SBProcess& rhs);
 
-#ifndef SWIG
     const lldb::SBProcess&
     operator = (const lldb::SBProcess& rhs);
-#endif
 
     ~SBProcess();
 

Modified: lldb/trunk/include/lldb/API/SBSection.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSection.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSection.h (original)
+++ lldb/trunk/include/lldb/API/SBSection.h Sun Feb  5 19:44:54 2012
@@ -25,10 +25,9 @@
 
     ~SBSection ();
 
-#ifndef SWIG
     const lldb::SBSection &
     operator = (const lldb::SBSection &rhs);
-#endif
+
     bool
     IsValid () const;
 
@@ -66,21 +65,17 @@
     SectionType
     GetSectionType ();
 
-#ifndef SWIG
     bool
     operator == (const lldb::SBSection &rhs);
 
     bool
     operator != (const lldb::SBSection &rhs);
 
-#endif
-
     bool
     GetDescription (lldb::SBStream &description);
     
 private:
 
-#ifndef SWIG
     friend class SBAddress;
     friend class SBModule;
     friend class SBTarget;
@@ -92,7 +87,6 @@
     
     void
     SetSection (const lldb_private::Section *section);
-#endif
     
     std::auto_ptr<lldb_private::SectionImpl> m_opaque_ap;
 };

Modified: lldb/trunk/include/lldb/API/SBSourceManager.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSourceManager.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSourceManager.h (original)
+++ lldb/trunk/include/lldb/API/SBSourceManager.h Sun Feb  5 19:44:54 2012
@@ -25,10 +25,8 @@
     
     ~SBSourceManager();
 
-#ifndef SWIG
     const lldb::SBSourceManager &
     operator = (const lldb::SBSourceManager &rhs);
-#endif
 
     size_t
     DisplaySourceLinesWithLineNumbers (const lldb::SBFileSpec &file,

Modified: lldb/trunk/include/lldb/API/SBStream.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStream.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBStream.h (original)
+++ lldb/trunk/include/lldb/API/SBStream.h Sun Feb  5 19:44:54 2012
@@ -79,6 +79,7 @@
     friend class SBSourceManager;
     friend class SBSymbol;
     friend class SBSymbolContext;
+    friend class SBSymbolContextList;
     friend class SBTarget;
     friend class SBThread;
     friend class SBType;
@@ -86,8 +87,6 @@
     friend class SBValue;
     friend class SBWatchpoint;
 
-#ifndef SWIG
-
     lldb_private::Stream *
     operator->();
 
@@ -97,8 +96,6 @@
     lldb_private::Stream &
     ref();
 
-#endif
-
 private:
 
     DISALLOW_COPY_AND_ASSIGN (SBStream);

Modified: lldb/trunk/include/lldb/API/SBStringList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStringList.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBStringList.h (original)
+++ lldb/trunk/include/lldb/API/SBStringList.h Sun Feb  5 19:44:54 2012
@@ -22,10 +22,8 @@
 
     SBStringList (const lldb::SBStringList &rhs);
     
-#ifndef SWIG
     const SBStringList &
     operator = (const SBStringList &rhs);
-#endif
 
     ~SBStringList ();
 
@@ -55,16 +53,12 @@
 
     SBStringList (const lldb_private::StringList *lldb_strings);
 
-#ifndef SWIG
-
     const lldb_private::StringList *
     operator->() const;
 
     const lldb_private::StringList &
     operator*() const;
 
-#endif
-
 private:
 
     std::auto_ptr<lldb_private::StringList> m_opaque_ap;

Modified: lldb/trunk/include/lldb/API/SBSymbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbol.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSymbol.h (original)
+++ lldb/trunk/include/lldb/API/SBSymbol.h Sun Feb  5 19:44:54 2012
@@ -27,10 +27,8 @@
 
     SBSymbol (const lldb::SBSymbol &rhs);
 
-#ifndef SWIG
     const lldb::SBSymbol &
     operator = (const lldb::SBSymbol &rhs);
-#endif
 
     bool
     IsValid () const;
@@ -57,26 +55,22 @@
     SymbolType
     GetType ();
 
-#ifndef SWIG
     bool
     operator == (const lldb::SBSymbol &rhs) const;
 
     bool
     operator != (const lldb::SBSymbol &rhs) const;
-#endif
 
     bool
     GetDescription (lldb::SBStream &description);
 
 protected:
 
-#ifndef SWIG
     lldb_private::Symbol *
     get ();
 
     void
     reset (lldb_private::Symbol *);
-#endif
     
 private:
     friend class SBAddress;

Modified: lldb/trunk/include/lldb/API/SBSymbolContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbolContext.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSymbolContext.h (original)
+++ lldb/trunk/include/lldb/API/SBSymbolContext.h Sun Feb  5 19:44:54 2012
@@ -32,10 +32,8 @@
     bool
     IsValid () const;
 
-#ifndef SWIG
     const lldb::SBSymbolContext &
     operator = (const lldb::SBSymbolContext &rhs);
-#endif
 
     lldb::SBModule        GetModule ();
     lldb::SBCompileUnit   GetCompileUnit ();
@@ -66,8 +64,6 @@
     friend class SBTarget;
     friend class SBSymbolContextList;
 
-#ifndef SWIG
-
     lldb_private::SymbolContext*
     operator->() const;
 
@@ -80,8 +76,6 @@
     const lldb_private::SymbolContext&
     operator*() const;
 
-#endif
-
     lldb_private::SymbolContext *
     get() const;
 

Modified: lldb/trunk/include/lldb/API/SBSymbolContextList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbolContextList.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSymbolContextList.h (original)
+++ lldb/trunk/include/lldb/API/SBSymbolContextList.h Sun Feb  5 19:44:54 2012
@@ -24,10 +24,8 @@
 
     ~SBSymbolContextList ();
 
-#ifndef SWIG
     const lldb::SBSymbolContextList &
     operator = (const lldb::SBSymbolContextList &rhs);
-#endif
 
     bool
     IsValid () const;
@@ -35,10 +33,19 @@
     uint32_t
     GetSize() const;
 
-    SBSymbolContext
+    lldb::SBSymbolContext
     GetContextAtIndex (uint32_t idx);
+    
+    bool
+    GetDescription (lldb::SBStream &description);
 
     void
+    Append (lldb::SBSymbolContext &sc);
+    
+    void
+    Append (lldb::SBSymbolContextList &sc_list);
+    
+    void
     Clear();
 
 protected:
@@ -46,16 +53,12 @@
     friend class SBModule;
     friend class SBTarget;
 
-#ifndef SWIG
-
     lldb_private::SymbolContextList*
     operator->() const;
 
     lldb_private::SymbolContextList&
     operator*() const;
 
-#endif
-
 private:
     std::auto_ptr<lldb_private::SymbolContextList> m_opaque_ap;
 };

Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Sun Feb  5 19:44:54 2012
@@ -42,10 +42,8 @@
 
     SBTarget (const lldb::SBTarget& rhs);
 
-#ifndef SWIG
     const lldb::SBTarget&
     operator = (const lldb::SBTarget& rhs);
-#endif
 
     //------------------------------------------------------------------
     // Destructor
@@ -361,22 +359,13 @@
     ///     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.
+    ///     A lldb::SBSymbolContextList that gets filled in with all of 
+    ///     the symbol contexts for all the matches.
     //------------------------------------------------------------------
-    uint32_t
+    lldb::SBSymbolContextList
     FindFunctions (const char *name, 
-                   uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits
-                   bool append, 
-                   lldb::SBSymbolContextList& sc_list);
+                   uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
 
     //------------------------------------------------------------------
     /// Find global and static variables by name.
@@ -510,20 +499,18 @@
     lldb::SBInstructionList
     GetInstructions (lldb::addr_t base_addr, const void *buf, size_t size);
 
-#ifndef SWIG
     bool
     operator == (const lldb::SBTarget &rhs) const;
 
     bool
     operator != (const lldb::SBTarget &rhs) const;
 
-#endif
-
     bool
     GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level);
 
 protected:
     friend class SBAddress;
+    friend class SBBlock;
     friend class SBDebugger;
     friend class SBFunction;
     friend class SBInstruction;

Modified: lldb/trunk/include/lldb/API/SBThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBThread.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBThread.h (original)
+++ lldb/trunk/include/lldb/API/SBThread.h Sun Feb  5 19:44:54 2012
@@ -147,8 +147,6 @@
     lldb::SBProcess
     GetProcess ();
 
-#ifndef SWIG
-
     const lldb::SBThread &
     operator = (const lldb::SBThread &rhs);
 
@@ -158,8 +156,6 @@
     bool
     operator != (const lldb::SBThread &rhs) const;
 
-#endif
-
     bool
     GetDescription (lldb::SBStream &description) const;
 

Modified: lldb/trunk/include/lldb/API/SBType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBType.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBType.h (original)
+++ lldb/trunk/include/lldb/API/SBType.h Sun Feb  5 19:44:54 2012
@@ -24,11 +24,9 @@
     SBTypeMember (const lldb::SBTypeMember& rhs);
     
     ~SBTypeMember();
-    
-#ifndef SWIG
+
     lldb::SBTypeMember&
     operator = (const lldb::SBTypeMember& rhs);
-#endif
 
     bool
     IsValid() const;
@@ -52,7 +50,6 @@
 protected:
     friend class SBType;
 
-#ifndef SWIG
     void
     reset (lldb_private::TypeMemberImpl *);
 
@@ -61,7 +58,6 @@
 
     const lldb_private::TypeMemberImpl &
     ref () const;
-#endif
 
     std::auto_ptr<lldb_private::TypeMemberImpl> m_opaque_ap;
 };
@@ -147,7 +143,6 @@
     GetDescription (lldb::SBStream &description, 
                     lldb::DescriptionLevel description_level);
 
-#ifndef SWIG
     lldb::SBType &
     operator = (const lldb::SBType &rhs);
     
@@ -156,11 +151,9 @@
     
     bool
     operator != (lldb::SBType &rhs);
-#endif
     
 protected:
-    
-#ifndef SWIG
+
     lldb_private::TypeImpl &
     ref ();
     
@@ -171,17 +164,16 @@
     GetSP ();
 
     void
-    SetSP (const lldb::TypeImplSP &type_impl_sp);
-#endif
-    
+    SetSP (const lldb::TypeImplSP &type_impl_sp);    
 
     lldb::TypeImplSP m_opaque_sp;
     
+    friend class SBFunction;
     friend class SBModule;
     friend class SBTarget;
-    friend class SBValue;
     friend class SBTypeMember;
     friend class SBTypeList;
+    friend class SBValue;
         
     SBType (const lldb_private::ClangASTType &);
     SBType (const lldb::TypeSP &);

Modified: lldb/trunk/include/lldb/API/SBValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValue.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValue.h (original)
+++ lldb/trunk/include/lldb/API/SBValue.h Sun Feb  5 19:44:54 2012
@@ -24,10 +24,8 @@
 
     SBValue (const lldb::SBValue &rhs);
 
-#ifndef SWIG
     lldb::SBValue &
     operator =(const lldb::SBValue &rhs);
-#endif
 
     ~SBValue ();
 
@@ -339,7 +337,6 @@
     lldb::SBWatchpoint
     WatchPointee (bool resolve_location, bool read, bool write);
 
-#ifndef SWIG
     // this must be defined in the .h file because synthetic children as implemented in the core
     // currently rely on being able to extract the SharedPointer out of an SBValue. if the implementation
     // is deferred to the .cpp file instead of being inlined here, the platform will fail to link
@@ -349,7 +346,6 @@
     {
         return m_opaque_sp;
     }
-#endif
 
 protected:
     friend class SBValueList;

Modified: lldb/trunk/include/lldb/API/SBValueList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValueList.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValueList.h (original)
+++ lldb/trunk/include/lldb/API/SBValueList.h Sun Feb  5 19:44:54 2012
@@ -45,8 +45,6 @@
     lldb::SBValue
     FindValueObjectByUID (lldb::user_id_t uid);
 
-
-#ifndef SWIG
     const lldb::SBValueList &
     operator = (const lldb::SBValueList &rhs);
 
@@ -68,8 +66,6 @@
     lldb_private::ValueObjectList &
     ref ();
 
-#endif
-
 private:
     friend class SBFrame;
 

Modified: lldb/trunk/include/lldb/Core/Module.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Sun Feb  5 19:44:54 2012
@@ -132,7 +132,7 @@
     ///     be false and no module updated notification will need to
     ///     be sent out.
     ///
-    /// @returns
+    /// @return
     ///     /b True if any sections were successfully loaded in \a target,
     ///     /b false otherwise.
     //------------------------------------------------------------------

Modified: lldb/trunk/include/lldb/Symbol/ClangASTType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTType.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTType.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTType.h Sun Feb  5 19:44:54 2012
@@ -310,6 +310,13 @@
     static lldb::clang_type_t
     RemoveFastQualifiers (lldb::clang_type_t);
 
+    void
+    Clear()
+    {
+        m_type = NULL;
+        m_ast = NULL;
+    }
+
 private:
     lldb::clang_type_t m_type;
     clang::ASTContext *m_ast;

Modified: lldb/trunk/include/lldb/Symbol/Function.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Function.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Function.h (original)
+++ lldb/trunk/include/lldb/Symbol/Function.h Sun Feb  5 19:44:54 2012
@@ -463,7 +463,7 @@
     /// @param[out] line_no
     ///     The line number.
     //------------------------------------------------------------------
-   void
+    void
     GetEndLineSourceInfo (FileSpec &source_file, uint32_t &line_no);
 
     //------------------------------------------------------------------

Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContext.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolContext.h Sun Feb  5 19:44:54 2012
@@ -361,9 +361,16 @@
     void
     Append (const SymbolContext& sc);
 
+    void
+    Append (const SymbolContextList& sc_list);
+
     bool
-    AppendIfUnique (const SymbolContext& sc, bool merge_symbol_into_function);
+    AppendIfUnique (const SymbolContext& sc, 
+                    bool merge_symbol_into_function);
 
+    uint32_t
+    AppendIfUnique (const SymbolContextList& sc_list, 
+                    bool merge_symbol_into_function);
     //------------------------------------------------------------------
     /// Clear the object's state.
     ///
@@ -418,6 +425,11 @@
     uint32_t
     NumLineEntriesWithLine (uint32_t line) const;
     
+    void
+    GetDescription(Stream *s, 
+                   lldb::DescriptionLevel level, 
+                   Target *target) const;
+
 protected:
     typedef std::vector<SymbolContext> collection; ///< The collection type for the list.
 

Modified: lldb/trunk/include/lldb/Symbol/Type.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Type.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Type.h (original)
+++ lldb/trunk/include/lldb/Symbol/Type.h Sun Feb  5 19:44:54 2012
@@ -390,6 +390,8 @@
     GetDescription (lldb_private::Stream &strm, 
                     lldb::DescriptionLevel description_level);
     
+    void
+    SetType (const lldb::TypeSP &type_sp);
 
 private:
     ClangASTType m_clang_ast_type;

Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Sun Feb  5 19:44:54 2012
@@ -512,7 +512,11 @@
         eFunctionNameTypeBase       = (1u << 3),    // The function name only, no namespaces or arguments and no class 
                                                     // methods or selectors will be searched.
         eFunctionNameTypeMethod     = (1u << 4),    // Find function by method name (C++) with no namespace or arguments
-        eFunctionNameTypeSelector   = (1u << 5)     // Find function by selector name (ObjC) names
+        eFunctionNameTypeSelector   = (1u << 5),    // Find function by selector name (ObjC) names
+        eFunctionNameTypeAny        = (eFunctionNameTypeFull     |
+                                       eFunctionNameTypeBase     |
+                                       eFunctionNameTypeMethod   |
+                                       eFunctionNameTypeSelector )
     } FunctionNameType;
     
     

Modified: lldb/trunk/scripts/Python/interface/SBBlock.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBBlock.i?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBBlock.i (original)
+++ lldb/trunk/scripts/Python/interface/SBBlock.i Sun Feb  5 19:44:54 2012
@@ -89,6 +89,87 @@
 
     bool
     GetDescription (lldb::SBStream &description);
+
+    lldb::SBValueList
+    GetVariables (lldb::SBFrame& frame,
+                  bool arguments,
+                  bool locals,
+                  bool statics,
+                  lldb::DynamicValueType use_dynamic);
+
+     lldb::SBValueList
+     GetVariables (lldb::SBTarget& target,
+                   bool arguments,
+                   bool locals,
+                   bool statics);
+
+    %pythoncode %{
+        def get_range_at_index(self, idx):
+            if idx < self.GetNumRanges():
+                return [self.sbblock.GetRangeStartAddress(key), self.sbblock.GetRangeEndAddress(key)]
+            return []
+
+        class ranges_access(object):
+            '''A helper object that will lazily hand out an array of lldb.SBAddress that represent address ranges for a block.'''
+            def __init__(self, sbblock):
+                self.sbblock = sbblock
+        
+            def __len__(self):
+                if self.sbblock:
+                    return self.sbblock.GetNumRanges()
+                return 0
+        
+            def __getitem__(self, key):
+                count = len(self)
+                if type(key) is int:
+                    return self.sbblock.get_range_at_index (key);
+                else:
+                    print "error: unsupported item type: %s" % type(key)
+                return None
+        
+        def get_ranges_access_object(self):
+            '''An accessor function that returns a ranges_access() object which allows lazy block address ranges access.'''
+            return self.ranges_access (self)
+        
+        def get_ranges_array(self):
+            '''An accessor function that returns an array object that contains all ranges in this block object.'''
+            if not hasattr(self, 'ranges'):
+                self.ranges = []
+                for idx in range(self.num_ranges):
+                    self.ranges.append (self.get_range_at_index (idx))
+            return self.ranges
+        
+        def get_call_site(self):
+            return declaration(self.GetInlinedCallSiteFile(), self.GetInlinedCallSiteLine(), self.GetInlinedCallSiteColumn())
+
+        __swig_getmethods__["parent"] = GetParent
+        if _newclass: x = property(GetParent, None)
+
+        __swig_getmethods__["first_child"] = GetFirstChild
+        if _newclass: x = property(GetFirstChild, None)
+        
+        __swig_getmethods__["call_site"] = get_call_site
+        if _newclass: x = property(get_call_site, None)
+        
+        __swig_getmethods__["sibling"] = GetSibling
+        if _newclass: x = property(GetSibling, None)
+
+        __swig_getmethods__["name"] = GetInlinedName
+        if _newclass: x = property(GetInlinedName, None)
+
+        __swig_getmethods__["inlined_block"] = GetContainingInlinedBlock
+        if _newclass: x = property(GetContainingInlinedBlock, None)
+
+        __swig_getmethods__["range"] = get_ranges_access_object
+        if _newclass: x = property(get_ranges_access_object, None)
+
+        __swig_getmethods__["ranges"] = get_ranges_array
+        if _newclass: x = property(get_ranges_array, None)
+
+        __swig_getmethods__["num_ranges"] = GetNumRanges
+        if _newclass: x = property(GetNumRanges, None)
+    %}
+
 };
 
 } // namespace lldb

Modified: lldb/trunk/scripts/Python/interface/SBFunction.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBFunction.i?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBFunction.i (original)
+++ lldb/trunk/scripts/Python/interface/SBFunction.i Sun Feb  5 19:44:54 2012
@@ -65,15 +65,21 @@
     lldb::SBInstructionList
     GetInstructions (lldb::SBTarget target);
 
-    SBAddress
+    lldb::SBAddress
     GetStartAddress ();
 
-    SBAddress
+    lldb::SBAddress
     GetEndAddress ();
 
     uint32_t
     GetPrologueByteSize ();
 
+    lldb::SBType
+    GetType ();
+
+    lldb::SBBlock
+    GetBlock ();
+
     bool
     GetDescription (lldb::SBStream &description);
     
@@ -81,24 +87,29 @@
         def get_instructions_from_current_target (self):
             return self.GetInstructions (target)
 
-        __swig_getmethods__["name"] = GetName
-        if _newclass: x = property(GetName, None)
-        
-        __swig_getmethods__["mangled"] = GetMangledName
-        if _newclass: x = property(GetMangledName, None)
-        
         __swig_getmethods__["addr"] = GetStartAddress
         if _newclass: x = property(GetStartAddress, None)
-        
+
+        __swig_getmethods__["block"] = GetBlock
+        if _newclass: x = property(GetBlock, None)
+
         __swig_getmethods__["end_addr"] = GetEndAddress
         if _newclass: x = property(GetEndAddress, None)
         
-        __swig_getmethods__["prologue_size"] = GetPrologueByteSize
-        if _newclass: x = property(GetPrologueByteSize, None)
-
         __swig_getmethods__["instructions"] = get_instructions_from_current_target
         if _newclass: x = property(get_instructions_from_current_target, None)
 
+        __swig_getmethods__["mangled"] = GetMangledName
+        if _newclass: x = property(GetMangledName, None)
+
+        __swig_getmethods__["name"] = GetName
+        if _newclass: x = property(GetName, None)
+
+        __swig_getmethods__["prologue_size"] = GetPrologueByteSize
+        if _newclass: x = property(GetPrologueByteSize, None)
+
+        __swig_getmethods__["type"] = GetType
+        if _newclass: x = property(GetType, None)
     %}
 
 };

Modified: lldb/trunk/scripts/Python/interface/SBModule.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBModule.i?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBModule.i (original)
+++ lldb/trunk/scripts/Python/interface/SBModule.i Sun Feb  5 19:44:54 2012
@@ -192,23 +192,14 @@
     ///     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
+    /// @return
     ///     A symbol context list that gets filled in with all of the
     ///     matches.
-    ///
-    /// @return
-    ///     The number of matches added to \a sc_list.
     //------------------------------------------------------------------
     ") FindFunctions;
-    uint32_t
+    lldb::SBSymbolContextList
     FindFunctions (const char *name, 
-                   uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits
-                   bool append, 
-                   lldb::SBSymbolContextList& sc_list);
+                   uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
     
     lldb::SBType
     FindFirstType (const char* name);

Modified: lldb/trunk/scripts/Python/interface/SBSymbolContext.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBSymbolContext.i?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBSymbolContext.i (original)
+++ lldb/trunk/scripts/Python/interface/SBSymbolContext.i Sun Feb  5 19:44:54 2012
@@ -79,6 +79,34 @@
 
     bool
     GetDescription (lldb::SBStream &description);
+    
+    
+    %pythoncode %{
+        __swig_getmethods__["module"] = GetModule
+        __swig_setmethods__["module"] = SetModule
+        if _newclass: x = property(GetModule, SetModule)
+
+        __swig_getmethods__["compile_unit"] = GetCompileUnit
+        __swig_setmethods__["compile_unit"] = SetCompileUnit
+        if _newclass: x = property(GetCompileUnit, SetCompileUnit)
+
+        __swig_getmethods__["function"] = GetFunction
+        __swig_setmethods__["function"] = SetFunction
+        if _newclass: x = property(GetFunction, SetFunction)
+
+        __swig_getmethods__["block"] = GetBlock
+        __swig_setmethods__["block"] = SetBlock
+        if _newclass: x = property(GetBlock, SetBlock)
+            
+        __swig_getmethods__["symbol"] = GetSymbol
+        __swig_setmethods__["symbol"] = SetSymbol
+        if _newclass: x = property(GetSymbol, SetSymbol)
+
+        __swig_getmethods__["line_entry"] = GetLineEntry
+        __swig_setmethods__["line_entry"] = SetLineEntry
+        if _newclass: x = property(GetLineEntry, SetLineEntry)
+    %}
+
 };
 
 } // namespace lldb

Modified: lldb/trunk/scripts/Python/interface/SBSymbolContextList.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBSymbolContextList.i?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBSymbolContextList.i (original)
+++ lldb/trunk/scripts/Python/interface/SBSymbolContextList.i Sun Feb  5 19:44:54 2012
@@ -49,7 +49,92 @@
     GetContextAtIndex (uint32_t idx);
 
     void
+    Append (lldb::SBSymbolContext &sc);
+    
+    void
+    Append (lldb::SBSymbolContextList &sc_list);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    void
     Clear();
+    
+    %pythoncode %{
+        def __len__(self):
+            return self.GetSize()
+
+        def __getitem__(self, key):
+            count = len(self)
+            if type(key) is int:
+                if key < count:
+                    return self.GetContextAtIndex(key)
+                else:
+                    raise IndexError
+            raise TypeError
+        
+        def get_module_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).module
+                if obj:
+                    a.append(obj)
+            return a
+            
+        def get_compile_unit_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).compile_unit
+                if obj:
+                    a.append(obj)
+            return a
+        def get_function_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).function
+                if obj:
+                    a.append(obj)
+            return a
+        def get_block_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).block
+                if obj:
+                    a.append(obj)
+            return a
+        def get_symbol_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).symbol
+                if obj:
+                    a.append(obj)
+            return a
+        def get_line_entry_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).line_entry
+                if obj:
+                    a.append(obj)
+            return a
+        __swig_getmethods__["modules"] = get_module_array
+        if _newclass: x = property(get_module_array, None)
+        
+        __swig_getmethods__["compile_units"] = get_compile_unit_array
+        if _newclass: x = property(get_compile_unit_array, None)
+        
+        __swig_getmethods__["functions"] = get_function_array
+        if _newclass: x = property(get_function_array, None)
+        
+        __swig_getmethods__["blocks"] = get_block_array
+        if _newclass: x = property(get_block_array, None)
+        
+        __swig_getmethods__["line_entries"] = get_line_entry_array
+        if _newclass: x = property(get_line_entry_array, None)
+        
+        __swig_getmethods__["symbols"] = get_symbol_array
+        if _newclass: x = property(get_symbol_array, None)
+    %}
+
 };
 
 } // namespace lldb

Modified: lldb/trunk/scripts/Python/interface/SBTarget.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBTarget.i?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBTarget.i (original)
+++ lldb/trunk/scripts/Python/interface/SBTarget.i Sun Feb  5 19:44:54 2012
@@ -348,23 +348,14 @@
     ///     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.
+    ///     A lldb::SBSymbolContextList that gets filled in with all of 
+    ///     the symbol contexts for all the matches.
     //------------------------------------------------------------------
     ") FindFunctions;
-    uint32_t
+    lldb::SBSymbolContextList
     FindFunctions (const char *name, 
-                   uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits
-                   bool append, 
-                   lldb::SBSymbolContextList& sc_list);
+                   uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
     
     lldb::SBType
     FindFirstType (const char* type);

Modified: lldb/trunk/scripts/Python/python-extensions.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/python-extensions.swig?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/python-extensions.swig (original)
+++ lldb/trunk/scripts/Python/python-extensions.swig Sun Feb  5 19:44:54 2012
@@ -280,6 +280,20 @@
                     return PyString_FromString("");
         }
 }
+%extend lldb::SBSymbolContextList {
+        PyObject *lldb::SBSymbolContextList::__str__ (){
+                lldb::SBStream description;
+                $self->GetDescription (description);
+                const char *desc = description.GetData();
+                size_t desc_len = description.GetSize();
+                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
+                    --desc_len;
+                if (desc_len > 0)
+                    return PyString_FromStringAndSize (desc, desc_len);
+                else
+                    return PyString_FromString("");
+        }
+}
 %extend lldb::SBTarget {
         PyObject *lldb::SBTarget::__str__ (){
                 lldb::SBStream description;
@@ -389,6 +403,13 @@
 
 %pythoncode %{
 
+class declaration(object):
+    '''A class that represents a source declaration location with file, line and column.'''
+    def __init__(self, file, line, col):
+        self.file = file
+        self.line = line
+        self.col = col
+
 class value(object):
     '''A class designed to wrap lldb.SBValue() objects so the resulting object
     can be used as a variable would be in code. So if you have a Point structure

Modified: lldb/trunk/source/API/SBAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBAddress.cpp?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/source/API/SBAddress.cpp (original)
+++ lldb/trunk/source/API/SBAddress.cpp Sun Feb  5 19:44:54 2012
@@ -352,7 +352,7 @@
 {
     SBBlock sb_block;
     if (m_opaque_ap.get())
-        sb_block.reset(m_opaque_ap->GetAddress().CalculateSymbolContextBlock());
+        sb_block.SetPtr(m_opaque_ap->GetAddress().CalculateSymbolContextBlock());
     return sb_block;
 }
 

Modified: lldb/trunk/source/API/SBBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBlock.cpp?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBlock.cpp (original)
+++ lldb/trunk/source/API/SBBlock.cpp Sun Feb  5 19:44:54 2012
@@ -10,11 +10,18 @@
 #include "lldb/API/SBBlock.h"
 #include "lldb/API/SBAddress.h"
 #include "lldb/API/SBFileSpec.h"
+#include "lldb/API/SBFrame.h"
 #include "lldb/API/SBStream.h"
+#include "lldb/API/SBValue.h"
 #include "lldb/Core/AddressRange.h"
+#include "lldb/Core/Log.h"
+#include "lldb/Core/ValueObjectVariable.h"
 #include "lldb/Symbol/Block.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/SymbolContext.h"
+#include "lldb/Symbol/VariableList.h"
+#include "lldb/Target/StackFrame.h"
+#include "lldb/Target/Target.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -157,13 +164,13 @@
 }
 
 lldb_private::Block *
-SBBlock::get ()
+SBBlock::GetPtr ()
 {
     return m_opaque_ptr;
 }
 
 void
-SBBlock::reset (lldb_private::Block *block)
+SBBlock::SetPtr (lldb_private::Block *block)
 {
     m_opaque_ptr = block;
 }
@@ -245,3 +252,117 @@
     return UINT32_MAX;
 }
 
+
+lldb::SBValueList
+SBBlock::GetVariables (lldb::SBFrame& frame,
+                       bool arguments,
+                       bool locals,
+                       bool statics,
+                       lldb::DynamicValueType use_dynamic)
+{
+    Block *block = GetPtr();
+    SBValueList value_list;
+    if (block)
+    {
+        StackFrameSP frame_sp(frame.GetFrameSP());
+        VariableListSP variable_list_sp (block->GetBlockVariableList (true));
+
+        if (variable_list_sp)
+        {
+            const size_t num_variables = variable_list_sp->GetSize();
+            if (num_variables)
+            {
+                for (size_t i = 0; i < num_variables; ++i)
+                {
+                    VariableSP variable_sp (variable_list_sp->GetVariableAtIndex(i));
+                    if (variable_sp)
+                    {
+                        bool add_variable = false;
+                        switch (variable_sp->GetScope())
+                        {
+                            case eValueTypeVariableGlobal:
+                            case eValueTypeVariableStatic:
+                                add_variable = statics;
+                                break;
+                                
+                            case eValueTypeVariableArgument:
+                                add_variable = arguments;
+                                break;
+                                
+                            case eValueTypeVariableLocal:
+                                add_variable = locals;
+                                break;
+                                
+                            default:
+                                break;
+                        }
+                        if (add_variable)
+                        {
+                            if (frame_sp)
+                                value_list.Append (frame_sp->GetValueObjectForFrameVariable (variable_sp, use_dynamic));
+                        }
+                    }
+                }
+            }
+        }        
+    }
+    return value_list;
+}
+
+lldb::SBValueList
+SBBlock::GetVariables (lldb::SBTarget& target,
+                       bool arguments,
+                       bool locals,
+                       bool statics)
+{
+    Block *block = GetPtr();
+    
+    SBValueList value_list;
+    if (block)
+    {
+        TargetSP target_sp(target.GetSP());
+        
+        VariableListSP variable_list_sp (block->GetBlockVariableList (true));
+        
+        if (variable_list_sp)
+        {
+            const size_t num_variables = variable_list_sp->GetSize();
+            if (num_variables)
+            {
+                for (size_t i = 0; i < num_variables; ++i)
+                {
+                    VariableSP variable_sp (variable_list_sp->GetVariableAtIndex(i));
+                    if (variable_sp)
+                    {
+                        bool add_variable = false;
+                        switch (variable_sp->GetScope())
+                        {
+                            case eValueTypeVariableGlobal:
+                            case eValueTypeVariableStatic:
+                                add_variable = statics;
+                                break;
+                                
+                            case eValueTypeVariableArgument:
+                                add_variable = arguments;
+                                break;
+                                
+                            case eValueTypeVariableLocal:
+                                add_variable = locals;
+                                break;
+                                
+                            default:
+                                break;
+                        }
+                        if (add_variable)
+                        {
+                            if (target_sp)
+                                value_list.Append (ValueObjectVariable::Create (target_sp.get(), variable_sp));
+                        }
+                    }
+                }
+            }
+        }
+    }        
+    return value_list;
+}
+

Modified: lldb/trunk/source/API/SBFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFrame.cpp (original)
+++ lldb/trunk/source/API/SBFrame.cpp Sun Feb  5 19:44:54 2012
@@ -300,12 +300,12 @@
     if (frame_sp)
     {
         Mutex::Locker api_locker (frame_sp->GetThread().GetProcess().GetTarget().GetAPIMutex());
-        sb_block.reset (frame_sp->GetSymbolContext (eSymbolContextBlock).block);
+        sb_block.SetPtr (frame_sp->GetSymbolContext (eSymbolContextBlock).block);
     }
     LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
         log->Printf ("SBFrame(%p)::GetBlock () => SBBlock(%p)", 
-                     frame_sp.get(), sb_block.get());
+                     frame_sp.get(), sb_block.GetPtr());
     return sb_block;
 }
 
@@ -317,12 +317,12 @@
     if (frame_sp)
     {
         Mutex::Locker api_locker (frame_sp->GetThread().GetProcess().GetTarget().GetAPIMutex());
-        sb_block.reset(frame_sp->GetFrameBlock ());
+        sb_block.SetPtr(frame_sp->GetFrameBlock ());
     }
     LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
         log->Printf ("SBFrame(%p)::GetFrameBlock () => SBBlock(%p)", 
-                     frame_sp.get(), sb_block.get());
+                     frame_sp.get(), sb_block.GetPtr());
     return sb_block;    
 }
 

Modified: lldb/trunk/source/API/SBFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFunction.cpp?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFunction.cpp (original)
+++ lldb/trunk/source/API/SBFunction.cpp Sun Feb  5 19:44:54 2012
@@ -192,4 +192,27 @@
     return 0;
 }
 
+SBType
+SBFunction::GetType ()
+{
+    SBType sb_type;
+    if (m_opaque_ptr)
+    {
+        Type *function_type = m_opaque_ptr->GetType();
+        if (function_type)
+            sb_type.ref().SetType (function_type->shared_from_this());
+    }
+    return sb_type;
+}
+
+SBBlock
+SBFunction::GetBlock ()
+{
+    SBBlock sb_block;
+    if (m_opaque_ptr)
+        sb_block.SetPtr (&m_opaque_ptr->GetBlock (true));
+    return sb_block;
+}
+
+
 

Modified: lldb/trunk/source/API/SBModule.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBModule.cpp?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/source/API/SBModule.cpp (original)
+++ lldb/trunk/source/API/SBModule.cpp Sun Feb  5 19:44:54 2012
@@ -318,25 +318,23 @@
     return sb_section;
 }
 
-uint32_t
+lldb::SBSymbolContextList
 SBModule::FindFunctions (const char *name, 
-                         uint32_t name_type_mask, 
-                         bool append, 
-                         lldb::SBSymbolContextList& sc_list)
+                         uint32_t name_type_mask)
 {
-    if (!append)
-        sc_list.Clear();
+    lldb::SBSymbolContextList sb_sc_list;
     if (name && m_opaque_sp)
     {
+        const bool append = true;
         const bool symbols_ok = true;
-        return m_opaque_sp->FindFunctions (ConstString(name),
-                                           NULL,
-                                           name_type_mask, 
-                                           symbols_ok, 
-                                           append, 
-                                           *sc_list);
+        m_opaque_sp->FindFunctions (ConstString(name),
+                                    NULL,
+                                    name_type_mask, 
+                                    symbols_ok, 
+                                    append, 
+                                    *sb_sc_list);
     }
-    return 0;
+    return sb_sc_list;
 }
 
 

Modified: lldb/trunk/source/API/SBSymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSymbolContext.cpp?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSymbolContext.cpp (original)
+++ lldb/trunk/source/API/SBSymbolContext.cpp Sun Feb  5 19:44:54 2012
@@ -199,7 +199,7 @@
 void 
 SBSymbolContext::SetBlock (lldb::SBBlock block)
 {
-    ref().block = block.get();
+    ref().block = block.GetPtr();
 }
 
 void 

Modified: lldb/trunk/source/API/SBSymbolContextList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSymbolContextList.cpp?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSymbolContextList.cpp (original)
+++ lldb/trunk/source/API/SBSymbolContextList.cpp Sun Feb  5 19:44:54 2012
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/API/SBSymbolContextList.h"
+#include "lldb/API/SBStream.h"
 #include "lldb/Symbol/SymbolContext.h"
 
 using namespace lldb;
@@ -67,6 +68,20 @@
         m_opaque_ap->Clear();
 }
 
+void
+SBSymbolContextList::Append(SBSymbolContext &sc)
+{
+    if (sc.IsValid() && m_opaque_ap.get())
+        m_opaque_ap->Append(*sc);
+}
+
+void
+SBSymbolContextList::Append(SBSymbolContextList &sc_list)
+{
+    if (sc_list.IsValid() && m_opaque_ap.get())
+        m_opaque_ap->Append(*sc_list);
+}
+
 
 bool
 SBSymbolContextList::IsValid () const
@@ -90,6 +105,13 @@
     return *m_opaque_ap.get();
 }
 
-
+bool
+SBSymbolContextList::GetDescription (lldb::SBStream &description)
+{
+    Stream &strm = description.ref();    
+    if (m_opaque_ap.get())
+        m_opaque_ap->GetDescription (&strm, lldb::eDescriptionLevelFull, NULL);
+    return true;
+}
 
 

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Sun Feb  5 19:44:54 2012
@@ -1252,28 +1252,25 @@
     return true;
 }
 
-uint32_t
-SBTarget::FindFunctions (const char *name, 
-                         uint32_t name_type_mask, 
-                         bool append, 
-                         lldb::SBSymbolContextList& sc_list)
+lldb::SBSymbolContextList
+SBTarget::FindFunctions (const char *name, uint32_t name_type_mask)
 {
-    if (!append)
-        sc_list.Clear();
+    lldb::SBSymbolContextList sb_sc_list;
     if (name && name[0])
     {
         TargetSP target_sp(GetSP());
         if (target_sp)
         {
             const bool symbols_ok = true;
-            return target_sp->GetImages().FindFunctions (ConstString(name), 
-                                                         name_type_mask, 
-                                                         symbols_ok, 
-                                                         append, 
-                                                         *sc_list);
+            const bool append = true;
+            target_sp->GetImages().FindFunctions (ConstString(name), 
+                                                  name_type_mask, 
+                                                  symbols_ok, 
+                                                  append, 
+                                                  *sb_sc_list);
         }
     }
-    return 0;
+    return sb_sc_list;
 }
 
 lldb::SBType

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Sun Feb  5 19:44:54 2012
@@ -4158,21 +4158,21 @@
         const char *name2 = decl_ctx_die2->GetName(this, cu2);
         // If the string was from a DW_FORM_strp, then the pointer will often
         // be the same!
-        if (name1 != name2)
+        if (name1 == name2)
+            continue;
+
+        // Name pointers are not equal, so only compare the strings
+        // if both are not NULL.
+        if (name1 && name2)
         {
-            // Name pointers are not equal, so only compare the strings
-            // if both are not NULL.
-            if (name1 && name2)
-            {
-                // If the strings don't compare, we are done...
-                if (strcmp(name1, name2) != 0)
-                    return false;
-            }
-            else if (name1 || name2)
-            {
-                // One name was NULL while the other wasn't
+            // If the strings don't compare, we are done...
+            if (strcmp(name1, name2) != 0)
                 return false;
-            }
+        }
+        else
+        {
+            // One name was NULL while the other wasn't
+            return false;
         }
     }
     // We made it through all of the checks and the declaration contexts

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Sun Feb  5 19:44:54 2012
@@ -905,6 +905,28 @@
     m_symbol_contexts.push_back(sc);
 }
 
+void
+SymbolContextList::Append (const SymbolContextList& sc_list)
+{
+    collection::const_iterator pos, end = sc_list.m_symbol_contexts.end();
+    for (pos = sc_list.m_symbol_contexts.begin(); pos != end; ++pos)
+        m_symbol_contexts.push_back (*pos);
+}
+
+
+uint32_t
+SymbolContextList::AppendIfUnique (const SymbolContextList& sc_list, bool merge_symbol_into_function)
+{
+    uint32_t unique_sc_add_count = 0;
+    collection::const_iterator pos, end = sc_list.m_symbol_contexts.end();
+    for (pos = sc_list.m_symbol_contexts.begin(); pos != end; ++pos)
+    {
+        if (AppendIfUnique (*pos, merge_symbol_into_function))
+            ++unique_sc_add_count;
+    }
+    return unique_sc_add_count;
+}
+
 bool
 SymbolContextList::AppendIfUnique (const SymbolContext& sc, bool merge_symbol_into_function)
 {
@@ -1013,6 +1035,16 @@
     return match_count;
 }
 
+void
+SymbolContextList::GetDescription(Stream *s, 
+                                  lldb::DescriptionLevel level, 
+                                  Target *target) const
+{
+    const uint32_t size = m_symbol_contexts.size();
+    for (uint32_t idx = 0; idx<size; ++idx)
+        m_symbol_contexts[idx].GetDescription (s, level, target);
+}
+
 bool
 lldb_private::operator== (const SymbolContextList& lhs, const SymbolContextList& rhs)
 {

Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Sun Feb  5 19:44:54 2012
@@ -770,6 +770,21 @@
 {
 }
 
+void
+TypeImpl::SetType (const lldb::TypeSP &type_sp)
+{
+    if (type_sp)
+    {
+        m_clang_ast_type.SetClangType (type_sp->GetClangAST(), type_sp->GetClangFullType());
+        m_type_sp = type_sp;
+    }
+    else
+    {
+        m_clang_ast_type.Clear();
+        m_type_sp.reset();
+    }
+}
+
 TypeImpl&
 TypeImpl::operator = (const TypeImpl& rhs)
 {

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=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_module.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_module.py Sun Feb  5 19:44:54 2012
@@ -15,7 +15,8 @@
     obj.GetDescription(lldb.SBStream())
     obj.GetNumSymbols()
     obj.GetSymbolAtIndex(sys.maxint)
-    obj.FindFunctions("my_func", 0xffffffff, True, lldb.SBSymbolContextList())
+    sc_list = obj.FindFunctions("my_func")
+    sc_list = obj.FindFunctions("my_func", lldb.eFunctionNameTypeAny)
     obj.FindGlobalVariables(lldb.SBTarget(), "my_global_var", 1)
     for section in obj.section_iter():
         print section

Modified: lldb/trunk/test/python_api/default-constructor/sb_target.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_target.py?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_target.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_target.py Sun Feb  5 19:44:54 2012
@@ -20,8 +20,8 @@
     obj.GetDebugger()
     filespec = lldb.SBFileSpec()
     obj.FindModule(filespec)
-    contextlist = lldb.SBSymbolContextList()
-    obj.FindFunctions("the_func", 0xff, True, contextlist)
+    sc_list = obj.FindFunctions("the_func")
+    sc_list = obj.FindFunctions("the_func", lldb.eFunctionNameTypeAny)
     obj.FindFirstType("dont_care")
     obj.FindTypes("dont_care")
     obj.FindFirstType(None)

Modified: lldb/trunk/test/python_api/module_section/TestModuleAndSection.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/module_section/TestModuleAndSection.py?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/test/python_api/module_section/TestModuleAndSection.py (original)
+++ lldb/trunk/test/python_api/module_section/TestModuleAndSection.py Sun Feb  5 19:44:54 2012
@@ -87,7 +87,7 @@
         exe_module.FindFirstType(None)
         exe_module.FindTypes(None)
         exe_module.FindGlobalVariables(target, None, 1)
-        exe_module.FindFunctions(None, 0, True, lldb.SBSymbolContextList())
+        exe_module.FindFunctions(None, 0)
         exe_module.FindSection(None)
 
         # Get the section at index 1.

Modified: lldb/trunk/test/python_api/target/TestTargetAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/target/TestTargetAPI.py?rev=149853&r1=149852&r2=149853&view=diff
==============================================================================
--- lldb/trunk/test/python_api/target/TestTargetAPI.py (original)
+++ lldb/trunk/test/python_api/target/TestTargetAPI.py Sun Feb  5 19:44:54 2012
@@ -152,9 +152,8 @@
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        list = lldb.SBSymbolContextList()
-        num = target.FindFunctions('c', lldb.eFunctionNameTypeAuto, False, list)
-        self.assertTrue(num == 1 and list.GetSize() == 1)
+        list = target.FindFunctions('c', lldb.eFunctionNameTypeAuto)
+        self.assertTrue(list.GetSize() == 1)
 
         for sc in list:
             self.assertTrue(sc.GetModule().GetFileSpec().GetFilename() == exe_name)





More information about the lldb-commits mailing list