aboutsummaryrefslogtreecommitdiffstats
path: root/include/lldb/Interpreter
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:53:01 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:53:01 +0000
commitead246455adf1a215ec2715dad6533073a6beb4e (patch)
treef3f97a47d77053bf96fe74cdbd6fae74380e8a92 /include/lldb/Interpreter
parentfdb00c4408990a0a63ef7f496d809ce59f263bc5 (diff)
downloadsrc-vendor/lldb.tar.gz
src-vendor/lldb.zip
Vendor import of stripped lldb trunk r375505, the last commit before thevendor/lldb/lldb-trunk-r375505vendor/lldb
upstream Subversion repository was made read-only, and the LLVM project migrated to GitHub: https://llvm.org/svn/llvm-project/lldb/trunk@375505
Notes
Notes: svn path=/vendor/lldb/dist/; revision=353952 svn path=/vendor/lldb/lldb-r375505/; revision=353953; tag=vendor/lldb/lldb-trunk-r375505
Diffstat (limited to 'include/lldb/Interpreter')
-rw-r--r--include/lldb/Interpreter/CommandAlias.h8
-rw-r--r--include/lldb/Interpreter/CommandCompletions.h87
-rw-r--r--include/lldb/Interpreter/CommandInterpreter.h35
-rw-r--r--include/lldb/Interpreter/CommandObject.h33
-rw-r--r--include/lldb/Interpreter/CommandObjectMultiword.h10
-rw-r--r--include/lldb/Interpreter/CommandObjectRegexCommand.h2
-rw-r--r--include/lldb/Interpreter/CommandReturnObject.h24
-rw-r--r--include/lldb/Interpreter/OptionGroupPythonClassWithDict.h65
-rw-r--r--include/lldb/Interpreter/OptionValue.h4
-rw-r--r--include/lldb/Interpreter/OptionValueArch.h4
-rw-r--r--include/lldb/Interpreter/OptionValueBoolean.h4
-rw-r--r--include/lldb/Interpreter/OptionValueEnumeration.h4
-rw-r--r--include/lldb/Interpreter/OptionValueFileSpec.h4
-rw-r--r--include/lldb/Interpreter/OptionValueFormatEntity.h4
-rw-r--r--include/lldb/Interpreter/OptionValueRegex.h6
-rw-r--r--include/lldb/Interpreter/OptionValueUUID.h4
-rw-r--r--include/lldb/Interpreter/Options.h9
-rw-r--r--include/lldb/Interpreter/ScriptInterpreter.h7
18 files changed, 157 insertions, 157 deletions
diff --git a/include/lldb/Interpreter/CommandAlias.h b/include/lldb/Interpreter/CommandAlias.h
index c2a7a383f35a..1e186d77f8e6 100644
--- a/include/lldb/Interpreter/CommandAlias.h
+++ b/include/lldb/Interpreter/CommandAlias.h
@@ -36,11 +36,11 @@ public:
bool WantsCompletion() override;
- int HandleCompletion(CompletionRequest &request) override;
+ void HandleCompletion(CompletionRequest &request) override;
- int HandleArgumentCompletion(
- CompletionRequest &request,
- OptionElementVector &opt_element_vector) override;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override;
Options *GetOptions() override;
diff --git a/include/lldb/Interpreter/CommandCompletions.h b/include/lldb/Interpreter/CommandCompletions.h
index 3d09db5ce5e7..275cc7e7c145 100644
--- a/include/lldb/Interpreter/CommandCompletions.h
+++ b/include/lldb/Interpreter/CommandCompletions.h
@@ -26,10 +26,10 @@ public:
// This is the command completion callback that is used to complete the
// argument of the option it is bound to (in the OptionDefinition table
// below). Return the total number of matches.
- typedef int (*CompletionCallback)(CommandInterpreter &interpreter,
- CompletionRequest &request,
- // A search filter to limit the search...
- lldb_private::SearchFilter *searcher);
+ typedef void (*CompletionCallback)(CommandInterpreter &interpreter,
+ CompletionRequest &request,
+ // A search filter to limit the search...
+ lldb_private::SearchFilter *searcher);
enum CommonCompletionTypes {
eNoCompletion = 0u,
eSourceFileCompletion = (1u << 0),
@@ -57,42 +57,42 @@ public:
lldb_private::CompletionRequest &request, SearchFilter *searcher);
// These are the generic completer functions:
- static int DiskFiles(CommandInterpreter &interpreter,
- CompletionRequest &request, SearchFilter *searcher);
+ static void DiskFiles(CommandInterpreter &interpreter,
+ CompletionRequest &request, SearchFilter *searcher);
- static int DiskFiles(const llvm::Twine &partial_file_name,
- StringList &matches, TildeExpressionResolver &Resolver);
+ static void DiskFiles(const llvm::Twine &partial_file_name,
+ StringList &matches, TildeExpressionResolver &Resolver);
- static int DiskDirectories(CommandInterpreter &interpreter,
- CompletionRequest &request,
- SearchFilter *searcher);
+ static void DiskDirectories(CommandInterpreter &interpreter,
+ CompletionRequest &request,
+ SearchFilter *searcher);
- static int DiskDirectories(const llvm::Twine &partial_file_name,
- StringList &matches,
- TildeExpressionResolver &Resolver);
+ static void DiskDirectories(const llvm::Twine &partial_file_name,
+ StringList &matches,
+ TildeExpressionResolver &Resolver);
- static int SourceFiles(CommandInterpreter &interpreter,
- CompletionRequest &request, SearchFilter *searcher);
+ static void SourceFiles(CommandInterpreter &interpreter,
+ CompletionRequest &request, SearchFilter *searcher);
- static int Modules(CommandInterpreter &interpreter,
- CompletionRequest &request, SearchFilter *searcher);
+ static void Modules(CommandInterpreter &interpreter,
+ CompletionRequest &request, SearchFilter *searcher);
- static int Symbols(CommandInterpreter &interpreter,
- CompletionRequest &request, SearchFilter *searcher);
+ static void Symbols(CommandInterpreter &interpreter,
+ CompletionRequest &request, SearchFilter *searcher);
- static int SettingsNames(CommandInterpreter &interpreter,
- CompletionRequest &request, SearchFilter *searcher);
+ static void SettingsNames(CommandInterpreter &interpreter,
+ CompletionRequest &request, SearchFilter *searcher);
- static int PlatformPluginNames(CommandInterpreter &interpreter,
- CompletionRequest &request,
- SearchFilter *searcher);
+ static void PlatformPluginNames(CommandInterpreter &interpreter,
+ CompletionRequest &request,
+ SearchFilter *searcher);
- static int ArchitectureNames(CommandInterpreter &interpreter,
- CompletionRequest &request,
- SearchFilter *searcher);
+ static void ArchitectureNames(CommandInterpreter &interpreter,
+ CompletionRequest &request,
+ SearchFilter *searcher);
- static int VariablePath(CommandInterpreter &interpreter,
- CompletionRequest &request, SearchFilter *searcher);
+ static void VariablePath(CommandInterpreter &interpreter,
+ CompletionRequest &request, SearchFilter *searcher);
// The Completer class is a convenient base class for building searchers that
// go along with the SearchFilter passed to the standard Completer functions.
@@ -103,11 +103,11 @@ public:
~Completer() override;
CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context,
- Address *addr, bool complete) override = 0;
+ Address *addr) override = 0;
lldb::SearchDepth GetDepth() override = 0;
- virtual size_t DoCompletion(SearchFilter *filter) = 0;
+ virtual void DoCompletion(SearchFilter *filter) = 0;
protected:
CommandInterpreter &m_interpreter;
@@ -127,10 +127,9 @@ public:
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
SymbolContext &context,
- Address *addr,
- bool complete) override;
+ Address *addr) override;
- size_t DoCompletion(SearchFilter *filter) override;
+ void DoCompletion(SearchFilter *filter) override;
private:
bool m_include_support_files;
@@ -151,10 +150,9 @@ public:
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
SymbolContext &context,
- Address *addr,
- bool complete) override;
+ Address *addr) override;
- size_t DoCompletion(SearchFilter *filter) override;
+ void DoCompletion(SearchFilter *filter) override;
private:
const char *m_file_name;
@@ -173,20 +171,11 @@ public:
Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
SymbolContext &context,
- Address *addr,
- bool complete) override;
+ Address *addr) override;
- size_t DoCompletion(SearchFilter *filter) override;
+ void DoCompletion(SearchFilter *filter) override;
private:
- // struct NameCmp {
- // bool operator() (const ConstString& lhs, const ConstString&
- // rhs) const
- // {
- // return lhs < rhs;
- // }
- // };
-
RegularExpression m_regex;
typedef std::set<ConstString> collection;
collection m_match_set;
diff --git a/include/lldb/Interpreter/CommandInterpreter.h b/include/lldb/Interpreter/CommandInterpreter.h
index c3dd6606e0db..3b98b2a521dd 100644
--- a/include/lldb/Interpreter/CommandInterpreter.h
+++ b/include/lldb/Interpreter/CommandInterpreter.h
@@ -308,31 +308,12 @@ public:
CommandObject *GetCommandObjectForCommand(llvm::StringRef &command_line);
- // This handles command line completion. You are given a pointer to the
- // command string buffer, to the current cursor, and to the end of the string
- // (in case it is not NULL terminated). You also passed in an StringList
- // object to fill with the returns. The first element of the array will be
- // filled with the string that you would need to insert at the cursor point
- // to complete the cursor point to the longest common matching prefix. If you
- // want to limit the number of elements returned, set max_return_elements to
- // the number of elements you want returned. Otherwise set
- // max_return_elements to -1. If you want to start some way into the match
- // list, then set match_start_point to the desired start point. Returns: -1
- // if the completion character should be inserted -2 if the entire command
- // line should be deleted and replaced with matches.GetStringAtIndex(0)
- // INT_MAX if the number of matches is > max_return_elements, but it is
- // expensive to compute. Otherwise, returns the number of matches.
- //
- // FIXME: Only max_return_elements == -1 is supported at present.
- int HandleCompletion(const char *current_line, const char *cursor,
- const char *last_char, int match_start_point,
- int max_return_elements, StringList &matches,
- StringList &descriptions);
-
- // This version just returns matches, and doesn't compute the substring. It
- // is here so the Help command can call it for the first argument. It uses
- // a CompletionRequest for simplicity reasons.
- int HandleCompletionMatches(CompletionRequest &request);
+ // This handles command line completion.
+ void HandleCompletion(CompletionRequest &request);
+
+ // This version just returns matches, and doesn't compute the substring. It
+ // is here so the Help command can call it for the first argument.
+ void HandleCompletionMatches(CompletionRequest &request);
int GetCommandNamesMatchingPartialString(const char *cmd_cstr,
bool include_aliases,
@@ -519,7 +500,9 @@ protected:
bool IOHandlerInterrupt(IOHandler &io_handler) override;
- size_t GetProcessOutput();
+ void GetProcessOutput();
+
+ bool DidProcessStopAbnormally() const;
void SetSynchronous(bool value);
diff --git a/include/lldb/Interpreter/CommandObject.h b/include/lldb/Interpreter/CommandObject.h
index 31f7f126a9fe..2dad84f036c0 100644
--- a/include/lldb/Interpreter/CommandObject.h
+++ b/include/lldb/Interpreter/CommandObject.h
@@ -228,36 +228,18 @@ public:
///
/// \param[in/out] request
/// The completion request that needs to be answered.
- ///
- /// FIXME: This is the wrong return value, since we also need to make a
- /// distinction between
- /// total number of matches, and the window the user wants returned.
- ///
- /// \return
- /// \btrue if we were in an option, \bfalse otherwise.
- virtual int HandleCompletion(CompletionRequest &request);
+ virtual void HandleCompletion(CompletionRequest &request);
- /// The input array contains a parsed version of the line. The insertion
- /// point is given by cursor_index (the index in input of the word containing
- /// the cursor) and cursor_char_position (the position of the cursor in that
- /// word.)
+ /// The input array contains a parsed version of the line.
+ ///
/// We've constructed the map of options and their arguments as well if that
/// is helpful for the completion.
///
/// \param[in/out] request
/// The completion request that needs to be answered.
- ///
- /// FIXME: This is the wrong return value, since we also need to make a
- /// distinction between
- /// total number of matches, and the window the user wants returned.
- ///
- /// \return
- /// The number of completions.
- virtual int
+ virtual void
HandleArgumentCompletion(CompletionRequest &request,
- OptionElementVector &opt_element_vector) {
- return 0;
- }
+ OptionElementVector &opt_element_vector) {}
bool HelpTextContainsWord(llvm::StringRef search_word,
bool search_short_help = true,
@@ -348,8 +330,9 @@ protected:
// 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.
- Target *GetSelectedOrDummyTarget(bool prefer_dummy = false);
- Target *GetDummyTarget();
+ Target &GetSelectedOrDummyTarget(bool prefer_dummy = false);
+ Target &GetSelectedTarget();
+ Target &GetDummyTarget();
// If a command needs to use the "current" thread, use this call. Command
// objects will have an ExecutionContext to use, and that may or may not have
diff --git a/include/lldb/Interpreter/CommandObjectMultiword.h b/include/lldb/Interpreter/CommandObjectMultiword.h
index 660e9d49d977..72ec8a9c5ca9 100644
--- a/include/lldb/Interpreter/CommandObjectMultiword.h
+++ b/include/lldb/Interpreter/CommandObjectMultiword.h
@@ -50,7 +50,7 @@ public:
bool WantsRawCommandString() override { return false; }
- int HandleCompletion(CompletionRequest &request) override;
+ void HandleCompletion(CompletionRequest &request) override;
const char *GetRepeatCommand(Args &current_command_args,
uint32_t index) override;
@@ -112,11 +112,11 @@ public:
Options *GetOptions() override;
- int HandleCompletion(CompletionRequest &request) override;
+ void HandleCompletion(CompletionRequest &request) override;
- int HandleArgumentCompletion(
- CompletionRequest &request,
- OptionElementVector &opt_element_vector) override;
+ void
+ HandleArgumentCompletion(CompletionRequest &request,
+ OptionElementVector &opt_element_vector) override;
const char *GetRepeatCommand(Args &current_command_args,
uint32_t index) override;
diff --git a/include/lldb/Interpreter/CommandObjectRegexCommand.h b/include/lldb/Interpreter/CommandObjectRegexCommand.h
index 7f06e269d64f..7800d5de1b38 100644
--- a/include/lldb/Interpreter/CommandObjectRegexCommand.h
+++ b/include/lldb/Interpreter/CommandObjectRegexCommand.h
@@ -34,7 +34,7 @@ public:
bool HasRegexEntries() const { return !m_entries.empty(); }
- int HandleCompletion(CompletionRequest &request) override;
+ void HandleCompletion(CompletionRequest &request) override;
protected:
bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
diff --git a/include/lldb/Interpreter/CommandReturnObject.h b/include/lldb/Interpreter/CommandReturnObject.h
index a5f61261455e..61e57fb798a1 100644
--- a/include/lldb/Interpreter/CommandReturnObject.h
+++ b/include/lldb/Interpreter/CommandReturnObject.h
@@ -62,13 +62,13 @@ public:
return m_err_stream;
}
- void SetImmediateOutputFile(FILE *fh, bool transfer_fh_ownership = false) {
- lldb::StreamSP stream_sp(new StreamFile(fh, transfer_fh_ownership));
+ void SetImmediateOutputFile(lldb::FileSP file_sp) {
+ lldb::StreamSP stream_sp(new StreamFile(file_sp));
m_out_stream.SetStreamAtIndex(eImmediateStreamIndex, stream_sp);
}
- void SetImmediateErrorFile(FILE *fh, bool transfer_fh_ownership = false) {
- lldb::StreamSP stream_sp(new StreamFile(fh, transfer_fh_ownership));
+ void SetImmediateErrorFile(lldb::FileSP file_sp) {
+ lldb::StreamSP stream_sp(new StreamFile(file_sp));
m_err_stream.SetStreamAtIndex(eImmediateStreamIndex, stream_sp);
}
@@ -144,14 +144,6 @@ public:
void SetInteractive(bool b);
- bool GetAbnormalStopWasExpected() const {
- return m_abnormal_stop_was_expected;
- }
-
- void SetAbnormalStopWasExpected(bool signal_was_expected) {
- m_abnormal_stop_was_expected = signal_was_expected;
- }
-
private:
enum { eStreamStringIndex = 0, eImmediateStreamIndex = 1 };
@@ -162,14 +154,6 @@ private:
bool m_did_change_process_state;
bool m_interactive; // If true, then the input handle from the debugger will
// be hooked up
- bool m_abnormal_stop_was_expected; // This is to support
- // eHandleCommandFlagStopOnCrash vrs.
- // attach.
- // The attach command often ends up with the process stopped due to a signal.
- // Normally that would mean stop on crash should halt batch execution, but we
- // obviously don't want that for attach. Using this flag, the attach command
- // (and anything else for which this is relevant) can say that the signal is
- // expected, and batch command execution can continue.
};
} // namespace lldb_private
diff --git a/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h b/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h
new file mode 100644
index 000000000000..6aec7eb0f0b8
--- /dev/null
+++ b/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h
@@ -0,0 +1,65 @@
+//===-- OptionGroupPythonClassWithDict.h -------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_OptionGroupPythonClassWithDict_h_
+#define liblldb_OptionGroupPythonClassWithDict_h_
+
+#include "lldb/lldb-types.h"
+#include "lldb/Interpreter/Options.h"
+#include "lldb/Utility/StructuredData.h"
+
+namespace lldb_private {
+
+// Use this Option group if you have a python class that implements some
+// Python extension point, and you pass a SBStructuredData to the class
+// __init__ method.
+// class_option specifies the class name
+// the key and value options are read in in pairs, and a
+// StructuredData::Dictionary is constructed with those pairs.
+class OptionGroupPythonClassWithDict : public OptionGroup {
+public:
+ OptionGroupPythonClassWithDict(const char *class_use,
+ int class_option = 'C',
+ int key_option = 'k',
+ int value_option = 'v',
+ const char *class_long_option = "python-class",
+ const char *key_long_option = "python-class-key",
+ const char *value_long_option = "python-class-value",
+ bool required = false);
+
+ ~OptionGroupPythonClassWithDict() override;
+
+ llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
+ return llvm::ArrayRef<OptionDefinition>(m_option_definition);
+ }
+
+ Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+ ExecutionContext *execution_context) override;
+ Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+
+ void OptionParsingStarting(ExecutionContext *execution_context) override;
+ Status OptionParsingFinished(ExecutionContext *execution_context) override;
+
+ const StructuredData::DictionarySP GetStructuredData() {
+ return m_dict_sp;
+ }
+ const std::string &GetClassName() {
+ return m_class_name;
+ }
+
+protected:
+ std::string m_class_name;
+ std::string m_current_key;
+ StructuredData::DictionarySP m_dict_sp;
+ std::string m_class_usage_text, m_key_usage_text, m_value_usage_text;
+ OptionDefinition m_option_definition[3];
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_OptionGroupPythonClassWithDict_h_
diff --git a/include/lldb/Interpreter/OptionValue.h b/include/lldb/Interpreter/OptionValue.h
index 0b85bc19dd2a..9fc18551c26a 100644
--- a/include/lldb/Interpreter/OptionValue.h
+++ b/include/lldb/Interpreter/OptionValue.h
@@ -93,8 +93,8 @@ public:
virtual lldb::OptionValueSP DeepCopy() const = 0;
- virtual size_t AutoComplete(CommandInterpreter &interpreter,
- CompletionRequest &request);
+ virtual void AutoComplete(CommandInterpreter &interpreter,
+ CompletionRequest &request);
// Subclasses can override these functions
virtual lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
diff --git a/include/lldb/Interpreter/OptionValueArch.h b/include/lldb/Interpreter/OptionValueArch.h
index f8f406890841..3923e3d3dba4 100644
--- a/include/lldb/Interpreter/OptionValueArch.h
+++ b/include/lldb/Interpreter/OptionValueArch.h
@@ -55,8 +55,8 @@ public:
lldb::OptionValueSP DeepCopy() const override;
- size_t AutoComplete(CommandInterpreter &interpreter,
- lldb_private::CompletionRequest &request) override;
+ void AutoComplete(CommandInterpreter &interpreter,
+ lldb_private::CompletionRequest &request) override;
// Subclass specific functions
diff --git a/include/lldb/Interpreter/OptionValueBoolean.h b/include/lldb/Interpreter/OptionValueBoolean.h
index 2fc97d494988..42b2ca4d2845 100644
--- a/include/lldb/Interpreter/OptionValueBoolean.h
+++ b/include/lldb/Interpreter/OptionValueBoolean.h
@@ -43,8 +43,8 @@ public:
return true;
}
- size_t AutoComplete(CommandInterpreter &interpreter,
- CompletionRequest &request) override;
+ void AutoComplete(CommandInterpreter &interpreter,
+ CompletionRequest &request) override;
// Subclass specific functions
diff --git a/include/lldb/Interpreter/OptionValueEnumeration.h b/include/lldb/Interpreter/OptionValueEnumeration.h
index 71f3ab53b2ff..eb19737f8653 100644
--- a/include/lldb/Interpreter/OptionValueEnumeration.h
+++ b/include/lldb/Interpreter/OptionValueEnumeration.h
@@ -55,8 +55,8 @@ public:
lldb::OptionValueSP DeepCopy() const override;
- size_t AutoComplete(CommandInterpreter &interpreter,
- CompletionRequest &request) override;
+ void AutoComplete(CommandInterpreter &interpreter,
+ CompletionRequest &request) override;
// Subclass specific functions
diff --git a/include/lldb/Interpreter/OptionValueFileSpec.h b/include/lldb/Interpreter/OptionValueFileSpec.h
index aa1022a4fe2c..a6df18149076 100644
--- a/include/lldb/Interpreter/OptionValueFileSpec.h
+++ b/include/lldb/Interpreter/OptionValueFileSpec.h
@@ -51,8 +51,8 @@ public:
lldb::OptionValueSP DeepCopy() const override;
- size_t AutoComplete(CommandInterpreter &interpreter,
- CompletionRequest &request) override;
+ void AutoComplete(CommandInterpreter &interpreter,
+ CompletionRequest &request) override;
// Subclass specific functions
diff --git a/include/lldb/Interpreter/OptionValueFormatEntity.h b/include/lldb/Interpreter/OptionValueFormatEntity.h
index b05be959f3d4..419ff5c03e3a 100644
--- a/include/lldb/Interpreter/OptionValueFormatEntity.h
+++ b/include/lldb/Interpreter/OptionValueFormatEntity.h
@@ -38,8 +38,8 @@ public:
lldb::OptionValueSP DeepCopy() const override;
- size_t AutoComplete(CommandInterpreter &interpreter,
- CompletionRequest &request) override;
+ void AutoComplete(CommandInterpreter &interpreter,
+ CompletionRequest &request) override;
// Subclass specific functions
diff --git a/include/lldb/Interpreter/OptionValueRegex.h b/include/lldb/Interpreter/OptionValueRegex.h
index f5b2557634df..8c10dacb0313 100644
--- a/include/lldb/Interpreter/OptionValueRegex.h
+++ b/include/lldb/Interpreter/OptionValueRegex.h
@@ -36,7 +36,7 @@ public:
VarSetOperationType = eVarSetOperationAssign) = delete;
bool Clear() override {
- m_regex.Clear();
+ m_regex = RegularExpression();
m_value_was_set = false;
return true;
}
@@ -50,9 +50,9 @@ public:
void SetCurrentValue(const char *value) {
if (value && value[0])
- m_regex.Compile(llvm::StringRef(value));
+ m_regex = RegularExpression(llvm::StringRef(value));
else
- m_regex.Clear();
+ m_regex = RegularExpression();
}
bool IsValid() const { return m_regex.IsValid(); }
diff --git a/include/lldb/Interpreter/OptionValueUUID.h b/include/lldb/Interpreter/OptionValueUUID.h
index 7273e35bd75b..576440d80519 100644
--- a/include/lldb/Interpreter/OptionValueUUID.h
+++ b/include/lldb/Interpreter/OptionValueUUID.h
@@ -52,8 +52,8 @@ public:
void SetCurrentValue(const UUID &value) { m_uuid = value; }
- size_t AutoComplete(CommandInterpreter &interpreter,
- CompletionRequest &request) override;
+ void AutoComplete(CommandInterpreter &interpreter,
+ CompletionRequest &request) override;
protected:
UUID m_uuid;
diff --git a/include/lldb/Interpreter/Options.h b/include/lldb/Interpreter/Options.h
index a008d51d721e..b6c824d5a199 100644
--- a/include/lldb/Interpreter/Options.h
+++ b/include/lldb/Interpreter/Options.h
@@ -187,14 +187,7 @@ public:
///
/// \param[in] interpreter
/// The command interpreter doing the completion.
- ///
- /// FIXME: This is the wrong return value, since we also need to
- /// make a distinction between total number of matches, and the window the
- /// user wants returned.
- ///
- /// \return
- /// \btrue if we were in an option, \bfalse otherwise.
- virtual bool
+ virtual void
HandleOptionArgumentCompletion(lldb_private::CompletionRequest &request,
OptionElementVector &opt_element_vector,
int opt_element_index,
diff --git a/include/lldb/Interpreter/ScriptInterpreter.h b/include/lldb/Interpreter/ScriptInterpreter.h
index c8fa3901350d..23fadf02e591 100644
--- a/include/lldb/Interpreter/ScriptInterpreter.h
+++ b/include/lldb/Interpreter/ScriptInterpreter.h
@@ -65,6 +65,9 @@ public:
bool GetSetLLDBGlobals() const { return m_set_lldb_globals; }
+ // If this is true then any exceptions raised by the script will be
+ // cleared with PyErr_Clear(). If false then they will be left for
+ // the caller to clean up
bool GetMaskoutErrors() const { return m_maskout_errors; }
ExecuteScriptOptions &SetEnableIO(bool enable) {
@@ -208,6 +211,8 @@ public:
virtual StructuredData::ObjectSP
CreateScriptedThreadPlan(const char *class_name,
+ StructuredDataImpl *args_data,
+ std::string &error_str,
lldb::ThreadPlanSP thread_plan_sp) {
return StructuredData::ObjectSP();
}
@@ -463,8 +468,6 @@ public:
static lldb::ScriptLanguage StringToLanguage(const llvm::StringRef &string);
- virtual void ResetOutputFileHandle(FILE *new_fh) {} // By default, do nothing.
-
lldb::ScriptLanguage GetLanguage() { return m_script_lang; }
protected: