diff options
| author | Stephane Sezer <sas@cd80.net> | 2015-07-08 18:07:13 +0000 |
|---|---|---|
| committer | Stephane Sezer <sas@cd80.net> | 2015-07-08 18:07:13 +0000 |
| commit | 38a1b7ea58cc970505d35fe6e154a74352cc6d57 (patch) | |
| tree | 121199d065fb4aff940f412fa522cb60f8adae9e | |
| parent | e008391ea2becf5963e141174335f7c3dfe7cbba (diff) | |
| download | bcm5719-llvm-38a1b7ea58cc970505d35fe6e154a74352cc6d57.tar.gz bcm5719-llvm-38a1b7ea58cc970505d35fe6e154a74352cc6d57.zip | |
Move WindowsDYLD to the Plugins/DynamicLoader directory.
Summary:
This commit moves the Windows DyanamicLoader to the common DynamicLoader
directory. This is required to remote debug Windows targets.
This commit also initializes the Windows DYLD plugin in
SystemInitializerCommon (similarly to both POSIX and MacOSX DYLD
plugins) so that we can automatically instantiate this class when
connected to a windows process.
Test Plan: Build.
Reviewers: zturner
Subscribers: lldb-commits, abdulras
Differential Revision: http://reviews.llvm.org/D10882
llvm-svn: 241697
| -rw-r--r-- | lldb/cmake/LLDBDependencies.cmake | 1 | ||||
| -rw-r--r-- | lldb/source/API/SystemInitializerFull.cpp | 5 | ||||
| -rw-r--r-- | lldb/source/Initialization/SystemInitializerCommon.cpp | 3 | ||||
| -rw-r--r-- | lldb/source/Plugins/DynamicLoader/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | lldb/source/Plugins/DynamicLoader/Windows-DYLD/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp (renamed from lldb/source/Plugins/Process/Windows/DynamicLoaderWindows.cpp) | 36 | ||||
| -rw-r--r-- | lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h (renamed from lldb/source/Plugins/Process/Windows/DynamicLoaderWindows.h) | 12 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/Windows/CMakeLists.txt | 1 |
8 files changed, 34 insertions, 31 deletions
diff --git a/lldb/cmake/LLDBDependencies.cmake b/lldb/cmake/LLDBDependencies.cmake index d53ce2a98f3..96f6bcc2b43 100644 --- a/lldb/cmake/LLDBDependencies.cmake +++ b/lldb/cmake/LLDBDependencies.cmake @@ -19,6 +19,7 @@ set( LLDB_USED_LIBS lldbPluginDynamicLoaderStatic lldbPluginDynamicLoaderPosixDYLD lldbPluginDynamicLoaderHexagonDYLD + lldbPluginDynamicLoaderWindowsDYLD lldbPluginObjectFileELF lldbPluginObjectFileJIT diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp index 731d38a37be..01ad8157646 100644 --- a/lldb/source/API/SystemInitializerFull.cpp +++ b/lldb/source/API/SystemInitializerFull.cpp @@ -58,7 +58,6 @@ #if defined(_MSC_VER) #include "lldb/Host/windows/windows.h" -#include "Plugins/Process/Windows/DynamicLoaderWindows.h" #include "Plugins/Process/Windows/ProcessWindows.h" #endif @@ -264,7 +263,6 @@ SystemInitializerFull::Initialize() RenderScriptRuntime::Initialize(); #if defined(_MSC_VER) - DynamicLoaderWindows::Initialize(); ProcessWindows::Initialize(); #endif #if defined(__FreeBSD__) @@ -369,9 +367,6 @@ SystemInitializerFull::Terminate() ProcessKDP::Terminate(); SymbolVendorMacOSX::Terminate(); #endif -#if defined(_MSC_VER) - DynamicLoaderWindows::Terminate(); -#endif #if defined(__FreeBSD__) ProcessFreeBSD::Terminate(); diff --git a/lldb/source/Initialization/SystemInitializerCommon.cpp b/lldb/source/Initialization/SystemInitializerCommon.cpp index 35189c103f7..51f32a2776a 100644 --- a/lldb/source/Initialization/SystemInitializerCommon.cpp +++ b/lldb/source/Initialization/SystemInitializerCommon.cpp @@ -17,6 +17,7 @@ #include "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h" #include "Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h" +#include "Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h" #include "Plugins/Instruction/ARM/EmulateInstructionARM.h" #include "Plugins/Instruction/MIPS/EmulateInstructionMIPS.h" #include "Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h" @@ -106,6 +107,7 @@ SystemInitializerCommon::Initialize() ObjectFileELF::Initialize(); ObjectFilePECOFF::Initialize(); DynamicLoaderPOSIXDYLD::Initialize(); + DynamicLoaderWindowsDYLD::Initialize(); platform_freebsd::PlatformFreeBSD::Initialize(); platform_linux::PlatformLinux::Initialize(); PlatformWindows::Initialize(); @@ -152,6 +154,7 @@ SystemInitializerCommon::Terminate() ObjectFileELF::Terminate(); ObjectFilePECOFF::Terminate(); DynamicLoaderPOSIXDYLD::Terminate(); + DynamicLoaderWindowsDYLD::Terminate(); platform_freebsd::PlatformFreeBSD::Terminate(); platform_linux::PlatformLinux::Terminate(); PlatformWindows::Terminate(); diff --git a/lldb/source/Plugins/DynamicLoader/CMakeLists.txt b/lldb/source/Plugins/DynamicLoader/CMakeLists.txt index 01a08cba693..8e1b316a3c2 100644 --- a/lldb/source/Plugins/DynamicLoader/CMakeLists.txt +++ b/lldb/source/Plugins/DynamicLoader/CMakeLists.txt @@ -2,8 +2,8 @@ add_subdirectory(MacOSX-DYLD) add_subdirectory(POSIX-DYLD) add_subdirectory(Static) add_subdirectory(Hexagon-DYLD) +add_subdirectory(Windows-DYLD) if (CMAKE_SYSTEM_NAME MATCHES "Darwin") add_subdirectory(Darwin-Kernel) endif() - diff --git a/lldb/source/Plugins/DynamicLoader/Windows-DYLD/CMakeLists.txt b/lldb/source/Plugins/DynamicLoader/Windows-DYLD/CMakeLists.txt new file mode 100644 index 00000000000..9a5ad76827b --- /dev/null +++ b/lldb/source/Plugins/DynamicLoader/Windows-DYLD/CMakeLists.txt @@ -0,0 +1,5 @@ +set(LLVM_NO_RTTI 1) + +add_lldb_library(lldbPluginDynamicLoaderWindowsDYLD + DynamicLoaderWindowsDYLD.cpp + ) diff --git a/lldb/source/Plugins/Process/Windows/DynamicLoaderWindows.cpp b/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp index 552f75841cb..56b56ab3a19 100644 --- a/lldb/source/Plugins/Process/Windows/DynamicLoaderWindows.cpp +++ b/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp @@ -1,4 +1,4 @@ -//===-- DynamicLoaderWindows.cpp --------------------------------*- C++ -*-===// +//===-- DynamicLoaderWindowsDYLD.cpp --------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,8 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "DynamicLoaderWindows.h" -#include "ProcessWindowsLog.h" +#include "DynamicLoaderWindowsDYLD.h" #include "lldb/Core/PluginManager.h" #include "lldb/Target/Process.h" @@ -19,42 +18,43 @@ using namespace lldb; using namespace lldb_private; -DynamicLoaderWindows::DynamicLoaderWindows(Process *process) +DynamicLoaderWindowsDYLD::DynamicLoaderWindowsDYLD(Process *process) : DynamicLoader(process) { } -DynamicLoaderWindows::~DynamicLoaderWindows() +DynamicLoaderWindowsDYLD::~DynamicLoaderWindowsDYLD() { + } -void DynamicLoaderWindows::Initialize() +void DynamicLoaderWindowsDYLD::Initialize() { PluginManager::RegisterPlugin(GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance); } -void DynamicLoaderWindows::Terminate() +void DynamicLoaderWindowsDYLD::Terminate() { } -ConstString DynamicLoaderWindows::GetPluginNameStatic() +ConstString DynamicLoaderWindowsDYLD::GetPluginNameStatic() { static ConstString g_plugin_name("windows-dyld"); return g_plugin_name; } -const char *DynamicLoaderWindows::GetPluginDescriptionStatic() +const char *DynamicLoaderWindowsDYLD::GetPluginDescriptionStatic() { return "Dynamic loader plug-in that watches for shared library " "loads/unloads in Windows processes."; } -DynamicLoader *DynamicLoaderWindows::CreateInstance(Process *process, bool force) +DynamicLoader *DynamicLoaderWindowsDYLD::CreateInstance(Process *process, bool force) { bool should_create = force; if (!should_create) @@ -65,38 +65,38 @@ DynamicLoader *DynamicLoaderWindows::CreateInstance(Process *process, bool force } if (should_create) - return new DynamicLoaderWindows (process); + return new DynamicLoaderWindowsDYLD (process); return nullptr; } -void DynamicLoaderWindows::DidAttach() +void DynamicLoaderWindowsDYLD::DidAttach() { } -void DynamicLoaderWindows::DidLaunch() +void DynamicLoaderWindowsDYLD::DidLaunch() { } -Error DynamicLoaderWindows::CanLoadImage() +Error DynamicLoaderWindowsDYLD::CanLoadImage() { return Error(); } -ConstString DynamicLoaderWindows::GetPluginName() +ConstString DynamicLoaderWindowsDYLD::GetPluginName() { return GetPluginNameStatic(); } -uint32_t DynamicLoaderWindows::GetPluginVersion() +uint32_t DynamicLoaderWindowsDYLD::GetPluginVersion() { return 1; } ThreadPlanSP -DynamicLoaderWindows::GetStepThroughTrampolinePlan(Thread &thread, bool stop) +DynamicLoaderWindowsDYLD::GetStepThroughTrampolinePlan(Thread &thread, bool stop) { return ThreadPlanSP(); -}
\ No newline at end of file +} diff --git a/lldb/source/Plugins/Process/Windows/DynamicLoaderWindows.h b/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h index 304c6f8f639..d12b999f462 100644 --- a/lldb/source/Plugins/Process/Windows/DynamicLoaderWindows.h +++ b/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h @@ -1,4 +1,4 @@ -//===-- DynamicLoaderWindows.h ----------------------------------*- C++ -*-===// +//===-- DynamicLoaderWindowsDYLDh ----------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef liblldb_Plugins_Process_Windows_DynamicLoaderWindows_H_ -#define liblldb_Plugins_Process_Windows_DynamicLoaderWindows_H_ +#ifndef liblldb_Plugins_Process_Windows_DynamicLoaderWindowsDYLD_H_ +#define liblldb_Plugins_Process_Windows_DynamicLoaderWindowsDYLD_H_ #include "lldb/lldb-forward.h" #include "lldb/Target/DynamicLoader.h" @@ -16,11 +16,11 @@ namespace lldb_private { -class DynamicLoaderWindows : public DynamicLoader +class DynamicLoaderWindowsDYLD : public DynamicLoader { public: - DynamicLoaderWindows(Process *process); - virtual ~DynamicLoaderWindows(); + DynamicLoaderWindowsDYLD(Process *process); + virtual ~DynamicLoaderWindowsDYLD(); static void Initialize(); static void Terminate(); diff --git a/lldb/source/Plugins/Process/Windows/CMakeLists.txt b/lldb/source/Plugins/Process/Windows/CMakeLists.txt index c0f210e0d00..6d61fef7f38 100644 --- a/lldb/source/Plugins/Process/Windows/CMakeLists.txt +++ b/lldb/source/Plugins/Process/Windows/CMakeLists.txt @@ -5,7 +5,6 @@ include_directories(../Utility) set(PROC_WINDOWS_SOURCES DebuggerThread.cpp - DynamicLoaderWindows.cpp LocalDebugDelegate.cpp ProcessWindows.cpp ProcessWindowsLog.cpp |

