diff --git a/lldb/include/lldb/lldb-forward.h b/lldb/include/lldb/lldb-forward.h --- a/lldb/include/lldb/lldb-forward.h +++ b/lldb/include/lldb/lldb-forward.h @@ -230,7 +230,6 @@ class ThreadPostMortemTrace; class Trace; class TraceCursor; -class TraceSessionFileParser; class Type; class TypeAndOrName; class TypeCategoryImpl; diff --git a/lldb/source/Plugins/Trace/CMakeLists.txt b/lldb/source/Plugins/Trace/CMakeLists.txt --- a/lldb/source/Plugins/Trace/CMakeLists.txt +++ b/lldb/source/Plugins/Trace/CMakeLists.txt @@ -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() diff --git a/lldb/source/Plugins/Trace/common/CMakeLists.txt b/lldb/source/Plugins/Trace/common/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/lldb/source/Plugins/Trace/common/CMakeLists.txt @@ -0,0 +1,8 @@ +add_lldb_library(lldbPluginTraceCommon + ThreadPostMortemTrace.cpp + TraceSessionFileParser.cpp + + LINK_LIBS + lldbCore + lldbTarget + ) diff --git a/lldb/include/lldb/Target/ThreadPostMortemTrace.h b/lldb/source/Plugins/Trace/common/ThreadPostMortemTrace.h rename from lldb/include/lldb/Target/ThreadPostMortemTrace.h rename to lldb/source/Plugins/Trace/common/ThreadPostMortemTrace.h diff --git a/lldb/source/Target/ThreadPostMortemTrace.cpp b/lldb/source/Plugins/Trace/common/ThreadPostMortemTrace.cpp rename from lldb/source/Target/ThreadPostMortemTrace.cpp rename to lldb/source/Plugins/Trace/common/ThreadPostMortemTrace.cpp --- a/lldb/source/Target/ThreadPostMortemTrace.cpp +++ b/lldb/source/Plugins/Trace/common/ThreadPostMortemTrace.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "lldb/Target/ThreadPostMortemTrace.h" +#include "ThreadPostMortemTrace.h" #include diff --git a/lldb/include/lldb/Target/TraceSessionFileParser.h b/lldb/source/Plugins/Trace/common/TraceSessionFileParser.h rename from lldb/include/lldb/Target/TraceSessionFileParser.h rename to lldb/source/Plugins/Trace/common/TraceSessionFileParser.h --- a/lldb/include/lldb/Target/TraceSessionFileParser.h +++ b/lldb/source/Plugins/Trace/common/TraceSessionFileParser.h @@ -11,7 +11,7 @@ #include "llvm/Support/JSON.h" -#include "lldb/Target/ThreadPostMortemTrace.h" +#include "ThreadPostMortemTrace.h" namespace lldb_private { diff --git a/lldb/source/Target/TraceSessionFileParser.cpp b/lldb/source/Plugins/Trace/common/TraceSessionFileParser.cpp rename from lldb/source/Target/TraceSessionFileParser.cpp rename to lldb/source/Plugins/Trace/common/TraceSessionFileParser.cpp --- a/lldb/source/Target/TraceSessionFileParser.cpp +++ b/lldb/source/Plugins/Trace/common/TraceSessionFileParser.cpp @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===/ -#include "lldb/Target/TraceSessionFileParser.h" +#include "TraceSessionFileParser.h" +#include "ThreadPostMortemTrace.h" #include @@ -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; diff --git a/lldb/source/Plugins/Trace/intel-pt/CMakeLists.txt b/lldb/source/Plugins/Trace/intel-pt/CMakeLists.txt --- a/lldb/source/Plugins/Trace/intel-pt/CMakeLists.txt +++ b/lldb/source/Plugins/Trace/intel-pt/CMakeLists.txt @@ -24,6 +24,7 @@ lldbCore lldbSymbol lldbTarget + lldbPluginTraceCommon ${LIBIPT_LIBRARY} LINK_COMPONENTS Support diff --git a/lldb/source/Target/CMakeLists.txt b/lldb/source/Target/CMakeLists.txt --- a/lldb/source/Target/CMakeLists.txt +++ b/lldb/source/Target/CMakeLists.txt @@ -66,10 +66,8 @@ ThreadPlanTracer.cpp ThreadPlanStack.cpp ThreadSpec.cpp - ThreadPostMortemTrace.cpp Trace.cpp TraceCursor.cpp - TraceSessionFileParser.cpp UnixSignals.cpp UnwindAssembly.cpp UnwindLLDB.cpp diff --git a/lldb/source/Target/Trace.cpp b/lldb/source/Target/Trace.cpp --- a/lldb/source/Target/Trace.cpp +++ b/lldb/source/Target/Trace.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;