summaryrefslogtreecommitdiffstats
path: root/lldb/include
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2015-10-20 00:23:46 +0000
committerSean Callanan <scallanan@apple.com>2015-10-20 00:23:46 +0000
commit3e7e915dca7dd543f11bdb6312e95a857df22618 (patch)
tree3641b5e85d967bd28f923e234999388a24fbdfd9 /lldb/include
parent7449ab983473b57a5b0980fb1cdbae8f67f43e60 (diff)
downloadbcm5719-llvm-3e7e915dca7dd543f11bdb6312e95a857df22618.tar.gz
bcm5719-llvm-3e7e915dca7dd543f11bdb6312e95a857df22618.zip
Added support for the "--repl" argument to LLDB.
This makes LLDB launch and create a REPL, specifying no target so that the REPL can create one for itself. Also added the "--repl-language" option, which specifies the language to use. Plumbed the relevant arguments and errors through the REPL creation mechanism. llvm-svn: 250773
Diffstat (limited to 'lldb/include')
-rw-r--r--lldb/include/lldb/API/SBDebugger.h3
-rw-r--r--lldb/include/lldb/Core/Debugger.h3
-rw-r--r--lldb/include/lldb/Expression/REPL.h20
-rw-r--r--lldb/include/lldb/Target/Target.h2
-rw-r--r--lldb/include/lldb/lldb-private-interfaces.h2
5 files changed, 27 insertions, 3 deletions
diff --git a/lldb/include/lldb/API/SBDebugger.h b/lldb/include/lldb/API/SBDebugger.h
index 4f2c1d7f875..3bb2fa39edf 100644
--- a/lldb/include/lldb/API/SBDebugger.h
+++ b/lldb/include/lldb/API/SBDebugger.h
@@ -329,6 +329,9 @@ public:
int &num_errors,
bool &quit_requested,
bool &stopped_for_crash);
+
+ SBError
+ RunREPL (lldb::LanguageType language, const char *repl_options);
private:
friend class SBCommandInterpreter;
diff --git a/lldb/include/lldb/Core/Debugger.h b/lldb/include/lldb/Core/Debugger.h
index b3cd9133737..90de3029ed0 100644
--- a/lldb/include/lldb/Core/Debugger.h
+++ b/lldb/include/lldb/Core/Debugger.h
@@ -375,6 +375,9 @@ public:
{
return m_event_handler_thread.IsJoinable();
}
+
+ Error
+ RunREPL (lldb::LanguageType language, const char *repl_options);
// This is for use in the command interpreter, when you either want the selected target, or if no target
// is present you want to prime the dummy target with entities that will be copied over to new targets.
diff --git a/lldb/include/lldb/Expression/REPL.h b/lldb/include/lldb/Expression/REPL.h
index 0cbe4d38a14..8e1ada82d70 100644
--- a/lldb/include/lldb/Expression/REPL.h
+++ b/lldb/include/lldb/Expression/REPL.h
@@ -37,8 +37,26 @@ public:
virtual ~REPL();
+ //------------------------------------------------------------------
+ /// Get a REPL with an (optional) existing target, and (optional) extra arguments for the compiler.
+ ///
+ /// @param[out] error
+ /// If this language is supported but the REPL couldn't be created, this error is populated with the reason.
+ ///
+ /// @param[in] language
+ /// The language to create a REPL for.
+ ///
+ /// @param[in] target
+ /// If provided, the target to put the REPL inside.
+ ///
+ /// @param[in] repl_options
+ /// If provided, additional options for the compiler when parsing REPL expressions.
+ ///
+ /// @return
+ /// The range of the containing object in the target process.
+ //------------------------------------------------------------------
static lldb::REPLSP
- Create (lldb::LanguageType language, Target *target);
+ Create (Error &Error, lldb::LanguageType language, Target *target, const char *repl_options);
void
SetFormatOptions (const OptionGroupFormat &options)
diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h
index 4b29da454c4..9fdd0cc0c93 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -1568,7 +1568,7 @@ public:
GetSearchFilterForModuleAndCUList (const FileSpecList *containingModules, const FileSpecList *containingSourceFiles);
lldb::REPLSP
- GetREPL (lldb::LanguageType, bool can_create);
+ GetREPL (Error &err, lldb::LanguageType language, const char *repl_options, bool can_create);
protected:
//------------------------------------------------------------------
diff --git a/lldb/include/lldb/lldb-private-interfaces.h b/lldb/include/lldb/lldb-private-interfaces.h
index 615c1bc0cbb..d967e9d3ab1 100644
--- a/lldb/include/lldb/lldb-private-interfaces.h
+++ b/lldb/include/lldb/lldb-private-interfaces.h
@@ -49,7 +49,7 @@ namespace lldb_private
typedef lldb::InstrumentationRuntimeType (*InstrumentationRuntimeGetType) ();
typedef lldb::InstrumentationRuntimeSP (*InstrumentationRuntimeCreateInstance) (const lldb::ProcessSP &process_sp);
typedef lldb::TypeSystemSP (*TypeSystemCreateInstance) (lldb::LanguageType language, Module *module, Target *target);
- typedef lldb::REPLSP (*REPLCreateInstance) (lldb::LanguageType language, Target *target);
+ typedef lldb::REPLSP (*REPLCreateInstance) (Error &error, lldb::LanguageType language, Target *target, const char *repl_options);
typedef void (*TypeSystemEnumerateSupportedLanguages) (std::set<lldb::LanguageType> &languages_for_types, std::set<lldb::LanguageType> &languages_for_expressions);
typedef int (*ComparisonFunction)(const void *, const void *);
typedef void (*DebuggerInitializeCallback)(Debugger &debugger);
OpenPOWER on IntegriCloud