llvm-project/lldb/source/Interpreter
Walter Erquinigo 74c93956e1 Add a "Trace" plug-in to LLDB to add process trace support in stages.
This is the first in a series of patches that will adds a new processor trace plug-in to LLDB.

The idea for this first patch to to add the plug-in interface with simple commands for the trace files that can "load" and "dump" the trace information. We can test the functionality and ensure people are happy with the way things are done and how things are organized before moving on to adding more functionality.

Processor trace information can be view in a few different ways:
- post mortem where a trace is saved off that can be viewed later in the debugger
- gathered while a process is running and allow the user to step back in time (with no variables, memory or registers) to see how each thread arrived at where it is currently stopped.

This patch attempts to start with the first solution of loading a trace file after the fact. The idea is that we will use a JSON file to load the trace information. JSON allows us to specify information about the trace like:
- plug-in name in LLDB
- path to trace file
- shared library load information so we can re-create a target and symbolicate the information in the trace
- any other info that the trace plug-in will need to be able to successfully parse the trace information
  - cpu type
  - version info
  - ???

A new "trace" command was added at the top level of the LLDB commmands:
- "trace load"
- "trace dump"

I did this because if we load trace information we don't need to have a process and we might end up creating a new target for the trace information that will become active. If anyone has any input on where this would be better suited, please let me know. Walter Erquinigo will end up filling in the Intel PT specific plug-in so that it works and is tested once we can agree that the direction of this patch is the correct one, so please feel free to chime in with ideas on comments!

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D85705
2020-09-21 17:13:18 -07: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 Add a "Trace" plug-in to LLDB to add process trace support in stages. 2020-09-21 17:13:18 -07:00
CommandObject.cpp [lldb] type category name common completion 2020-08-24 19:54:23 +02: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 Remove the "bool" return from OptionValue::Clear and its subclasses. 2020-07-21 11:32:55 -07: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] Remove redundant WithFormat suffixes (NFC) 2020-07-20 23:00:32 -07: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/ScriptInterpreter] Fix missing include on Windows 2020-06-25 12:19:04 -07:00
embedded_interpreter.py [lldb/Python] Fix the infinitely looping Python prompt bug 2020-06-16 11:05:19 -07:00