summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2015-11-20 23:09:11 +0000
committerAdrian McCarthy <amccarth@google.com>2015-11-20 23:09:11 +0000
commitf7d1893f5b24c811b3c02de94047cf79487b6677 (patch)
treeb37e6203c2cb8f9ccf34aeda2b565383855f3a1a /lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
parenta1f61fe841b7a830a6a4249b5bcea1030409cae4 (diff)
downloadbcm5719-llvm-f7d1893f5b24c811b3c02de94047cf79487b6677.tar.gz
bcm5719-llvm-f7d1893f5b24c811b3c02de94047cf79487b6677.zip
Enable saving of mini dumps with lldb process save-core.
Also adds SB API to save a core and tests that use it. Differential Revision: http://reviews.llvm.org/D14793 llvm-svn: 253734
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 8b994590504..b6624481324 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "ObjectFilePECOFF.h"
+#include "WindowsMiniDump.h"
#include "llvm/Support/COFF.h"
@@ -24,6 +25,7 @@
#include "lldb/Core/Timer.h"
#include "lldb/Core/UUID.h"
#include "lldb/Symbol/ObjectFile.h"
+#include "lldb/Target/Process.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/Target.h"
@@ -42,7 +44,8 @@ ObjectFilePECOFF::Initialize()
GetPluginDescriptionStatic(),
CreateInstance,
CreateMemoryInstance,
- GetModuleSpecifications);
+ GetModuleSpecifications,
+ SaveCore);
}
void
@@ -148,6 +151,14 @@ ObjectFilePECOFF::GetModuleSpecifications (const lldb_private::FileSpec& file,
return specs.GetSize() - initial_count;
}
+bool
+ObjectFilePECOFF::SaveCore(const lldb::ProcessSP &process_sp,
+ const lldb_private::FileSpec &outfile,
+ lldb_private::Error &error)
+{
+ return SaveMiniDump(process_sp, outfile, error);
+}
+
bool
ObjectFilePECOFF::MagicBytesMatch (DataBufferSP& data_sp)
OpenPOWER on IntegriCloud