mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
[LLDB] Move Trace-specific classes into separate library
These two classes, TraceSessionFileParser and ThreadPostMortemTrace, seem to be useful primarily for tracing. Currently it looks like intel-pt is the sole user of these, but that other tracing plugins could be written in the future that take advantage of these. Unfortunately with them in Target, there is a dependency on PluginProcessUtility. I'd like to sever that dependency, so I moved them into a `TraceCommon` plugin. Differential Revision: https://reviews.llvm.org/D105649
This commit is contained in:
@@ -230,7 +230,6 @@ class ThreadSpec;
|
||||
class ThreadPostMortemTrace;
|
||||
class Trace;
|
||||
class TraceCursor;
|
||||
class TraceSessionFileParser;
|
||||
class Type;
|
||||
class TypeAndOrName;
|
||||
class TypeCategoryImpl;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
option(LLDB_BUILD_INTEL_PT "Enable Building of Intel(R) Processor Trace Tool" OFF)
|
||||
|
||||
add_subdirectory(common)
|
||||
|
||||
if (LLDB_BUILD_INTEL_PT)
|
||||
add_subdirectory(intel-pt)
|
||||
endif()
|
||||
|
||||
8
lldb/source/Plugins/Trace/common/CMakeLists.txt
Normal file
8
lldb/source/Plugins/Trace/common/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
add_lldb_library(lldbPluginTraceCommon
|
||||
ThreadPostMortemTrace.cpp
|
||||
TraceSessionFileParser.cpp
|
||||
|
||||
LINK_LIBS
|
||||
lldbCore
|
||||
lldbTarget
|
||||
)
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "lldb/Target/ThreadPostMortemTrace.h"
|
||||
#include "ThreadPostMortemTrace.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===/
|
||||
|
||||
#include "lldb/Target/TraceSessionFileParser.h"
|
||||
#include "TraceSessionFileParser.h"
|
||||
#include "ThreadPostMortemTrace.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
@@ -14,7 +15,6 @@
|
||||
#include "lldb/Core/Module.h"
|
||||
#include "lldb/Target/Process.h"
|
||||
#include "lldb/Target/Target.h"
|
||||
#include "lldb/Target/ThreadPostMortemTrace.h"
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "llvm/Support/JSON.h"
|
||||
|
||||
#include "lldb/Target/ThreadPostMortemTrace.h"
|
||||
#include "ThreadPostMortemTrace.h"
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
@@ -25,6 +25,7 @@ add_lldb_library(lldbPluginTraceIntelPT PLUGIN
|
||||
lldbCore
|
||||
lldbSymbol
|
||||
lldbTarget
|
||||
lldbPluginTraceCommon
|
||||
${LIBIPT_LIBRARY}
|
||||
LINK_COMPONENTS
|
||||
Support
|
||||
|
||||
@@ -66,11 +66,9 @@ add_lldb_library(lldbTarget
|
||||
ThreadPlanTracer.cpp
|
||||
ThreadPlanStack.cpp
|
||||
ThreadSpec.cpp
|
||||
ThreadPostMortemTrace.cpp
|
||||
Trace.cpp
|
||||
TraceCursor.cpp
|
||||
TraceInstructionDumper.cpp
|
||||
TraceSessionFileParser.cpp
|
||||
UnixSignals.cpp
|
||||
UnwindAssembly.cpp
|
||||
UnwindLLDB.cpp
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "lldb/Target/Process.h"
|
||||
#include "lldb/Target/SectionLoadList.h"
|
||||
#include "lldb/Target/Thread.h"
|
||||
#include "lldb/Target/ThreadPostMortemTrace.h"
|
||||
#include "lldb/Utility/Stream.h"
|
||||
|
||||
using namespace lldb;
|
||||
|
||||
Reference in New Issue
Block a user