diff options
author | Adrian McCarthy <amccarth@google.com> | 2015-10-28 18:21:45 +0000 |
---|---|---|
committer | Adrian McCarthy <amccarth@google.com> | 2015-10-28 18:21:45 +0000 |
commit | 18a9135d56522bb585ae005fdafa4678048d0214 (patch) | |
tree | e399b0a3d7f12318daace934e2e15268791890bb /lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp | |
parent | 9413fa26af7fe9b01ec758b77cf9203ee9b94d77 (diff) | |
download | bcm5719-llvm-18a9135d56522bb585ae005fdafa4678048d0214.tar.gz bcm5719-llvm-18a9135d56522bb585ae005fdafa4678048d0214.zip |
Refactor Windows process plugin to allow code sharing between live and mini dump debugging.
llvm-svn: 251540
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp new file mode 100644 index 00000000000..fcb4c8efcae --- /dev/null +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp @@ -0,0 +1,77 @@ +//===-- ProcessWindows.cpp --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "ProcessWindows.h" + +// Other libraries and framework includes +#include "lldb/Core/Module.h" +#include "lldb/Core/ModuleSpec.h" +#include "lldb/Core/PluginManager.h" +#include "lldb/Core/Section.h" +#include "lldb/Core/State.h" +#include "lldb/Target/DynamicLoader.h" +#include "lldb/Target/MemoryRegionInfo.h" +#include "lldb/Target/Target.h" + +using namespace lldb; +using namespace lldb_private; + +namespace lldb_private +{ + +//------------------------------------------------------------------------------ +// Constructors and destructors. + +ProcessWindows::ProcessWindows(lldb::TargetSP target_sp, Listener &listener) + : lldb_private::Process(target_sp, listener) +{ +} + +ProcessWindows::~ProcessWindows() +{ +} + +size_t +ProcessWindows::GetSTDOUT(char *buf, size_t buf_size, Error &error) +{ + error.SetErrorString("GetSTDOUT unsupported on Windows"); + return 0; +} + +size_t +ProcessWindows::GetSTDERR(char *buf, size_t buf_size, Error &error) +{ + error.SetErrorString("GetSTDERR unsupported on Windows"); + return 0; +} + +size_t +ProcessWindows::PutSTDIN(const char *buf, size_t buf_size, Error &error) +{ + error.SetErrorString("PutSTDIN unsupported on Windows"); + return 0; +} + +//------------------------------------------------------------------------------ +// ProcessInterface protocol. + + +lldb::addr_t +ProcessWindows::GetImageInfoAddress() +{ + Target &target = GetTarget(); + ObjectFile *obj_file = target.GetExecutableModule()->GetObjectFile(); + Address addr = obj_file->GetImageInfoAddress(&target); + if (addr.IsValid()) + return addr.GetLoadAddress(&target); + else + return LLDB_INVALID_ADDRESS; +} + +} |