llvm-project/lldb
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
..
bindings [lldb] Add Python bindings to print stack traces on crashes. 2022-04-07 11:21:02 -07:00
cmake [lldb] [CMake] Disable GCC's -Wstringop-truncation warning. NFC. 2022-04-07 12:09:01 +03:00
docs [trace][intelpt] Server side changes for TSC to wall time conversion 2022-03-24 05:36:21 -07:00
examples [lldb/crashlog] Parse thread fields and pass it to crashlog scripted process 2022-03-25 14:59:50 -07:00
include/lldb [trace][intel pt] Create a common accessor for live and postmortem data 2022-04-07 15:58:44 -07:00
packages/Python/lldbsuite [lldb] Add Python bindings to print stack traces on crashes. 2022-04-07 11:21:02 -07:00
resources [lldb] Remove stale LLDB-Info.plist 2021-01-08 10:12:16 -08:00
scripts Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
source [trace][intel pt] Create a common accessor for live and postmortem data 2022-04-07 15:58:44 -07:00
test Revert "Reland "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON""" 2022-04-07 10:07:07 -04:00
third_party/Python/module [lldb][NFC] Inclusive language: replace master/slave names for ptys 2021-11-12 10:54:18 -06:00
tools Correct debugserver to write xmm/ymm/zmm reg values 2022-04-06 23:36:52 -07:00
unittests Disable LLDB index cache for .o files with no UUID. 2022-04-05 15:14:36 -07:00
utils [lldb] Match test dependencies name to other LLVM projects. 2021-05-21 00:10:27 -07:00
.clang-format
.clang-tidy [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
.gitignore
CMakeLists.txt [cmake] Make include(GNUInstallDirs) always below project(..) 2022-01-20 18:59:17 +00:00
CODE_OWNERS.txt [CODE OWNERS] Add wallace as code owner 2022-01-12 12:36:30 -08:00
LICENSE.TXT
use_lldb_suite_root.py