llvm-project/lldb/source/Target
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
..
ABI.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
AssertFrameRecognizer.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
CMakeLists.txt [lldb] Add MemoryTagMap class 2022-01-26 13:55:48 +00:00
DynamicRegisterInfo.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ExecutionContext.cpp [LLDB] Applying clang-tidy modernize-use-equals-default over LLDB 2022-03-31 13:21:49 -07:00
InstrumentationRuntime.cpp
InstrumentationRuntimeStopInfo.cpp
JITLoader.cpp
JITLoaderList.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
Language.cpp [lldb] Tighten lock in Language::ForEach 2021-08-31 15:45:38 -07:00
LanguageRuntime.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
Memory.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
MemoryHistory.cpp
MemoryRegionInfo.cpp [lldb][AArch64/Linux] Show memory tagged memory regions 2020-11-20 11:21:59 +00:00
MemoryTagMap.cpp [lldb] Add MemoryTagMap class 2022-01-26 13:55:48 +00:00
ModuleCache.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
OperatingSystem.cpp [lldb] Remove ConstString from GetPluginNameStatic of some plugins 2021-10-21 12:58:45 +02:00
PathMappingList.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
Platform.cpp [lldb] Refactor DataBuffer so we can map files as read-only 2022-04-05 13:46:37 -07:00
Process.cpp [lldb] Fix ^C handling in IOHandlerProcessSTDIO 2022-03-18 08:58:30 +01:00
ProcessTrace.cpp [lldb] Remove ConstString from Process, ScriptInterpreter and StructuredData plugin names 2021-10-28 10:15:03 +02:00
Queue.cpp
QueueItem.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
QueueList.cpp
RegisterContext.cpp Recommit: [lldb] Remove "dwarf dynamic register size expressions" from RegisterInfo 2021-10-07 11:15:00 +02:00
RegisterContextUnwind.cpp [lldb] Refactor DataBuffer so we can map files as read-only 2022-04-05 13:46:37 -07:00
RegisterNumber.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
RemoteAwarePlatform.cpp [lldb] Move host platform implementations into the base class 2022-04-05 11:22:37 +02:00
SectionLoadHistory.cpp
SectionLoadList.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
StackFrame.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
StackFrameList.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
StackFrameRecognizer.cpp [lldb] Make deleting frame recognizers actually work 2020-07-23 17:43:37 +02:00
StackID.cpp
Statistics.cpp Fix a double debug info size counting in top level stats for "statistics dump". 2022-02-10 10:55:18 -08:00
StopInfo.cpp [lldb] Migrate condition evaluation failure to ReportError 2022-03-16 22:54:02 -07:00
StructuredDataPlugin.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
SystemRuntime.cpp [lldb] Have LanguageRuntime and SystemRuntime share a base class (NFC) 2020-07-24 16:28:34 -07:00
Target.cpp [trace] clear any existing tracing sessions before relaunching the binary 2022-03-21 16:03:37 -07:00
TargetList.cpp [lldb] Change the way we pick a platform for fat binaries 2022-03-30 15:30:05 -07:00
TargetProperties.td Change "target.save-jit-objects" to "target.save-jit-objects-dir". 2022-03-07 17:44:51 -08:00
Thread.cpp [lldb][gui] make 'step out' step out of the selected frame 2022-04-05 08:29:13 +02:00
ThreadCollection.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
ThreadList.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlan.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanBase.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanCallFunction.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanCallFunctionUsingABI.cpp
ThreadPlanCallOnFunctionExit.cpp [lldb][NFC] Inclusive Language: rename master plan to controlling plan 2021-11-11 15:04:44 -06:00
ThreadPlanCallUserExpression.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanPython.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanRunToAddress.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanShouldStopHere.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanStack.cpp Remove redundant return and continue statements (NFC) 2021-12-24 23:17:54 -08:00
ThreadPlanStepInRange.cpp [lldb] Fix step-avoid-regexp logging 2022-03-09 08:35:15 -08:00
ThreadPlanStepInstruction.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanStepOut.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanStepOverBreakpoint.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanStepOverRange.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanStepRange.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanStepThrough.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanStepUntil.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ThreadPlanTracer.cpp [lldb] Change back LLDBLog::Commands->Types in a couple more places 2022-03-16 15:46:17 +01:00
ThreadSpec.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
Trace.cpp [trace][intel pt] Create a common accessor for live and postmortem data 2022-04-07 15:58:44 -07:00
TraceCursor.cpp [trace][intel pt] Implement the Intel PT cursor 2021-07-16 16:47:43 -07:00
TraceExporter.cpp [lldb] Remove ConstString from SymbolVendor, Trace, TraceExporter, UnwindAssembly, MemoryHistory and InstrumentationRuntime plugin names 2021-10-29 12:08:57 +02:00
TraceInstructionDumper.cpp [trace][intelpt] Introduce instruction Ids 2022-04-06 12:19:36 -07:00
UnixSignals.cpp Add unix signal hit counts to the target statistics. 2021-10-27 22:31:14 -07:00
UnwindAssembly.cpp [lldb] Delete copy operations on PluginInterface class 2020-10-09 10:37:09 +02:00
UnwindLLDB.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00