llvm-project/lldb/source/Interpreter
Tatyana Krasnukha a01b26fb51 [lldb] Make CommandInterpreter's execution context the same as debugger's one.
Currently, the interpreter's context is not updated until a command is executed.
This has resulted in the behavior of SB-interface functions and some commands
depends on previous user actions. The interpreter's context can stay uninitialized,
point to a currently selected target, or point to one of previously selected targets.

This patch removes any usages of CommandInterpreter::UpdateExecutionContext.
CommandInterpreter::HandleCommand* functions still may override context temporarily,
but now they always restore it before exiting. CommandInterpreter saves overriden
contexts to the stack, that makes nesting commands possible.

Added test reproduces one of the issues. Without this fix, the last assertion fails
because interpreter's execution context is empty until running "target list", so,
the value of the global property was updated instead of process's local instance.

Differential Revision: https://reviews.llvm.org/D92164
2020-12-12 16:40:59 +03:00
..
CMakeLists.txt [lldb] Move ScriptCommand and RegexCommand under Commands (NFC) 2020-09-01 17:33:39 -07:00
CommandAlias.cpp [lldb/Interpreter] Support color in CommandReturnObject 2020-06-09 10:45:45 -07:00
CommandHistory.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CommandInterpreter.cpp [lldb] Make CommandInterpreter's execution context the same as debugger's one. 2020-12-12 16:40:59 +03:00
CommandObject.cpp [trace][intel-pt] Scaffold the 'thread trace start | stop' commands 2020-11-18 18:24:36 -08:00
CommandOptionValidators.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CommandReturnObject.cpp [lldb/Interpreter] Support color in CommandReturnObject 2020-06-09 10:45:45 -07:00
InterpreterProperties.td [lldb/interpreter] Add ability to save lldb session to a file 2020-07-22 11:43:16 +02:00
OptionArgParser.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionGroupArchitecture.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
OptionGroupBoolean.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionGroupFile.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionGroupFormat.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionGroupOutputFile.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionGroupPlatform.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
OptionGroupPythonClassWithDict.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
OptionGroupString.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionGroupUInt64.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionGroupUUID.cpp [lldb] tab completion for `target modules load -u` 2020-08-11 12:35:36 +02:00
OptionGroupValueObjectDisplay.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionGroupVariable.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionGroupWatchpoint.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionValue.cpp [lldb] Remove redundant WithFormat suffixes (NFC) 2020-07-20 23:00:32 -07:00
OptionValueArch.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionValueArgs.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionValueArray.cpp Add an option (-y) to "break set" and "source list" that uses the same 2020-07-20 17:40:36 -07:00
OptionValueBoolean.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionValueChar.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionValueDictionary.cpp Add an option (-y) to "break set" and "source list" that uses the same 2020-07-20 17:40:36 -07:00
OptionValueEnumeration.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionValueFileColonLine.cpp Add an option (-y) to "break set" and "source list" that uses the same 2020-07-20 17:40:36 -07:00
OptionValueFileSpec.cpp Add an option (-y) to "break set" and "source list" that uses the same 2020-07-20 17:40:36 -07:00
OptionValueFileSpecList.cpp [lldb][NFC] Migrate FileSpec::Dump to raw_ostream 2019-12-06 09:40:42 +01:00
OptionValueFormat.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionValueFormatEntity.cpp Remove the "bool" return from OptionValue::Clear and its subclasses. 2020-07-21 11:32:55 -07:00
OptionValueLanguage.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionValuePathMappings.cpp [source maps] Fix remove, insert-after and replace 2020-04-03 19:15:56 -07:00
OptionValueProperties.cpp [lldb][NFC] Remove property predicate matcher 2020-10-13 17:09:27 +02:00
OptionValueRegex.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionValueSInt64.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionValueString.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
OptionValueUInt64.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
OptionValueUUID.cpp Support build-ids of other sizes than 16 in UUID::SetFromStringRef 2020-06-07 10:03:41 +00:00
Options.cpp [lldb][NFC] Move OptionDefinition from lldb-private-types.h to its own Utility header 2020-11-12 15:30:26 +01:00
Property.cpp Add an option (-y) to "break set" and "source list" that uses the same 2020-07-20 17:40:36 -07:00
ScriptInterpreter.cpp [lldb] Support Python imports relative the to the current file being sourced 2020-10-27 09:20:45 -07:00
embedded_interpreter.py [lldb/Python] Fix the infinitely looping Python prompt bug 2020-06-16 11:05:19 -07:00