summaryrefslogtreecommitdiff
path: root/scripts/interface
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/interface')
-rw-r--r--scripts/interface/SBBreakpoint.i7
-rw-r--r--scripts/interface/SBCommandInterpreter.i7
-rw-r--r--scripts/interface/SBDebugger.i54
-rw-r--r--scripts/interface/SBExpressionOptions.i8
-rw-r--r--scripts/interface/SBFrame.i11
-rw-r--r--scripts/interface/SBInitializerOptions.i24
-rw-r--r--scripts/interface/SBMemoryRegionInfo.i3
-rw-r--r--scripts/interface/SBModule.i3
-rw-r--r--scripts/interface/SBStructuredData.i2
-rw-r--r--scripts/interface/SBTarget.i85
-rw-r--r--scripts/interface/SBThread.i18
-rw-r--r--scripts/interface/SBThreadPlan.i3
-rw-r--r--scripts/interface/SBVariablesOptions.i8
13 files changed, 208 insertions, 25 deletions
diff --git a/scripts/interface/SBBreakpoint.i b/scripts/interface/SBBreakpoint.i
index 525797ad91f1..1383f3848e2a 100644
--- a/scripts/interface/SBBreakpoint.i
+++ b/scripts/interface/SBBreakpoint.i
@@ -226,6 +226,10 @@ public:
bool
GetDescription(lldb::SBStream &description, bool include_locations);
+ // Can only be called from a ScriptedBreakpointResolver...
+ SBError
+ AddLocation(SBAddress &address);
+
bool
operator == (const lldb::SBBreakpoint& rhs);
@@ -247,6 +251,9 @@ public:
static uint32_t
GetNumBreakpointLocationsFromEvent (const lldb::SBEvent &event_sp);
+ bool
+ IsHardware ();
+
%pythoncode %{
class locations_access(object):
diff --git a/scripts/interface/SBCommandInterpreter.i b/scripts/interface/SBCommandInterpreter.i
index 09e7c9df736a..a34515a9b1a8 100644
--- a/scripts/interface/SBCommandInterpreter.i
+++ b/scripts/interface/SBCommandInterpreter.i
@@ -219,6 +219,13 @@ public:
int max_return_elements,
lldb::SBStringList &matches);
+ int
+ HandleCompletionWithDescriptions (const char *current_line,
+ uint32_t cursor_pos,
+ int match_start_point,
+ int max_return_elements,
+ lldb::SBStringList &matches,
+ lldb::SBStringList &descriptions);
bool
IsActive ();
diff --git a/scripts/interface/SBDebugger.i b/scripts/interface/SBDebugger.i
index 8ac2c51e12fe..fde3d7b6b88e 100644
--- a/scripts/interface/SBDebugger.i
+++ b/scripts/interface/SBDebugger.i
@@ -28,7 +28,7 @@ def disassemble_instructions (insts):
# Create a new debugger instance
debugger = lldb.SBDebugger.Create()
-# When we step or continue, don't return from the function until the process
+# When we step or continue, don't return from the function until the process
# stops. We do this by setting the async mode to false.
debugger.SetAsync (False)
@@ -46,7 +46,7 @@ if target:
# Launch the process. Since we specified synchronous mode, we won't return
# from this function until we hit the breakpoint at main
process = target.LaunchSimple (None, None, os.getcwd())
-
+
# Make sure the launch went ok
if process:
# Print some simple process info
@@ -122,10 +122,13 @@ public:
static void
Initialize();
-
+
+ static void
+ Initialize(lldb::SBInitializerOptions& options);
+
static void
Terminate();
-
+
static lldb::SBDebugger
Create();
@@ -155,8 +158,8 @@ public:
void
SetAsync (bool b);
-
- bool
+
+ bool
GetAsync ();
void
@@ -248,7 +251,7 @@ public:
lldb::SBPlatform
GetSelectedPlatform();
-
+
void
SetSelectedPlatform(lldb::SBPlatform &platform);
@@ -287,7 +290,7 @@ public:
// SBPlatform from this class.
lldb::SBError
SetCurrentPlatform (const char *platform_name);
-
+
bool
SetCurrentPlatformSDKRoot (const char *sysroot);
@@ -295,8 +298,8 @@ public:
// an interface to the Set/Get UseExternalEditor.
bool
SetUseExternalEditor (bool input);
-
- bool
+
+ bool
GetUseExternalEditor ();
bool
@@ -342,7 +345,7 @@ public:
void
DispatchInputEndOfFile ();
-
+
const char *
GetInstanceName ();
@@ -366,14 +369,17 @@ public:
lldb::user_id_t
GetID ();
-
+
const char *
GetPrompt() const;
void
SetPrompt (const char *prompt);
-
- lldb::ScriptLanguage
+
+ const char *
+ GetReproducerPath() const;
+
+ lldb::ScriptLanguage
GetScriptLanguage() const;
void
@@ -381,31 +387,31 @@ public:
bool
GetCloseInputOnEOF () const;
-
+
void
SetCloseInputOnEOF (bool b);
-
+
lldb::SBTypeCategory
GetCategory (const char* category_name);
-
+
SBTypeCategory
GetCategory (lldb::LanguageType lang_type);
-
+
lldb::SBTypeCategory
CreateCategory (const char* category_name);
-
+
bool
DeleteCategory (const char* category_name);
-
+
uint32_t
GetNumCategories ();
-
+
lldb::SBTypeCategory
GetCategoryAtIndex (uint32_t);
-
+
lldb::SBTypeCategory
GetDefaultCategory();
-
+
lldb::SBTypeFormat
GetFormatForType (lldb::SBTypeNameSpecifier);
@@ -425,7 +431,7 @@ public:
int &num_errors,
bool &quit_requested,
bool &stopped_for_crash);
-
+
lldb::SBError
RunREPL (lldb::LanguageType language, const char *repl_options);
}; // class SBDebugger
diff --git a/scripts/interface/SBExpressionOptions.i b/scripts/interface/SBExpressionOptions.i
index cb61dd9d9632..8687dde49f99 100644
--- a/scripts/interface/SBExpressionOptions.i
+++ b/scripts/interface/SBExpressionOptions.i
@@ -132,6 +132,14 @@ public:
void
SetTopLevel(bool b = true);
+
+ %feature("docstring", "Gets whether to JIT an expression if it cannot be interpreted.") GetAllowJIT;
+ bool
+ GetAllowJIT();
+
+ %feature("docstring", "Sets whether to JIT an expression if it cannot be interpreted.") SetAllowJIT;
+ void
+ SetAllowJIT(bool allow);
protected:
diff --git a/scripts/interface/SBFrame.i b/scripts/interface/SBFrame.i
index b8654cb0eb60..1ba2c2ebcd97 100644
--- a/scripts/interface/SBFrame.i
+++ b/scripts/interface/SBFrame.i
@@ -154,6 +154,17 @@ public:
IsInlined() const;
%feature("docstring", "
+ /// Return true if this frame is artificial (e.g a frame synthesized to
+ /// capture a tail call). Local variables may not be available in an artificial
+ /// frame.
+ ") IsArtificial;
+ bool
+ IsArtificial();
+
+ bool
+ IsArtificial() const;
+
+ %feature("docstring", "
/// The version that doesn't supply a 'use_dynamic' value will use the
/// target's default.
") EvaluateExpression;
diff --git a/scripts/interface/SBInitializerOptions.i b/scripts/interface/SBInitializerOptions.i
new file mode 100644
index 000000000000..9478642ebd6f
--- /dev/null
+++ b/scripts/interface/SBInitializerOptions.i
@@ -0,0 +1,24 @@
+//===-- SWIG Interface for SBInitializerOptions -----------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBInitializerOptions
+{
+public:
+ SBInitializerOptions ();
+ SBInitializerOptions (const lldb::SBInitializerOptions &rhs);
+ ~SBInitializerOptions();
+
+ void SetCaptureReproducer(bool b);
+ void SetReplayReproducer(bool b);
+ void SetReproducerPath(const char* path);
+};
+
+} // namespace lldb
diff --git a/scripts/interface/SBMemoryRegionInfo.i b/scripts/interface/SBMemoryRegionInfo.i
index d68770802618..c331fbd85599 100644
--- a/scripts/interface/SBMemoryRegionInfo.i
+++ b/scripts/interface/SBMemoryRegionInfo.i
@@ -44,6 +44,9 @@ public:
bool
IsMapped ();
+ const char *
+ GetName ();
+
bool
operator == (const lldb::SBMemoryRegionInfo &rhs) const;
diff --git a/scripts/interface/SBModule.i b/scripts/interface/SBModule.i
index adda954e5bfb..32b771c4d02d 100644
--- a/scripts/interface/SBModule.i
+++ b/scripts/interface/SBModule.i
@@ -332,6 +332,9 @@ public:
lldb::SBAddress
GetObjectFileHeaderAddress() const;
+ lldb::SBAddress
+ GetObjectFileEntryPointAddress() const;
+
bool
operator == (const lldb::SBModule &rhs) const;
diff --git a/scripts/interface/SBStructuredData.i b/scripts/interface/SBStructuredData.i
index 4e54cdd7b405..d30179c4d48b 100644
--- a/scripts/interface/SBStructuredData.i
+++ b/scripts/interface/SBStructuredData.i
@@ -38,6 +38,8 @@ namespace lldb {
size_t GetSize() const;
+ bool GetKeys(lldb::SBStringList &keys) const;
+
lldb::SBStructuredData GetValueForKey(const char *key) const;
lldb::SBStructuredData GetItemAtIndex(size_t idx) const;
diff --git a/scripts/interface/SBTarget.i b/scripts/interface/SBTarget.i
index 08fb268c08bf..1cc806db8386 100644
--- a/scripts/interface/SBTarget.i
+++ b/scripts/interface/SBTarget.i
@@ -373,6 +373,14 @@ public:
lldb::SBFileSpec
GetExecutable ();
+ %feature("docstring", "
+ /// Append the path mapping (from -> to) to the target's paths mapping list.
+ ") AppendImageSearchPath;
+ void
+ AppendImageSearchPath (const char *from,
+ const char *to,
+ SBError &error);
+
bool
AddModule (lldb::SBModule &module);
@@ -616,6 +624,11 @@ public:
lldb::addr_t offset, SBFileSpecList &module_list);
lldb::SBBreakpoint
+ BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line,
+ uint32_t column, lldb::addr_t offset,
+ SBFileSpecList &module_list);
+
+ lldb::SBBreakpoint
BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL);
lldb::SBBreakpoint
@@ -718,6 +731,74 @@ public:
lldb::SBBreakpoint
BreakpointCreateBySBAddress (SBAddress &sb_address);
+
+ %feature("docstring", "
+ //------------------------------------------------------------------
+ /// Create a breakpoint using a scripted resolver.
+ ///
+ /// @param[in] class_name
+ /// This is the name of the class that implements a scripted resolver.
+ /// The class should have the following signature:
+ /// class Resolver:
+ /// def __init__(self, bkpt, extra_args):
+ /// # bkpt - the breakpoint for which this is the resolver. When
+ /// # the resolver finds an interesting address, call AddLocation
+ /// # on this breakpoint to add it.
+ /// #
+ /// # extra_args - an SBStructuredData that can be used to
+ /// # parametrize this instance. Same as the extra_args passed
+ /// # to BreakpointCreateFromScript.
+ ///
+ /// def __get_depth__ (self):
+ /// # This is optional, but if defined, you should return the
+ /// # depth at which you want the callback to be called. The
+ /// # available options are:
+ /// # lldb.eSearchDepthModule
+ /// # lldb.eSearchDepthCompUnit
+ /// # The default if you don't implement this method is
+ /// # eSearchDepthModule.
+ ///
+ /// def __callback__(self, sym_ctx):
+ /// # sym_ctx - an SBSymbolContext that is the cursor in the
+ /// # search through the program to resolve breakpoints.
+ /// # The sym_ctx will be filled out to the depth requested in
+ /// # __get_depth__.
+ /// # Look in this sym_ctx for new breakpoint locations,
+ /// # and if found use bkpt.AddLocation to add them.
+ /// # Note, you will only get called for modules/compile_units that
+ /// # pass the SearchFilter provided by the module_list & file_list
+ /// # passed into BreakpointCreateFromScript.
+ ///
+ /// def get_short_help(self):
+ /// # Optional, but if implemented return a short string that will
+ /// # be printed at the beginning of the break list output for the
+ /// # breakpoint.
+ ///
+ /// @param[in] extra_args
+ /// This is an SBStructuredData object that will get passed to the
+ /// constructor of the class in class_name. You can use this to
+ /// reuse the same class, parametrizing it with entries from this
+ /// dictionary.
+ ///
+ /// @param module_list
+ /// If this is non-empty, this will be used as the module filter in the
+ /// SearchFilter created for this breakpoint.
+ ///
+ /// @param file_list
+ /// If this is non-empty, this will be used as the comp unit filter in the
+ /// SearchFilter created for this breakpoint.
+ ///
+ /// @return
+ /// An SBBreakpoint that will set locations based on the logic in the
+ /// resolver's search callback.
+ //------------------------------------------------------------------
+ ") BreakpointCreateFromScript;
+ lldb::SBBreakpoint BreakpointCreateFromScript(
+ const char *class_name,
+ SBStructuredData &extra_args,
+ const SBFileSpecList &module_list,
+ const SBFileSpecList &file_list,
+ bool request_hardware = false);
uint32_t
GetNumBreakpoints () const;
@@ -938,6 +1019,10 @@ public:
void
SetLaunchInfo (const lldb::SBLaunchInfo &launch_info);
+ void SetCollectingStats(bool v);
+
+ bool GetCollectingStats();
+
lldb::SBStructuredData GetStatistics();
bool
diff --git a/scripts/interface/SBThread.i b/scripts/interface/SBThread.i
index 60d77c783bb9..c12f176e42ed 100644
--- a/scripts/interface/SBThread.i
+++ b/scripts/interface/SBThread.i
@@ -397,6 +397,24 @@ public:
") GetExtendedBacktraceOriginatingIndexID;
uint32_t
GetExtendedBacktraceOriginatingIndexID();
+
+ %feature("autodoc","
+ Returns an SBValue object represeting the current exception for the thread,
+ if there is any. Currently, this works for Obj-C code and returns an SBValue
+ representing the NSException object at the throw site or that's currently
+ being processes.
+ ") GetCurrentException;
+ lldb::SBValue
+ GetCurrentException();
+
+ %feature("autodoc","
+ Returns a historical (fake) SBThread representing the stack trace of an
+ exception, if there is one for the thread. Currently, this works for Obj-C
+ code, and can retrieve the throw-site backtrace of an NSException object
+ even when the program is no longer at the throw site.
+ ") GetCurrentExceptionBacktrace;
+ lldb::SBThread
+ GetCurrentExceptionBacktrace();
%feature("autodoc","
Takes no arguments, returns a bool.
diff --git a/scripts/interface/SBThreadPlan.i b/scripts/interface/SBThreadPlan.i
index 9910314e873b..89291b39b2a9 100644
--- a/scripts/interface/SBThreadPlan.i
+++ b/scripts/interface/SBThreadPlan.i
@@ -106,6 +106,9 @@ public:
SBThreadPlan
QueueThreadPlanForRunToAddress (SBAddress address);
+ SBThreadPlan
+ QueueThreadPlanForStepScripted(const char *script_class_name);
+
protected:
friend class SBBreakpoint;
diff --git a/scripts/interface/SBVariablesOptions.i b/scripts/interface/SBVariablesOptions.i
index 3941a58d7bc9..8ce74140e63e 100644
--- a/scripts/interface/SBVariablesOptions.i
+++ b/scripts/interface/SBVariablesOptions.i
@@ -26,7 +26,13 @@ public:
void
SetIncludeArguments (bool);
-
+
+ bool
+ GetIncludeRecognizedArguments (const lldb::SBTarget &) const;
+
+ void
+ SetIncludeRecognizedArguments (bool);
+
bool
GetIncludeLocals () const;