llvm-project/lldb/source
Walter Erquinigo e0cfe20ad2 [trace][intel pt] Create a common accessor for live and postmortem data
Some parts of the code have to distinguish between live and postmortem threads
to figure out how to get some data, e.g. thread trace buffers. This makes the
code less generic and more error prone. An example of that is that we have
two different decoders: LiveThreadDecoder and PostMortemThreadDecoder. They
exist because getting the trace bufer is different for each case.

The problem doesn't stop there. Soon we'll have even more kinds of data, like
the context switch trace, whose fetching will be different for live and post-
mortem processes.

As a way to fix this, I'm creating a common API for accessing thread data,
which is able to figure out how to handle the postmortem and live cases on
behalf of the caller. As a result of that, I was able to eliminate the two
decoders and unify them into a simpler one. Not only that, our TraceSave
functionality only worked for live threads, but now it can also work for
postmortem processes, which might be useful now, but it might in the future.

This common API is OnThreadBinaryDataRead. More information in the inline
documentation.

Differential Revision: https://reviews.llvm.org/D123281
2022-04-07 15:58:44 -07:00
..
API [lldb] Use getMainExecutable in SBDebugger::PrintStackTraceOnError 2022-04-07 13:53:23 -07:00
Breakpoint [lldb] Silence GCC warnings about missing returns after fully covered switches. NFC. 2022-04-06 22:50:07 +03:00
Commands [trace][intelpt] Introduce instruction Ids 2022-04-06 12:19:36 -07:00
Core [lldb][gui] remove the "expand" diamond for variables where expanding fails 2022-04-07 21:59:18 +02:00
DataFormatters [lldb] Refactor DataBuffer so we can map files as read-only 2022-04-05 13:46:37 -07:00
Expression [lldb] Refactor DataBuffer so we can map files as read-only 2022-04-05 13:46:37 -07:00
Host [lldb] Update reinterpret_cast in linux/Host.cpp 2022-04-05 13:52:07 -07:00
Initialization [lldb] Remove FileSystem::Initialize from FileCollector 2022-03-03 13:22:38 -08:00
Interpreter Fix a mistyping introduced with the new container command. 2022-04-05 09:42:05 -07:00
Plugins [trace][intel pt] Create a common accessor for live and postmortem data 2022-04-07 15:58:44 -07:00
Symbol [lldb] Change CreateMemoryInstance to take a WritableDataBuffer 2022-04-05 13:46:41 -07:00
Target [trace][intel pt] Create a common accessor for live and postmortem data 2022-04-07 15:58:44 -07:00
Utility [lldb/source/Utility/DataExtractor.cpp] Update for `llvm::MD5::MD5Result` API change 2022-04-05 21:47:45 -07:00
Version [lldb] Fix LLDB_FULL_VERSION_STRING 2022-01-19 14:20:22 -08:00
CMakeLists.txt [lldb] Make lldbVersion a full fledged library 2021-12-08 15:14:34 -08:00