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.
llvm-svn: 149853
diff --git a/lldb/include/lldb/API/SBAddress.h b/lldb/include/lldb/API/SBAddress.h
index b512ed6..dde7a0b 100644
--- a/lldb/include/lldb/API/SBAddress.h
+++ b/lldb/include/lldb/API/SBAddress.h
@@ -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
diff --git a/lldb/include/lldb/API/SBBlock.h b/lldb/include/lldb/API/SBBlock.h
index ec1e0b5..b8e61fc 100644
--- a/lldb/include/lldb/API/SBBlock.h
+++ b/lldb/include/lldb/API/SBBlock.h
@@ -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;
};
diff --git a/lldb/include/lldb/API/SBBreakpoint.h b/lldb/include/lldb/API/SBBreakpoint.h
index aae0446..8c49126 100644
--- a/lldb/include/lldb/API/SBBreakpoint.h
+++ b/lldb/include/lldb/API/SBBreakpoint.h
@@ -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,
diff --git a/lldb/include/lldb/API/SBBreakpointLocation.h b/lldb/include/lldb/API/SBBreakpointLocation.h
index ab8e56b..3a67552 100644
--- a/lldb/include/lldb/API/SBBreakpointLocation.h
+++ b/lldb/include/lldb/API/SBBreakpointLocation.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBBroadcaster.h b/lldb/include/lldb/API/SBBroadcaster.h
index 92c1bba..7b32d85 100644
--- a/lldb/include/lldb/API/SBBroadcaster.h
+++ b/lldb/include/lldb/API/SBBroadcaster.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBCommandInterpreter.h b/lldb/include/lldb/API/SBCommandInterpreter.h
index a33ff2d..3ad4abe 100644
--- a/lldb/include/lldb/API/SBCommandInterpreter.h
+++ b/lldb/include/lldb/API/SBCommandInterpreter.h
@@ -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,
diff --git a/lldb/include/lldb/API/SBCommandReturnObject.h b/lldb/include/lldb/API/SBCommandReturnObject.h
index 7136cf9..39c78fd 100644
--- a/lldb/include/lldb/API/SBCommandReturnObject.h
+++ b/lldb/include/lldb/API/SBCommandReturnObject.h
@@ -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);
diff --git a/lldb/include/lldb/API/SBCompileUnit.h b/lldb/include/lldb/API/SBCompileUnit.h
index bf56436..3c8f00a 100644
--- a/lldb/include/lldb/API/SBCompileUnit.h
+++ b/lldb/include/lldb/API/SBCompileUnit.h
@@ -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;
};
diff --git a/lldb/include/lldb/API/SBData.h b/lldb/include/lldb/API/SBData.h
index 0716c33..b2824a4 100644
--- a/lldb/include/lldb/API/SBData.h
+++ b/lldb/include/lldb/API/SBData.h
@@ -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);
diff --git a/lldb/include/lldb/API/SBDebugger.h b/lldb/include/lldb/API/SBDebugger.h
index 0f01908..3c80faa 100644
--- a/lldb/include/lldb/API/SBDebugger.h
+++ b/lldb/include/lldb/API/SBDebugger.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBError.h b/lldb/include/lldb/API/SBError.h
index 3b6b90f..a4aa56e 100644
--- a/lldb/include/lldb/API/SBError.h
+++ b/lldb/include/lldb/API/SBError.h
@@ -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);
diff --git a/lldb/include/lldb/API/SBEvent.h b/lldb/include/lldb/API/SBEvent.h
index 7982b99..6a3faaa1 100644
--- a/lldb/include/lldb/API/SBEvent.h
+++ b/lldb/include/lldb/API/SBEvent.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBFileSpec.h b/lldb/include/lldb/API/SBFileSpec.h
index bacc3d9..22a3915 100644
--- a/lldb/include/lldb/API/SBFileSpec.h
+++ b/lldb/include/lldb/API/SBFileSpec.h
@@ -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;
};
diff --git a/lldb/include/lldb/API/SBFileSpecList.h b/lldb/include/lldb/API/SBFileSpecList.h
index 90b6798f..08635bc 100644
--- a/lldb/include/lldb/API/SBFileSpecList.h
+++ b/lldb/include/lldb/API/SBFileSpecList.h
@@ -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;
};
diff --git a/lldb/include/lldb/API/SBFrame.h b/lldb/include/lldb/API/SBFrame.h
index c78a1f9..4501f77 100644
--- a/lldb/include/lldb/API/SBFrame.h
+++ b/lldb/include/lldb/API/SBFrame.h
@@ -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
diff --git a/lldb/include/lldb/API/SBFunction.h b/lldb/include/lldb/API/SBFunction.h
index 264ad6b..e061d1d 100644
--- a/lldb/include/lldb/API/SBFunction.h
+++ b/lldb/include/lldb/API/SBFunction.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBInputReader.h b/lldb/include/lldb/API/SBInputReader.h
index 9c1659d..61f7de4 100644
--- a/lldb/include/lldb/API/SBInputReader.h
+++ b/lldb/include/lldb/API/SBInputReader.h
@@ -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
diff --git a/lldb/include/lldb/API/SBInstruction.h b/lldb/include/lldb/API/SBInstruction.h
index 420e869..e231448 100644
--- a/lldb/include/lldb/API/SBInstruction.h
+++ b/lldb/include/lldb/API/SBInstruction.h
@@ -28,10 +28,8 @@
SBInstruction (const SBInstruction &rhs);
-#ifndef SWIG
const SBInstruction &
operator = (const SBInstruction &rhs);
-#endif
~SBInstruction ();
diff --git a/lldb/include/lldb/API/SBInstructionList.h b/lldb/include/lldb/API/SBInstructionList.h
index 0d336d40..944e144 100644
--- a/lldb/include/lldb/API/SBInstructionList.h
+++ b/lldb/include/lldb/API/SBInstructionList.h
@@ -24,10 +24,8 @@
SBInstructionList (const SBInstructionList &rhs);
-#ifndef SWIG
const SBInstructionList &
operator = (const SBInstructionList &rhs);
-#endif
~SBInstructionList ();
diff --git a/lldb/include/lldb/API/SBLineEntry.h b/lldb/include/lldb/API/SBLineEntry.h
index 35b31c6..58dada0 100644
--- a/lldb/include/lldb/API/SBLineEntry.h
+++ b/lldb/include/lldb/API/SBLineEntry.h
@@ -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
diff --git a/lldb/include/lldb/API/SBListener.h b/lldb/include/lldb/API/SBListener.h
index 0c7ebe5..e43506e 100644
--- a/lldb/include/lldb/API/SBListener.h
+++ b/lldb/include/lldb/API/SBListener.h
@@ -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;
};
diff --git a/lldb/include/lldb/API/SBModule.h b/lldb/include/lldb/API/SBModule.h
index 58420c9..23e1ed4 100644
--- a/lldb/include/lldb/API/SBModule.h
+++ b/lldb/include/lldb/API/SBModule.h
@@ -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.
diff --git a/lldb/include/lldb/API/SBProcess.h b/lldb/include/lldb/API/SBProcess.h
index db636a9..be169f0 100644
--- a/lldb/include/lldb/API/SBProcess.h
+++ b/lldb/include/lldb/API/SBProcess.h
@@ -37,10 +37,8 @@
SBProcess (const lldb::SBProcess& rhs);
-#ifndef SWIG
const lldb::SBProcess&
operator = (const lldb::SBProcess& rhs);
-#endif
~SBProcess();
diff --git a/lldb/include/lldb/API/SBSection.h b/lldb/include/lldb/API/SBSection.h
index 84bb3b8..c951cc1 100644
--- a/lldb/include/lldb/API/SBSection.h
+++ b/lldb/include/lldb/API/SBSection.h
@@ -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;
};
diff --git a/lldb/include/lldb/API/SBSourceManager.h b/lldb/include/lldb/API/SBSourceManager.h
index 9e8f7d1..b353b71 100644
--- a/lldb/include/lldb/API/SBSourceManager.h
+++ b/lldb/include/lldb/API/SBSourceManager.h
@@ -25,10 +25,8 @@
~SBSourceManager();
-#ifndef SWIG
const lldb::SBSourceManager &
operator = (const lldb::SBSourceManager &rhs);
-#endif
size_t
DisplaySourceLinesWithLineNumbers (const lldb::SBFileSpec &file,
diff --git a/lldb/include/lldb/API/SBStream.h b/lldb/include/lldb/API/SBStream.h
index a3b112e..19b6be4 100644
--- a/lldb/include/lldb/API/SBStream.h
+++ b/lldb/include/lldb/API/SBStream.h
@@ -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);
diff --git a/lldb/include/lldb/API/SBStringList.h b/lldb/include/lldb/API/SBStringList.h
index 7328b42..ef18975 100644
--- a/lldb/include/lldb/API/SBStringList.h
+++ b/lldb/include/lldb/API/SBStringList.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBSymbol.h b/lldb/include/lldb/API/SBSymbol.h
index 37d7828..6315794 100644
--- a/lldb/include/lldb/API/SBSymbol.h
+++ b/lldb/include/lldb/API/SBSymbol.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBSymbolContext.h b/lldb/include/lldb/API/SBSymbolContext.h
index a678b67..4ffd0ff 100644
--- a/lldb/include/lldb/API/SBSymbolContext.h
+++ b/lldb/include/lldb/API/SBSymbolContext.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBSymbolContextList.h b/lldb/include/lldb/API/SBSymbolContextList.h
index b07f32e..352522d 100644
--- a/lldb/include/lldb/API/SBSymbolContextList.h
+++ b/lldb/include/lldb/API/SBSymbolContextList.h
@@ -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;
};
diff --git a/lldb/include/lldb/API/SBTarget.h b/lldb/include/lldb/API/SBTarget.h
index d75035d..8029c2b 100644
--- a/lldb/include/lldb/API/SBTarget.h
+++ b/lldb/include/lldb/API/SBTarget.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBThread.h b/lldb/include/lldb/API/SBThread.h
index 66b510f..dc502ac 100644
--- a/lldb/include/lldb/API/SBThread.h
+++ b/lldb/include/lldb/API/SBThread.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBType.h b/lldb/include/lldb/API/SBType.h
index 4517e70..6cfaca6 100644
--- a/lldb/include/lldb/API/SBType.h
+++ b/lldb/include/lldb/API/SBType.h
@@ -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 &);
diff --git a/lldb/include/lldb/API/SBValue.h b/lldb/include/lldb/API/SBValue.h
index 6c01a54..87e0020 100644
--- a/lldb/include/lldb/API/SBValue.h
+++ b/lldb/include/lldb/API/SBValue.h
@@ -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;
diff --git a/lldb/include/lldb/API/SBValueList.h b/lldb/include/lldb/API/SBValueList.h
index 470bae1..a187414 100644
--- a/lldb/include/lldb/API/SBValueList.h
+++ b/lldb/include/lldb/API/SBValueList.h
@@ -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;
diff --git a/lldb/include/lldb/Core/Module.h b/lldb/include/lldb/Core/Module.h
index 0df8ca5..0d04a36 100644
--- a/lldb/include/lldb/Core/Module.h
+++ b/lldb/include/lldb/Core/Module.h
@@ -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.
//------------------------------------------------------------------
diff --git a/lldb/include/lldb/Symbol/ClangASTType.h b/lldb/include/lldb/Symbol/ClangASTType.h
index dd6e365..75f71d1 100644
--- a/lldb/include/lldb/Symbol/ClangASTType.h
+++ b/lldb/include/lldb/Symbol/ClangASTType.h
@@ -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;
diff --git a/lldb/include/lldb/Symbol/Function.h b/lldb/include/lldb/Symbol/Function.h
index 80f9d09..9e1fd6b 100644
--- a/lldb/include/lldb/Symbol/Function.h
+++ b/lldb/include/lldb/Symbol/Function.h
@@ -463,7 +463,7 @@
/// @param[out] line_no
/// The line number.
//------------------------------------------------------------------
- void
+ void
GetEndLineSourceInfo (FileSpec &source_file, uint32_t &line_no);
//------------------------------------------------------------------
diff --git a/lldb/include/lldb/Symbol/SymbolContext.h b/lldb/include/lldb/Symbol/SymbolContext.h
index 055a4f0..5d2181d 100644
--- a/lldb/include/lldb/Symbol/SymbolContext.h
+++ b/lldb/include/lldb/Symbol/SymbolContext.h
@@ -361,9 +361,16 @@
void
Append (const SymbolContext& sc);
- bool
- AppendIfUnique (const SymbolContext& sc, bool merge_symbol_into_function);
+ void
+ Append (const SymbolContextList& sc_list);
+ bool
+ 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.
diff --git a/lldb/include/lldb/Symbol/Type.h b/lldb/include/lldb/Symbol/Type.h
index 35fcd23..0a8e51d 100644
--- a/lldb/include/lldb/Symbol/Type.h
+++ b/lldb/include/lldb/Symbol/Type.h
@@ -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;
diff --git a/lldb/include/lldb/lldb-enumerations.h b/lldb/include/lldb/lldb-enumerations.h
index 4f3cf6a9..8b901b1 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -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;
diff --git a/lldb/scripts/Python/interface/SBBlock.i b/lldb/scripts/Python/interface/SBBlock.i
index 83895ed..cdaf62c 100644
--- a/lldb/scripts/Python/interface/SBBlock.i
+++ b/lldb/scripts/Python/interface/SBBlock.i
@@ -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
diff --git a/lldb/scripts/Python/interface/SBFunction.i b/lldb/scripts/Python/interface/SBFunction.i
index 37b957f..e259490 100644
--- a/lldb/scripts/Python/interface/SBFunction.i
+++ b/lldb/scripts/Python/interface/SBFunction.i
@@ -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)
%}
};
diff --git a/lldb/scripts/Python/interface/SBModule.i b/lldb/scripts/Python/interface/SBModule.i
index dc8f674..44d3a86 100644
--- a/lldb/scripts/Python/interface/SBModule.i
+++ b/lldb/scripts/Python/interface/SBModule.i
@@ -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);
diff --git a/lldb/scripts/Python/interface/SBSymbolContext.i b/lldb/scripts/Python/interface/SBSymbolContext.i
index 5f29e8e..4bf7fe3 100644
--- a/lldb/scripts/Python/interface/SBSymbolContext.i
+++ b/lldb/scripts/Python/interface/SBSymbolContext.i
@@ -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
diff --git a/lldb/scripts/Python/interface/SBSymbolContextList.i b/lldb/scripts/Python/interface/SBSymbolContextList.i
index 6ea5978..0a03a22 100644
--- a/lldb/scripts/Python/interface/SBSymbolContextList.i
+++ b/lldb/scripts/Python/interface/SBSymbolContextList.i
@@ -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
diff --git a/lldb/scripts/Python/interface/SBTarget.i b/lldb/scripts/Python/interface/SBTarget.i
index d917530..58a546b 100644
--- a/lldb/scripts/Python/interface/SBTarget.i
+++ b/lldb/scripts/Python/interface/SBTarget.i
@@ -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);
diff --git a/lldb/scripts/Python/python-extensions.swig b/lldb/scripts/Python/python-extensions.swig
index c6c12fc..29e39e5 100644
--- a/lldb/scripts/Python/python-extensions.swig
+++ b/lldb/scripts/Python/python-extensions.swig
@@ -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
diff --git a/lldb/source/API/SBAddress.cpp b/lldb/source/API/SBAddress.cpp
index 7397588..7d7d1d7 100644
--- a/lldb/source/API/SBAddress.cpp
+++ b/lldb/source/API/SBAddress.cpp
@@ -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;
}
diff --git a/lldb/source/API/SBBlock.cpp b/lldb/source/API/SBBlock.cpp
index eeae1d3..8f325f4 100644
--- a/lldb/source/API/SBBlock.cpp
+++ b/lldb/source/API/SBBlock.cpp
@@ -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;
+}
+
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index ce57c83..fb99571 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -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;
}
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp
index e3e56a5..cf80cbf 100644
--- a/lldb/source/API/SBFunction.cpp
+++ b/lldb/source/API/SBFunction.cpp
@@ -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;
+}
+
+
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index d2ef05f..1fe5122 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -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;
}
diff --git a/lldb/source/API/SBSymbolContext.cpp b/lldb/source/API/SBSymbolContext.cpp
index 0f7ce8c..a310d25 100644
--- a/lldb/source/API/SBSymbolContext.cpp
+++ b/lldb/source/API/SBSymbolContext.cpp
@@ -199,7 +199,7 @@
void
SBSymbolContext::SetBlock (lldb::SBBlock block)
{
- ref().block = block.get();
+ ref().block = block.GetPtr();
}
void
diff --git a/lldb/source/API/SBSymbolContextList.cpp b/lldb/source/API/SBSymbolContextList.cpp
index ca6c80c..0730096 100644
--- a/lldb/source/API/SBSymbolContextList.cpp
+++ b/lldb/source/API/SBSymbolContextList.cpp
@@ -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;
+}
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index ed667cc..5988887 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -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
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 9c709be..55d90aa 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -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
diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp
index 141ad68..6be75a2 100644
--- a/lldb/source/Symbol/SymbolContext.cpp
+++ b/lldb/source/Symbol/SymbolContext.cpp
@@ -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)
{
diff --git a/lldb/source/Symbol/Type.cpp b/lldb/source/Symbol/Type.cpp
index 66a13e2f..0844a9e 100644
--- a/lldb/source/Symbol/Type.cpp
+++ b/lldb/source/Symbol/Type.cpp
@@ -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)
{
diff --git a/lldb/test/python_api/default-constructor/sb_module.py b/lldb/test/python_api/default-constructor/sb_module.py
index d026be1..771d326 100644
--- a/lldb/test/python_api/default-constructor/sb_module.py
+++ b/lldb/test/python_api/default-constructor/sb_module.py
@@ -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
diff --git a/lldb/test/python_api/default-constructor/sb_target.py b/lldb/test/python_api/default-constructor/sb_target.py
index 19f4537..3e6c6f6 100644
--- a/lldb/test/python_api/default-constructor/sb_target.py
+++ b/lldb/test/python_api/default-constructor/sb_target.py
@@ -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)
diff --git a/lldb/test/python_api/module_section/TestModuleAndSection.py b/lldb/test/python_api/module_section/TestModuleAndSection.py
index f9562cb..ebd0ea0 100644
--- a/lldb/test/python_api/module_section/TestModuleAndSection.py
+++ b/lldb/test/python_api/module_section/TestModuleAndSection.py
@@ -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.
diff --git a/lldb/test/python_api/target/TestTargetAPI.py b/lldb/test/python_api/target/TestTargetAPI.py
index e0cfa47..de845cc 100644
--- a/lldb/test/python_api/target/TestTargetAPI.py
+++ b/lldb/test/python_api/target/TestTargetAPI.py
@@ -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)