diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-06 20:12:03 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-06 20:12:03 +0000 | 
| commit | 9e6d35490a6542f9c97607f93c2ef8ca8e03cbcc (patch) | |
| tree | dd2a1ddf0476664c2b823409c36cbccd52662ca7 /source/Interpreter | |
| parent | 3bd2e91faeb9eeec1aae82c64a3253afff551cfd (diff) | |
Notes
Diffstat (limited to 'source/Interpreter')
| -rw-r--r-- | source/Interpreter/CMakeLists.txt | 45 | ||||
| -rw-r--r-- | source/Interpreter/CommandHistory.cpp | 4 | ||||
| -rw-r--r-- | source/Interpreter/Makefile | 51 | 
3 files changed, 98 insertions, 2 deletions
diff --git a/source/Interpreter/CMakeLists.txt b/source/Interpreter/CMakeLists.txt new file mode 100644 index 0000000000000..b92128cd30117 --- /dev/null +++ b/source/Interpreter/CMakeLists.txt @@ -0,0 +1,45 @@ +add_lldb_library(lldbInterpreter +  Args.cpp +  CommandHistory.cpp +  CommandInterpreter.cpp +  CommandObject.cpp +  CommandObjectRegexCommand.cpp +  CommandObjectScript.cpp +  CommandOptionValidators.cpp +  CommandReturnObject.cpp +  OptionGroupArchitecture.cpp +  OptionGroupBoolean.cpp +  OptionGroupFile.cpp +  OptionGroupFormat.cpp +  OptionGroupOutputFile.cpp +  OptionGroupPlatform.cpp +  OptionGroupString.cpp +  OptionGroupUInt64.cpp +  OptionGroupUUID.cpp +  OptionGroupValueObjectDisplay.cpp +  OptionValue.cpp +  OptionValueArch.cpp +  OptionValueArgs.cpp +  OptionValueArray.cpp +  OptionValueBoolean.cpp +  OptionValueChar.cpp +  OptionValueDictionary.cpp +  OptionValueEnumeration.cpp +  OptionValueFileSpec.cpp +  OptionValueFileSpecLIst.cpp +  OptionValueFormat.cpp +  OptionValueFormatEntity.cpp +  OptionValueLanguage.cpp +  OptionValuePathMappings.cpp +  OptionValueProperties.cpp +  OptionValueRegex.cpp +  OptionValueSInt64.cpp +  OptionValueString.cpp +  OptionValueUInt64.cpp +  OptionValueUUID.cpp +  OptionGroupVariable.cpp +  OptionGroupWatchpoint.cpp +  Options.cpp +  Property.cpp +  ScriptInterpreter.cpp +  ) diff --git a/source/Interpreter/CommandHistory.cpp b/source/Interpreter/CommandHistory.cpp index bbe64b446accf..9d3c814697b01 100644 --- a/source/Interpreter/CommandHistory.cpp +++ b/source/Interpreter/CommandHistory.cpp @@ -130,9 +130,9 @@ CommandHistory::Dump (Stream& stream,                        size_t stop_idx) const  {      Mutex::Locker locker(m_mutex); -    stop_idx = std::min(stop_idx, m_history.size() - 1); +    stop_idx = std::min(stop_idx + 1, m_history.size());      for (size_t counter = start_idx; -         counter <= stop_idx; +         counter < stop_idx;           counter++)      {          const std::string hist_item = m_history[counter]; diff --git a/source/Interpreter/Makefile b/source/Interpreter/Makefile new file mode 100644 index 0000000000000..2f25e67966040 --- /dev/null +++ b/source/Interpreter/Makefile @@ -0,0 +1,51 @@ +##===- source/Interpreter/Makefile  ------------------------*- Makefile -*-===## +#  +#                     The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +#  +##===----------------------------------------------------------------------===## + +LLDB_LEVEL := ../.. +LIBRARYNAME := lldbInterpreter +BUILD_ARCHIVE = 1 +include $(LLDB_LEVEL)/../../Makefile.config + +ifneq ($(HOST_OS),MingW) +ifeq (,$(findstring -DLLDB_DISABLE_PYTHON,$(CXXFLAGS))) +DO_BUILD_LLDBWrapPython = 1 +BUILT_SOURCES := LLDBWrapPython.cpp +endif +endif + +include $(LLDB_LEVEL)/Makefile +-include $(PROJ_OBJ_DIR)/LLDBWrapPython.cpp.d + +ifeq ($(DO_BUILD_LLDBWrapPython),1) +# Drop -Wfour-char-constants,  which we are not currently clean with. +EXTRA_OPTIONS += -Wno-four-char-constants + +# Drop -Wself-assign, -Wmissing-field-initializers, -Wsometimes-uninitialized, +# -Wcast-qual, and -Wdeprecated-register which we are not clean with due to SWIG +# generated cpp source. +EXTRA_OPTIONS += -Wno-missing-field-initializers -Wno-self-assign -Wno-sometimes-uninitialized -Wno-cast-qual -Wno-deprecated-register + +PYTHON_DIR := $(PROJ_OBJ_ROOT)/$(BuildMode) + +SWIG_SOURCES := $(shell find $(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts -type f -name '*.swig' -print) + +LLDBWrapPython.cpp lldb.py: $(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/Python/modify-python-lldb.py \ +                            $(wildcard $(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/interface/*.i) \ +                            ${SWIG_SOURCES} +	$(Echo) Generating LLDBWrapPython.cpp +	$(Verb) "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/prepare_bindings.py" "--src-root=$(PROJ_SRC_DIR)/$(LLDB_LEVEL)" "--target-dir=$(PROJ_OBJ_DIR)" "--config-build-dir=$(PROJ_OBJ_DIR)" "--prefix=$(PYTHON_DIR)" $(if $(DISABLE_AUTO_DEPENDENCIES),,-M) --find-swig +	$(Verb) "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/finish-swig-wrapper-classes.sh" "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)" "$(PROJ_OBJ_DIR)" "$(PROJ_OBJ_DIR)" "$(PYTHON_DIR)" -m + +install-local:: lldb.py +	$(Echo) Installing $(BuildMode) LLDB python modules +	$(Verb) "$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/scripts/prepare_bindings.py" "--src-root=$(PROJ_SRC_DIR)/$(LLDB_LEVEL)" "--target-dir=$(PROJ_OBJ_DIR)" "--config-build-dir=$(PROJ_OBJ_DIR)" "--prefix=$(DESTDIR)$(prefix)" --find-swig + +clean-local:: +	$(Verb) $(RM) -f LLDBWrapPython.cpp lldb.py +endif  | 
